* Re: [PATCH] ptrace: it is fun to strace /sbin/init [not found] ` <1206455835.3302.185.camel@moss-spartans.epoch.ncsc.mil> @ 2008-03-25 18:06 ` Serge E. Hallyn [not found] ` <20080325180611.GB19176-6s5zFf/epYL1ENwx4SLHqw@public.gmane.org> 2008-03-25 21:55 ` Pavel Machek 0 siblings, 2 replies; 5+ messages in thread From: Serge E. Hallyn @ 2008-03-25 18:06 UTC (permalink / raw) To: Stephen Smalley Cc: Serge E. Hallyn, Oleg Nesterov, Pavel Machek, Andrew Morton, Eric W. Biederman, Pavel Emelyanov, Roland McGrath, linux-kernel, Chris Wright, Andrew Morgan, Linux Containers, Herbert Poetzl Quoting Stephen Smalley (sds@tycho.nsa.gov): > > On Tue, 2008-03-25 at 08:40 -0500, Serge E. Hallyn wrote: > > Quoting Stephen Smalley (sds@tycho.nsa.gov): > > > > > > On Tue, 2008-03-25 at 02:04 +0300, Oleg Nesterov wrote: > > > > On 03/24, Pavel Machek wrote: > > > > > > > > > > > /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? > > > > > > > > > > Maybe. Let's kill /sbin/init protection in 2.6.26. But making it > > > > > optional is wrong. > > > > > > > > You are right, the boot parameter is silly. How about sysctl? > > > > > > > > Stephen, do you see any security problems if we make /sbin/init > > > > ptraceable by default? > > > > > > Not an issue for SELinux (we apply an orthogonal check based on security > > > context, so we can already block ptrace of init independent of whether > > > root/CAP_SYS_PTRACE can do it). I'm not sure though as to whether > > > people using capabilities have ever relied on this special protection of > > > init (e.g. custom init spawns children with lesser capabilities and > > > relies on the fact that they cannot ptrace init to effectively re-gain > > > those capabilities, even if they possess CAP_SYS_PTRACE). > > > > Still thinking it through, but it seems like special casing init isn't > > useful. There are likely to be other tasks with all capabilities > > set which the malicious task could just as well ptrace to do his > > mischief, right? > > Depends on the bounding set. Didn't it used to be the case that only > init had CAP_SETPCAP (until the meaning of it was changed by the > filesystem capability support)? Not quite. CAP_SETPCAP was taken out of everyone's bounding set. But kernel/sysctl.c allowed only init to add capabilities to the bounding set. (Whereas CAP_SYS_MODULE was sufficient to remove them). > Might want to double check with e.g. the vservers folks that they > weren't relying in any way on special handling of init. Herbert, Pavel, do you have objections to allowing ptrace of init? (I believe Eric has already Acked the idea iirc?) thanks, -serge ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20080325180611.GB19176-6s5zFf/epYL1ENwx4SLHqw@public.gmane.org>]
* Re: [PATCH] ptrace: it is fun to strace /sbin/init [not found] ` <20080325180611.GB19176-6s5zFf/epYL1ENwx4SLHqw@public.gmane.org> @ 2008-03-25 19:07 ` Herbert Poetzl 2008-03-26 15:47 ` Pavel Emelyanov 1 sibling, 0 replies; 5+ messages in thread From: Herbert Poetzl @ 2008-03-25 19:07 UTC (permalink / raw) To: Serge E. Hallyn Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chris Wright, Andrew Morgan, Eric W. Biederman, Pavel Machek, Linux Containers, Andrew Morton, Stephen Smalley, Oleg Nesterov, Roland McGrath, Pavel Emelyanov On Tue, Mar 25, 2008 at 01:06:11PM -0500, Serge E. Hallyn wrote: > Quoting Stephen Smalley (sds-+05T5uksL2qpZYMLLGbcSA@public.gmane.org): > > > > On Tue, 2008-03-25 at 08:40 -0500, Serge E. Hallyn wrote: > > > Quoting Stephen Smalley (sds-+05T5uksL2qpZYMLLGbcSA@public.gmane.org): > > > > > > > > On Tue, 2008-03-25 at 02:04 +0300, Oleg Nesterov wrote: > > > > > On 03/24, Pavel Machek wrote: > > > > > > > > > > > > > /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? > > > > > > > > > > > > Maybe. Let's kill /sbin/init protection in 2.6.26. But making it > > > > > > optional is wrong. > > > > > > > > > > You are right, the boot parameter is silly. How about sysctl? > > > > > > > > > > Stephen, do you see any security problems if we make /sbin/init > > > > > ptraceable by default? > > > > > > > > Not an issue for SELinux (we apply an orthogonal check based on security > > > > context, so we can already block ptrace of init independent of whether > > > > root/CAP_SYS_PTRACE can do it). I'm not sure though as to whether > > > > people using capabilities have ever relied on this special protection of > > > > init (e.g. custom init spawns children with lesser capabilities and > > > > relies on the fact that they cannot ptrace init to effectively re-gain > > > > those capabilities, even if they possess CAP_SYS_PTRACE). > > > > > > Still thinking it through, but it seems like special casing init isn't > > > useful. There are likely to be other tasks with all capabilities > > > set which the malicious task could just as well ptrace to do his > > > mischief, right? > > > > Depends on the bounding set. Didn't it used to be the case that only > > init had CAP_SETPCAP (until the meaning of it was changed by the > > filesystem capability support)? > > Not quite. CAP_SETPCAP was taken out of everyone's bounding set. But > kernel/sysctl.c allowed only init to add capabilities to the bounding > set. (Whereas CAP_SYS_MODULE was sufficient to remove them). > > > Might want to double check with e.g. the vservers folks that they > > weren't relying in any way on special handling of init. > > Herbert, Pavel, do you have objections to allowing ptrace of init? > (I believe Eric has already Acked the idea iirc?) inside a guest, by default no (i.e. there simply is no capability for that), on the host the behaviour is unmodified .. note that there are guests without init where the blend through init is protected in a special way HTH, Herbert > thanks, > -serge ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ptrace: it is fun to strace /sbin/init [not found] ` <20080325180611.GB19176-6s5zFf/epYL1ENwx4SLHqw@public.gmane.org> 2008-03-25 19:07 ` Herbert Poetzl @ 2008-03-26 15:47 ` Pavel Emelyanov 1 sibling, 0 replies; 5+ messages in thread From: Pavel Emelyanov @ 2008-03-26 15:47 UTC (permalink / raw) To: Serge E. Hallyn Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chris Wright, Andrew Morgan, Eric W. Biederman, Pavel Machek, Linux Containers, Andrew Morton, Stephen Smalley, Oleg Nesterov, Roland McGrath [snip] > Herbert, Pavel, do you have objections to allowing ptrace of init? > (I believe Eric has already Acked the idea iirc?) I 100% agree with the patch. And I always say this to Oleg about all his patches :) > thanks, > -serge > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ptrace: it is fun to strace /sbin/init 2008-03-25 18:06 ` [PATCH] ptrace: it is fun to strace /sbin/init Serge E. Hallyn [not found] ` <20080325180611.GB19176-6s5zFf/epYL1ENwx4SLHqw@public.gmane.org> @ 2008-03-25 21:55 ` Pavel Machek 2008-03-26 15:31 ` Andrew Morgan 1 sibling, 1 reply; 5+ messages in thread From: Pavel Machek @ 2008-03-25 21:55 UTC (permalink / raw) To: Serge E. Hallyn Cc: Stephen Smalley, Oleg Nesterov, Andrew Morton, Eric W. Biederman, Pavel Emelyanov, Roland McGrath, linux-kernel, Chris Wright, Andrew Morgan, Linux Containers, Herbert Poetzl Hi! > > Might want to double check with e.g. the vservers folks that they > > weren't relying in any way on special handling of init. > > Herbert, Pavel, do you have objections to allowing ptrace of init? > (I believe Eric has already Acked the idea iirc?) No problem from me... (..but do not introduce command line option or sysctl. It is not worth it). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html pomozte zachranit klanovicky les: http://www.ujezdskystrom.info/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ptrace: it is fun to strace /sbin/init 2008-03-25 21:55 ` Pavel Machek @ 2008-03-26 15:31 ` Andrew Morgan 0 siblings, 0 replies; 5+ messages in thread From: Andrew Morgan @ 2008-03-26 15:31 UTC (permalink / raw) To: Pavel Machek Cc: Serge E. Hallyn, Stephen Smalley, Oleg Nesterov, Andrew Morton, Eric W. Biederman, Pavel Emelyanov, Roland McGrath, linux-kernel, Chris Wright, Linux Containers, Herbert Poetzl -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 FWIW. I completely concur. Pavel Machek wrote: |> Herbert, Pavel, do you have objections to allowing ptrace of init? |> (I believe Eric has already Acked the idea iirc?) | | No problem from me... | | (..but do not introduce command line option or sysctl. It is not worth it). Cheers Andrew -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH6mw8+bHCR3gb8jsRAsKjAJ40JnoyrqGzgIZPgz5gv9uqeeiZ1wCdFKSv snEU/yiVdWQ4cGSwbU3A8Hg= =xArK -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-26 15:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080323135110.GA294@tv-sign.ru>
[not found] ` <20080324160102.GB4069@atrey.karlin.mff.cuni.cz>
[not found] ` <20080324164059.GA4767@tv-sign.ru>
[not found] ` <20080324223925.GD2426@elf.ucw.cz>
[not found] ` <20080324230458.GA173@tv-sign.ru>
[not found] ` <1206446637.3302.134.camel@moss-spartans.epoch.ncsc.mil>
[not found] ` <20080325134001.GB5984@sergelap.austin.rr.com>
[not found] ` <1206455835.3302.185.camel@moss-spartans.epoch.ncsc.mil>
2008-03-25 18:06 ` [PATCH] ptrace: it is fun to strace /sbin/init Serge E. Hallyn
[not found] ` <20080325180611.GB19176-6s5zFf/epYL1ENwx4SLHqw@public.gmane.org>
2008-03-25 19:07 ` Herbert Poetzl
2008-03-26 15:47 ` Pavel Emelyanov
2008-03-25 21:55 ` Pavel Machek
2008-03-26 15:31 ` Andrew Morgan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox