3 ms·
Can a user make a hard link to a file they don't own? How does this attack work?
by remram 3y ago
Can a user make a hard link to a file they don't own? How does this attack work?
- tadfisher 3y agoThese links (pun unfortunate) should help: https://sysctl-explorer.net/fs/protected_hardlinks/ https://sysctl-explorer.net/fs/protected_hardlinks/ http://michael.orlitzky.com/articles/posix_hardlink_heartache.xhtml http://michael.orlitzky.com/articles/posix_hardlink_heartach...
- remram 3y agoAnswer: fs.protected_hardlinks=1 is what prevents the creation of hardlinks to files you don't own. It's on by default on all machines I checked though. https://github.com/torvalds/linux/commit/800179c9b8a1e796e441674776d11cd4c05d61d7 https://github.com/torvalds/linux/commit/800179c9b8a1e796e44... Without this, a whole lot of attacks are possible with hardlinks.