From: gregkh@linuxfoundation.org (Greg KH)
To: linux-security-module@vger.kernel.org
Subject: [PATCH] usb,signal,security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill
Date: Sat, 9 Sep 2017 07:05:52 +0200 [thread overview]
Message-ID: <20170909050552.GD3713@kroah.com> (raw)
In-Reply-To: <20170908164001.21138-1-sds@tycho.nsa.gov>
On Fri, Sep 08, 2017 at 12:40:01PM -0400, Stephen Smalley wrote:
> commit d178bc3a708f39cbfefc3fab37032d3f2511b4ec ("user namespace: usb:
> make usb urbs user namespace aware (v2)") changed kill_pid_info_as_uid
> to kill_pid_info_as_cred, saving and passing a cred structure instead of
> uids. Since the secid can be obtained from the cred, drop the secid fields
> from the usb_dev_state and async structures, and drop the secid argument to
> kill_pid_info_as_cred. Replace the secid argument to security_task_kill
> with the cred. Update SELinux, Smack, and AppArmor to use the cred, which
> avoids the need for Smack and AppArmor to use a secid at all in this hook.
> Further changes to Smack might still be required to take full advantage of
> this change, since it should now be possible to perform capability
> checking based on the supplied cred. The changes to Smack and AppArmor
> have only been compile-tested.
>
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> drivers/usb/core/devio.c | 10 ++--------
> include/linux/lsm_hooks.h | 5 +++--
> include/linux/sched/signal.h | 2 +-
> include/linux/security.h | 4 ++--
> kernel/signal.c | 6 +++---
> security/apparmor/lsm.c | 17 ++++++++++++-----
> security/security.c | 4 ++--
> security/selinux/hooks.c | 7 +++++--
> security/smack/smack_lsm.c | 12 +++++-------
> 9 files changed, 35 insertions(+), 32 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: james.l.morris@oracle.com, serge@hallyn.com, paul@paul-moore.com,
casey@schaufler-ca.com, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov
Subject: Re: [PATCH] usb, signal, security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill
Date: Sat, 9 Sep 2017 07:05:52 +0200 [thread overview]
Message-ID: <20170909050552.GD3713@kroah.com> (raw)
In-Reply-To: <20170908164001.21138-1-sds@tycho.nsa.gov>
On Fri, Sep 08, 2017 at 12:40:01PM -0400, Stephen Smalley wrote:
> commit d178bc3a708f39cbfefc3fab37032d3f2511b4ec ("user namespace: usb:
> make usb urbs user namespace aware (v2)") changed kill_pid_info_as_uid
> to kill_pid_info_as_cred, saving and passing a cred structure instead of
> uids. Since the secid can be obtained from the cred, drop the secid fields
> from the usb_dev_state and async structures, and drop the secid argument to
> kill_pid_info_as_cred. Replace the secid argument to security_task_kill
> with the cred. Update SELinux, Smack, and AppArmor to use the cred, which
> avoids the need for Smack and AppArmor to use a secid at all in this hook.
> Further changes to Smack might still be required to take full advantage of
> this change, since it should now be possible to perform capability
> checking based on the supplied cred. The changes to Smack and AppArmor
> have only been compile-tested.
>
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> drivers/usb/core/devio.c | 10 ++--------
> include/linux/lsm_hooks.h | 5 +++--
> include/linux/sched/signal.h | 2 +-
> include/linux/security.h | 4 ++--
> kernel/signal.c | 6 +++---
> security/apparmor/lsm.c | 17 ++++++++++++-----
> security/security.c | 4 ++--
> security/selinux/hooks.c | 7 +++++--
> security/smack/smack_lsm.c | 12 +++++-------
> 9 files changed, 35 insertions(+), 32 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: james.l.morris@oracle.com, serge@hallyn.com, paul@paul-moore.com,
casey@schaufler-ca.com, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov
Subject: Re: [PATCH] usb,signal,security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill
Date: Sat, 9 Sep 2017 07:05:52 +0200 [thread overview]
Message-ID: <20170909050552.GD3713@kroah.com> (raw)
In-Reply-To: <20170908164001.21138-1-sds@tycho.nsa.gov>
On Fri, Sep 08, 2017 at 12:40:01PM -0400, Stephen Smalley wrote:
> commit d178bc3a708f39cbfefc3fab37032d3f2511b4ec ("user namespace: usb:
> make usb urbs user namespace aware (v2)") changed kill_pid_info_as_uid
> to kill_pid_info_as_cred, saving and passing a cred structure instead of
> uids. Since the secid can be obtained from the cred, drop the secid fields
> from the usb_dev_state and async structures, and drop the secid argument to
> kill_pid_info_as_cred. Replace the secid argument to security_task_kill
> with the cred. Update SELinux, Smack, and AppArmor to use the cred, which
> avoids the need for Smack and AppArmor to use a secid at all in this hook.
> Further changes to Smack might still be required to take full advantage of
> this change, since it should now be possible to perform capability
> checking based on the supplied cred. The changes to Smack and AppArmor
> have only been compile-tested.
>
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> drivers/usb/core/devio.c | 10 ++--------
> include/linux/lsm_hooks.h | 5 +++--
> include/linux/sched/signal.h | 2 +-
> include/linux/security.h | 4 ++--
> kernel/signal.c | 6 +++---
> security/apparmor/lsm.c | 17 ++++++++++++-----
> security/security.c | 4 ++--
> security/selinux/hooks.c | 7 +++++--
> security/smack/smack_lsm.c | 12 +++++-------
> 9 files changed, 35 insertions(+), 32 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev parent reply other threads:[~2017-09-09 5:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 16:40 [PATCH] usb, signal, security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill Stephen Smalley
2017-09-08 16:40 ` [PATCH] usb,signal,security: " Stephen Smalley
2017-09-08 16:40 ` [PATCH] usb, signal, security: " Stephen Smalley
2017-09-08 16:52 ` [PATCH] usb,signal,security: " Casey Schaufler
2017-09-08 16:52 ` Casey Schaufler
2017-09-08 16:52 ` [PATCH] usb, signal, security: " Casey Schaufler
2017-09-08 17:11 ` [PATCH] usb,signal,security: " Paul Moore
2017-09-08 17:11 ` Paul Moore
2017-09-08 17:11 ` [PATCH] usb, signal, security: " Paul Moore
2017-09-08 22:09 ` [PATCH] usb,signal,security: " James Morris
2017-09-08 22:09 ` James Morris
2017-09-08 22:09 ` [PATCH] usb, signal, security: " James Morris
2018-03-06 19:01 ` [PATCH] usb,signal,security: " Paul Moore
2018-03-06 19:01 ` Paul Moore
2018-03-06 19:01 ` [PATCH] usb, signal, security: " Paul Moore
2018-03-06 19:28 ` [PATCH] usb,signal,security: " Casey Schaufler
2018-03-06 19:28 ` Casey Schaufler
2018-03-06 19:28 ` [PATCH] usb, signal, security: " Casey Schaufler
2018-03-06 22:10 ` [PATCH] usb,signal,security: " James Morris
2018-03-06 22:10 ` James Morris
2018-03-06 22:10 ` [PATCH] usb, signal, security: " James Morris
2017-09-08 22:27 ` [PATCH] usb,signal,security: " Casey Schaufler
2017-09-08 22:27 ` Casey Schaufler
2017-09-08 22:27 ` [PATCH] usb, signal, security: " Casey Schaufler
2017-09-09 5:05 ` Greg KH [this message]
2017-09-09 5:05 ` [PATCH] usb,signal,security: " Greg KH
2017-09-09 5:05 ` [PATCH] usb, signal, security: " Greg KH
[not found] ` <1504889003.30607.6.camel@tycho.nsa.gov>
2017-09-09 7:14 ` [Fwd: [PATCH] usb,signal,security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill] John Johansen
2017-09-09 7:14 ` John Johansen
2017-09-09 7:14 ` [Fwd: [PATCH] usb, signal, security: " John Johansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170909050552.GD3713@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.