]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
apparmor: fix logging of the existence test for signals
authorJohn Johansen <john.johansen@canonical.com>
Thu, 1 Feb 2018 10:24:10 +0000 (11:24 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Apr 2018 15:34:44 +0000 (10:34 -0500)
commitae27b1709dada9636609d2c70b2067fe259b441b
tree3517cb82a4c700713ede59fdc7d35033ef6e14ce
parent2518af4ba405c614f53419ad75e72a929608e56c
apparmor: fix logging of the existence test for signals

BugLink: http://bugs.launchpad.net/bugs/1763427
The existence test is not being properly logged as the signal mapping
maps it to the last entry in the named signal table. This is done
to help catch bugs by making the 0 mapped signal value invalid so
that we can catch the signal value not being filled in.

When fixing the off-by-one comparision logic the reporting of the
existence test was broken, because the logic behind the mapped named
table was hidden. Fix this by adding a define for the name lookup
and using it.

Cc: Stable <stable@vger.kernel.org>
Fixes: f7dc4c9a855a1 ("apparmor: fix off-by-one comparison on MAXMAPPED_SIG")
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 98cf5bbff413eadf1b9cb195a7b80cc61c72a50e
 git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/apparmor/include/sig_names.h
security/apparmor/ipc.c