Re: [PATCH 2.6.5-mm4] sys_access race fix

Chris Wright
2004-04-14T00:16:35Z

* Andrew Morton (akpm@osdl.org) wrote:
> Do races in access() actually matter? I mean, some other process could
> change things a nanosecond after access() has completed and the value which
> the access() caller received is wrong anyway.
>
> Or is there some deeper problem which you are addressing here?

There is a race where, the saved off capabilities could blow away recently
updated capabilites when they are restored. But, it's only raceable
against tasks that have SETPCAP and are setting another task's caps.
Otherwise it's serialised by the fact that we're dealing with a single
task that can only be in one syscall at a time. Fixing it would require
something like passing creds into the permission function, instead of
them being deduced from current, a rather invasive change.

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net