Re: [PATCH 2/2] proc,security: move restriction on writing /proc/pid/attr nodes to proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 21, 2016 at 2:04 AM, José Bollo <jobol@xxxxxxxxxxx> wrote:
> Le mardi 20 décembre 2016 à 21:37 -0500, Paul Moore a écrit :
>> On Fri, Dec 16, 2016 at 12:41 PM, Stephen Smalley <sds@xxxxxxxxxxxxx>
>> wrote:
>> > Processes can only alter their own security attributes via
>> > /proc/pid/attr nodes.  This is presently enforced by each
>> > individual
>> > security module and is also imposed by the Linux credentials
>> > implementation, which only allows a task to alter its own
>> > credentials.
>> > Move the check enforcing this restriction from the individual
>> > security modules to proc_pid_attr_write() before calling the
>> > security hook,
>> > and drop the unnecessary task argument to the security hook since
>> > it can
>> > only ever be the current task.
>> >
>> > Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
>> > ---
>> >  fs/proc/base.c             | 13 +++++++++----
>> >  include/linux/lsm_hooks.h  |  3 +--
>> >  include/linux/security.h   |  4 ++--
>> >  security/apparmor/lsm.c    |  7 ++-----
>> >  security/security.c        |  4 ++--
>> >  security/selinux/hooks.c   | 13 +------------
>> >  security/smack/smack_lsm.c | 11 +----------
>> >  7 files changed, 18 insertions(+), 37 deletions(-)
>>
>> Merged into the selinux#next branch.
>
> is it fair?

I believe so, yes.  As many have already mentioned, this patch doesn't
introduce a new restriction, it simply cleans up an existing
restriction.  If/when PTAGS is merged upstream it can make any changes
needed as long as those changes do not cause a regression in the
safety or behavior of the existing LSMs and the kernel as a whole.

-- 
paul moore
www.paul-moore.com

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux