]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selinux: rate-limit netlink message warnings in selinux_nlmsg_perm()
authorVladis Dronov <vdronov@redhat.com>
Thu, 24 Dec 2015 16:09:41 +0000 (11:09 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 11 Jun 2020 18:05:39 +0000 (19:05 +0100)
commit976dc007c4fde824b46cd40d001a17734ce9e333
tree964dd7a4968a4209da7de94e956b9088f6d51049
parentb122516be7a9cccceb48dc7ee6ff1717b39e6ae2
selinux: rate-limit netlink message warnings in selinux_nlmsg_perm()

commit 76319946f321e30872dd72af7de867cb26e7a373 upstream.

Any process is able to send netlink messages with invalid types.
Make the warning rate-limited to prevent too much log spam.

The warning is supposed to help to find misbehaving programs, so
print the triggering command name and pid.

Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
[PM: subject line tweak to make checkpatch.pl happy]
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
security/selinux/hooks.c