Re: Hard link creation witout write access

Mouse <[email protected]> Thu, 7 Sep 2023 07:46:48 -0400 (EDT)
Newsgroups gmane.os.netbsd.devel.security
Message-ID <[email protected]>
> Today I learned that you can create hard links to a file you don't
> own and can't write to or even read from:

> $ su -l root -c 'touch /tmp/foo && chmod 600 /tmp/foo'
> $ ln /tmp/foo /tmp/bar

> This strikes me as bonkers and a likely source of security issues.

What issues?  The only one I can see is that it allows anyone who can
write to any directory on that filesystem to cause the file to stick
around after its original name is unlinked.  That strikes me as a
non-hazard.

Do you see potential damage from that, or do you see some additional
threat?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B