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]
Message-ID: <20090225235409.GA2443@hallyn.com>
Date:	Wed, 25 Feb 2009 17:54:09 -0600
From:	"Serge E. Hallyn" <serge@...lyn.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Roland McGrath <roland@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Chris Evans <scarybeasts@...il.com>,
	David Howells <dhowells@...hat.com>,
	Don Howard <dhoward@...hat.com>,
	Eugene Teo <eugene@...hat.com>,
	Michael Kerrisk <mtk.manpages@...glemail.com>,
	Tavis Ormandy <taviso@....lonestar.org>,
	Vitaly Mayatskikh <vmayatsk@...hat.com>, stable@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] exit_notify: kill the wrong capable(CAP_KILL) check

Quoting Oleg Nesterov (oleg@...hat.com):
> On 02/25, Serge E. Hallyn wrote:
> >
> > Quoting Oleg Nesterov (oleg@...hat.com):
> > > On 02/25, Serge E. Hallyn wrote:
> > > >
> > > > Quoting Oleg Nesterov (oleg@...hat.com):
> > > > > On 02/25, Serge E. Hallyn wrote:
> > > > > Can't understand... Why do you think CAP_KILL makes things better?
> > > > >
> > > > > Actually, how can it make any difference in this case?
> > > >
> > > > Well the check by itself isn't quite right - it seems to me it
> > > > should also check whether tsk->euid == parent->uid.  But letting
> > > > an unprivileged task send SIGSTOP to a privileged one bc of
> > > > some fluke in the task hierarchy doesn't seem right.
> > >
> > > I think you misread this CAP_KILL check.
> > >
> > > It does not restrict the unprivileged task to send the signal. Instead,
> > > if the exiting task has CAP_KILL, we bypass other security checks.
> >
> > ?  If the exiting task does not have CAP_KILL,
> 
> _and_ (not "or") the execution domains for parent/chils are different,
> 
> > we set the signal to
> > SIGCHILD (which is deemed safe).
> 
> Yes. So why we should not set the signal to SIGCHLD if the task has
> CAP_KILL ?

Yeah, you're right,  I wasn't thinking right.

> And again, the malicious application can exec the setuid binary before
> exit, in this case we never reset ->exit_signal (of course, unless
> that binary drops CAP_KILL).

Heh, thanks for taking the time to set me straight.

Acked-by: Serge Hallyn <serue@...ibm.com>

Thanks.

-serge
--
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