]> git.baikalelectronics.ru Git - kernel.git/commit
LSM: SafeSetID: fix userns handling in securityfs
authorJann Horn <jannh@google.com>
Wed, 10 Apr 2019 16:55:58 +0000 (09:55 -0700)
committerMicah Morton <mortonm@chromium.org>
Mon, 15 Jul 2019 15:07:19 +0000 (08:07 -0700)
commitb2490422f5724f5b457fcaff33557c56694b0e0a
treefb3a1ee4a8b7cdec81b2f0671524a25af4b5b016
parentf06abcf255876114f0dc3b6256ec2224902e05e9
LSM: SafeSetID: fix userns handling in securityfs

Looking at current_cred() in write handlers is bad form, stop doing that.

Also, let's just require that the write is coming from the initial user
namespace. Especially SAFESETID_WHITELIST_FLUSH requires privilege over all
namespaces, and SAFESETID_WHITELIST_ADD should probably require it as well.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
security/safesetid/securityfs.c