[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080225200328.GA83@tv-sign.ru>
Date: Mon, 25 Feb 2008 23:03:28 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Stephen Smalley <sds@...ho.nsa.gov>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Casey Schaufler <casey@...aufler-ca.com>,
David Quigley <dpquigl@...ho.nsa.gov>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Eric Paris <eparis@...hat.com>,
Harald Welte <laforge@...monks.org>,
Pavel Emelyanov <xemul@...nvz.org>,
"Serge E. Hallyn" <serue@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] kill_pid_info_as_uid: don't use security_task_kill()
On 02/25, Stephen Smalley wrote:
>
> On Mon, 2008-02-25 at 20:42 +0300, Oleg Nesterov wrote:
> > kill_pid_info_as_uid() is solely used by drivers/usb/core/. The original
> > "[PATCH] Fix signal sending in usbdevio on async URB completion" commit
> > 46113830a18847cff8da73005e57bc49c2f95a56 was right, but nowadays we use
> > struct pid and this solves most of the addressed problems.
> >
> > It would be nice to use kill_pid_info() instead, but we can't because USB
> > uses .si_code = SI_ASYNCIO which fools SI_FROMUSER() and thus security checks.
> >
> > I think we should omit the permission checks completely, the task which does
> > ioctl(USBDEVFS_SUBMITURB) explicitly asks to send the signal to it, we should
> > not deny the signal even if the task changes its credentials in any way.
>
> If we are applying checks based on uid/gid to protect suid/sgid
> programs, then we ought to also invoke the LSM hook to allow protection
> of other credential-changing transformations, like SELinux context
> transitions. You either remove all checking or none, please.
Yes, you are right. I'd like to remove all uid/euid checks. This patch doesn't
do this because
- perhaps it will be possible to kill this helper
- if we remove these checks, we should do some subsequent cleanups
in drivers/usb/core/, while this series is all about LSM hooks.
I am going to do this later.
> And if all, what's the rationale?
I think it is not good that LSM has some special (and unneeded!) hacks for USB.
Please also look at the next patch.
Do you agree?
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