lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Mar 2008 19:40:59 +0300
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Pavel Machek <pavel@....cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Emelyanov <xemul@...nvz.org>,
	Stephen Smalley <sds@...ho.nsa.gov>,
	Roland McGrath <roland@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ptrace: it is fun to strace /sbin/init

On 03/24, Pavel Machek wrote:
> 
> > Ptracing of /sbin/init is not allowed. Of course, this is dangerous, but may
> > be useful. Introduce the kernel boot parameter to allow this, so that we can't
> > surprise some special/secured systems.
> > 
> > Afaics, with the recent changes there is no kernel problems with ptracing init,
> > it can't lose SIGNAL_UNKILLABLE flag and be killed by accident. However, admin
> > should know what it does, "gdb /sbin/init 1" stops init, it can't
> > reap zombies
> 
> It can't be killed, but you can stop it and not ever restart it. From
> that point on, zombies will accumulate until we OOM, right?

Right (only re-parented ones and init's childs but still right),

> > @@ -803,6 +803,8 @@ and is between 256 and 4096 characters. 
> >  			Run specified binary instead of /sbin/init as init
> >  			process.
> >  
> > +	init_ptrace	[KNL] Allows to ptrace init.
> > +
> 
> No words about it being dangerous, but I believe it is.

it is, admin should know what he does,

> If it is not, lets do the patch, but not optional.

This will change the default historical behaviour, I can't predict
does this matter for (say) SELinux or not. Otherwise I'd personally
prefer to always allow to ptrace init.

> If it is dangerous, option does not make it better.

ptrace() is always dangerous. ptracer can crash oracle and lose data.

/sbin/init is important, but there are other important (and sometimes
much more important) services. Why it is so special so that we can't
debug/strace it?

(how many times did you try to figure out why init does _not_ work
 as expected ?)

Oleg.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ