OSDN Git Service

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)
committerPaul Moore <paul@paul-moore.com>
Thu, 30 Apr 2020 20:18:37 +0000 (16:18 -0400)
commitfb73974172ffaaf57a7c42f35424d9aece1a5af6
tree709665d3970193b6f393131418bbbdd0fa26e0f4
parent292fed1fc89509bab2c0b291d5d395dea5b6ab2f
selinux: properly handle multiple messages in selinux_netlink_send()

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>
security/selinux/hooks.c