Re: [PATCH v3 06/11] rlimits: do security check under task_lock

From: Jiri Slaby
Date: Wed Jun 23 2010 - 17:35:45 EST


On 06/23/2010 07:56 PM, Oleg Nesterov wrote:
> On 06/23, Jiri Slaby wrote:
>> I still see no way how this is wrong. We want to check whether current
>> thread has capabilities to change (someone else's) rlimits.

You know, this is one of those sentences where you wonder what kind of
idiot wrote that. And then you find out it was you being totally off base.

> Yes. but what is "someone else" ?

I don't know what was I thinking of. Indeed you are correct. When I was
writing that I was somehow under the impression (dunno why) that 'p' is
current process and the code checks whether 'p' can do the change. But
we are indeed checking whether 'current' may change 'p's limits -- or
better, as you wrote, not of the thread 'p' itself, but of its whole
process.

I'll resend a new version with you all in CCs to see what we can do with
the patches, if anything.

thanks,
--
js
--
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/