4 ms·
> So an attacker would not be able to create the directory before the user runs the program I said it was a race. An attacker would race with the program's del
by TheDong 6y ago
> So an attacker would not be able to create the directory before the user runs the program
I said it was a race. An attacker would race with the program's deletion of the directory to recreate it. This race is really easy to do, and there have been numerous CVEs for this sort of race.
> And they would have to be logged in as the user in order to edit the pngtopdf.py file as it is created with 0700
That's not true.
If I own a directory, I can delete and recreate the files in that directory, even if I don't own the file, even if the file is 0700. Feel free to experiment around to see this.
- rootVIII 6y agoHmm okay. I'm going to start fixing that part and also attempt some CGO/objective-C to replace the python dependency. I had figured that removing any possible directory that could be seen as an application directory (at app-startup) would alleviate the issue you described. Thanks for the feedback though and also taking the time to look.