Re: hardlinks to setuid binaries

Taylor R Campbell <[email protected]> Sat, 26 Mar 2022 11:19:22 +0000
Newsgroups gmane.os.netbsd.devel.security
Message-ID <[email protected]>
Here's some conditions we could apply to making hard links:

1. [zfs] Caller must own file.

2. [linux with protected_hardlinks] Either:
   (a) Caller must own file.
   (b) File must be regular and non-suid/sgid, and caller must have
       read&write access.

3. [least restrictive I could think of to prevent this attack] Either:
   (a) If suid, caller must own file.
   (b) If sgid, caller must be in group.

If we apply conditions, I think we should apply them uniformly across
file systems.