Re: [PATCH 2.6.5-mm4] sys_access race fix

From: Fabian Frederick
Date: Tue Apr 13 2004 - 14:11:19 EST


On Tue, 2004-04-13 at 20:50, Chris Wright wrote:
> * Fabian Frederick (Fabian.Frederick@xxxxxxxxx) wrote:
> > Andrew,
> >
> > I'm trying to remove the race in sys_access code.
> > AFAICS, fsuid is checked in "permission" level so I pushed real
fsuid
> > capture forward.At that state, I can task_lock (which was impossible
> > before user_walk).Could you tell me if I can improve this one ?
>
> This changes the semantics of the directory checks implicit
> during the pathname resolution.

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 ?

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

Regards,
Fabian

> thanks,
> -chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/