Re: Possible problem in linux file posix capabilities

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <charles.kirsch@...>
Cc: <serue@...>, Andrew Morgan <morgan@...>, lkml <linux-kernel@...>, <linux-security-module@...>, Gerald Combs <gerald@...>, Gilbert Ramirez <gram@...>, Guy Harris <guy@...>
Date: Sunday, February 17, 2008 - 6:48 pm

Quoting charles.kirsch@internet.lu (charles.kirsch@internet.lu):

Hi Charles,

thanks for the report.  Interesting.  I just downloaded the wireshark
source and as I suspected it's using capabilities.  The problem then is
that the helper starts as setuid root, sets just the capabilities it
needs, then changes back to it's original userid.  It's actually what
we'd like people to be doing.  But they then rely upon the traditional
setuid behavior of the unprivileged process being able to kill the
privileged one.  This is why checking suid instead of euid at
cap_task_kill() works for you.

Two quick fixes for you right now (apart from the one you've already
got :)  would be

	1. give wireshark cap_kill, by doing something like

		capset cap_kill=ep /bin/wireshark

	2. compile a kernel with SECURITY_FILE_CAPABILITIES=n

Andrew, this pretty much was bound to happen...  we need to figure out
what our approach here should be.  My preference is still to allow
signals when p->uid==current->uid so long as !SECURE_NOROOT.  Then as
people start using secure_noroot process trees they at least must know
what they're asking for.

An alternative stance is to accept these things as they come up and try
to quickly work with the authors of such programs to work around it.  I
suppose in a security sense that's the superior way :)  But it also
seems likely to lead to most people choosing option 2 above and not
bothering to fix the problem.

thanks,
-serge
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Possible problem in linux file posix capabilities, Serge E. Hallyn, (Sun Feb 17, 6:48 pm)
Re: Possible problem in linux file posix capabilities, Casey Schaufler, (Mon Feb 18, 1:17 am)
Re: Possible problem in linux file posix capabilities, Serge E. Hallyn, (Mon Feb 18, 9:44 am)
Re: Possible problem in linux file posix capabilities, Andrew G. Morgan, (Sun Feb 17, 9:20 pm)
Re: Possible problem in linux file posix capabilities, Serge E. Hallyn, (Sun Feb 17, 9:39 pm)
Re: Possible problem in linux file posix capabilities, Andrew G. Morgan, (Sun Feb 17, 9:55 pm)