Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directories should be locked #192

Open
bugdea1er opened this issue Mar 16, 2025 · 1 comment
Open

Directories should be locked #192

bugdea1er opened this issue Mar 16, 2025 · 1 comment

Comments

@bugdea1er
Copy link
Owner

bugdea1er commented Mar 16, 2025

To prevent deletion from another program and the same vulnerability we prevented in #165, the temporary directory should be locked to prevent an attacker from replacing its path with a symlink

  • NTFS supports atomic mandatory locking when using CreateFile
  • Some Linux systems support mandatory locking for tmpfs
  • At the very least, advisory locking should be added to all systems, as discussed here
@bugdea1er
Copy link
Owner Author

Memory was reserved in directory in #190 to store the directory handle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant