Re: link() security

Chris Wright
2002-04-12T01:15:31Z

* xystrus (xystrus@haxm.com) wrote:
>
> Is there a good reason why a user can successfully link() a file to
> which they do not have any access?

Other than the fact that it's standard behaviour? ;-) Well, the SUS
actually makes an allowance for this:

"The implementation may require that the calling process has
permission to access the existing file."

If you are interested, the Openwall patch does just this (among other things)
http://openwall.com. Work based on Solar Designer's Openwall patch has
been brought forward to more recent 2.4 and 2.5 kernels. Both the
following projects implement the Openwall secure link feature:

http://grsecurity.net
http://lsm.immunix.org

This can break some applications that make assumptions wrt. link(2)
(Courier MTA for example).

cheers,
-chris