]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - net/netlabel/netlabel_unlabeled.c
UBUNTU: SAUCE: LSM: Ensure the correct LSM context releaser
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 20 Aug 2020 18:47:01 +0000 (11:47 -0700)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:52 +0000 (08:24 +0100)
commitb1393bc060f8c43c113dc12ec819783d6e5e8903
tree11e39fdb609a5e85311c9477d48197508d2a98be
parent6afcff0a611a2768353e50319fabcacc1a41ea53
UBUNTU: SAUCE: LSM: Ensure the correct LSM context releaser

Add a new lsmcontext data structure to hold all the information
about a "security context", including the string, its size and
which LSM allocated the string. The allocation information is
necessary because LSMs have different policies regarding the
lifecycle of these strings. SELinux allocates and destroys
them on each use, whereas Smack provides a pointer to an entry
in a list that never goes away.

Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Cc: linux-integrity@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
15 files changed:
drivers/android/binder.c
fs/ceph/xattr.c
fs/nfs/nfs4proc.c
fs/nfsd/nfs4xdr.c
include/linux/security.h
include/net/scm.h
kernel/audit.c
kernel/auditsc.c
net/ipv4/ip_sockglue.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nfnetlink_queue.c
net/netlabel/netlabel_unlabeled.c
net/netlabel/netlabel_user.c
security/security.c