Re: [PATCH] exec: Only allow a threaded init to exec from the thread_group_leader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pavel Machek <[email protected]> writes:

> On Ne 29-01-06 02:48:31, Andrew Morton wrote:
>> [email protected] (Eric W. Biederman) wrote:
>> >
>> >  If process id namespaces become a reality init stops being
>> >  terribly special, and becomes something you may have several
>> >  of running at any one time.  If one of those inits is compromised
>> >  by a hostile user I having the whole system go down so we can
>> >  avoid executing a cheap test sounds terribly wrong.  That is
>> >  why I really care.
>> 
>> Wouldn't it be better to do nothing until/unless there's some code in the
>> kernel or init which actually needs the change?

Well I think deliberate kernel bugs should at least be accompanied by
a big fat warning in the code, and an explanation of what is happening
and why.

> It is common to do init=/bin/bash, and I guess people are doing it
> with all kinds of wonderful apps....

So it is just a matter of time before someone actually hits this.

I went back through and tested and the actual symptoms are weird.
The thread calling exec just hangs forever, waiting for pid == 1 to
exit.  Anyway I found a simple fix so it is probably better to fix
it than to paper over the problem anyway.

Patch follows in a minute.

Eric



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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux