-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use fchmodat() because it follows symlinks
This is not a security vulnerability, since an attacker cannot cause a symbolic link to replace a file and the symlink restrictions mean that the attacker could only change permissions of paths inside ~/QubesIncoming/VMNAME/TOPLEVEL_DIR anyway. Still, not following symbolic links is the right thing to do. With pre-6.6 Linux kernels, fchmodat(fd, path, AT_SYMLINK_NOFOLLOW) is broken in a chroot without /proc mounted, so it cannot be used. Instead, open the path and call fchmod() on the file descriptor. Fixes: ed68c01 ("Use FD-based versions chmod and utime")
- Loading branch information
Showing
1 changed file
with
10 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters