]> git.baikalelectronics.ru Git - 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)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 9 Feb 2018 19:30:00 +0000 (11:30 -0800)
commit49281b40f1e7ed05c362fc09aa73ef05b7c8e12c
tree14260d80410c7756c0b2898c2429ba41f06a8d5a
parent7e72cba50e933f3d7d3585d1d01e560029a9a9cd
apparmor: fix logging of the existence test for signals

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: d5082c6242b83 ("apparmor: fix off-by-one comparison on MAXMAPPED_SIG")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/include/sig_names.h
security/apparmor/ipc.c