]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
apparmor: fix resource audit messages when auditing peer
authorJohn Johansen <john.johansen@canonical.com>
Fri, 9 Feb 2018 12:57:39 +0000 (04:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Apr 2018 06:55:11 +0000 (08:55 +0200)
commit9d8a3dc99219cfffbb7e6cf97b97034b024f80c4
treecb2011369c40b3000e5f9aed2e8cbabe8747fe5c
parent93d36bc6569875951bdaad3cb92db54e8e4ac911
apparmor: fix resource audit messages when auditing peer

commit b5beb07ad32ab533027aa988d96a44965ec116f7 upstream.

Resource auditing is using the peer field which is not available
when the rlim data struct is used, because it is a different element
of the same union. Accessing peer during resource auditing could
cause garbage log entries or even oops the kernel.

Move the rlim data block into the same struct as the peer field
so they can be used together.

CC: <stable@vger.kernel.org>
Fixes: 86b92cb782b3 ("apparmor: move resource checks to using labels")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/apparmor/include/audit.h