]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selinux: properly handle multiple messages in selinux_netlink_send()
authorPaul Moore <paul@paul-moore.com>
Tue, 28 Apr 2020 13:59:02 +0000 (09:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 May 2020 17:13:25 +0000 (19:13 +0200)
commit92b5848736395f4ea56738895acdd09cdc2a93da
tree45eb014dffa2c18becd7e9b3fdeac0901a363958
parent9e68a660e95d34cdb30be9e3312b136b1305ed21
selinux: properly handle multiple messages in selinux_netlink_send()

commit fb73974172ffaaf57a7c42f35424d9aece1a5af6 upstream.

Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control.  Prior to this patch, SELinux only inspected
the first message in the sk_buff.

Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/selinux/hooks.c