aboutsummaryrefslogtreecommitdiff
path: root/Documentation/MANPAGE-STATFS.md
diff options
context:
space:
mode:
authorJakob Unterwurzacher2026-11-11 21:11:43 +0100
committerJakob Unterwurzacher2026-11-11 21:11:43 +0100
commitdfdf47d790fa758a9f443764ad296e86c9007ece (patch)
treedb488b0b7400742d5e7d42832fb8d246eb3ca4a7 /Documentation/MANPAGE-STATFS.md
parent8caa5dddeebaf7116c9fa12a64cac1aca567df58 (diff)
reverse: don't follow symlinks when serving gocryptfs.conf
.gocryptfs.reverse.conf is passed through to gocryptfs.conf in the reverse view unencrypted. lookupConf, VirtualConfNode.Getattr and VirtualConfNode.Open accessed it via syscall.Stat/Open on the full path, following symlinks. Anybody with write access to the backing directory could replace it with a symlink to, for example, /etc/shadow and read the target in plaintext through the mount when gocryptfs runs as root. Add RootNode.openConf(), which opens the file relative to the backing dir with O_NOFOLLOW|O_NONBLOCK (O_NONBLOCK so a FIFO cannot hang us) and rejects anything that is not a regular file. Use it for all three. Add TestConfigSymlink as a regression test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'Documentation/MANPAGE-STATFS.md')
0 files changed, 0 insertions, 0 deletions