Re: [PATCH] futex: futex_find_get_task make credentials checkconditional

From: Michal Hocko
Date: Wed Jun 30 2010 - 03:01:26 EST


On Tue 29-06-10 09:41:02, Linus Torvalds wrote:
> On Tue, Jun 29, 2010 at 1:42 AM, Michal Hocko <mhocko@xxxxxxx> wrote:
> >
> > futex_find_get_task is currently used (through lookup_pi_state) from two
> > contexts, futex_requeue and futex_lock_pi_atomic. While credentials check
> > makes sense in the first code path, the second one is more problematic
> > because this check requires that the PI lock holder (pid parameter) has
> > the same uid and euid as the process's euid which is trying to lock the
> > same futex (current).
>
> So exactly why does it make sense to check the credentials in the
> first code path then?

I though that requeue needs this for security reasons (don't let requeue
process for other user), but when I thought about that again you are
right and the only what matters should be accessibility of the shared
memory.


--
Michal Hocko
L3 team
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
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/