]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.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)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 9 Feb 2018 19:30:00 +0000 (11:30 -0800)
commitb5beb07ad32ab533027aa988d96a44965ec116f7
tree187176b624ad9dfe857f6b2625426b9e7ac1d5d1
parent040d9e2bce0a5b321c402b79ee43a8e8d2fd3b06
apparmor: fix resource audit messages when auditing peer

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>
security/apparmor/include/audit.h