Re: [PATCH 2.6.5-mm4] sys_access race fix

Chris Wright
2004-04-13T23:11:38Z

* Fabian Frederick (Fabian.Frederick@skynet.be) wrote:
> Well, the only major function behind user_walk is path_lookup.
> This one has some calls with the nameidata.Other process seems
> current->fs->xxx relevant read-only.Maybe you mean the
> read_lock(&current->fs->lock) which could bring a deadlock as we
> task->lock before ?

No, point is simply that there's implicit permission check in
__user_walk().

> If user_walk had to run in ruid, why would we have permission() then ?

It's how the standards require the call to be implemented. The
access(2) check verifies access to the pathname using the ruid not euid.
Part of valid access includes search access on the directory elements of
the full pathname. Those tests are done during __user_walk.

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