]> git.baikalelectronics.ru Git - 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)
commit36464e768e18783e6a1e988c9fb3f591756dc7fd
tree187176b624ad9dfe857f6b2625426b9e7ac1d5d1
parentc46ab11cd561ce4b31c3c410a520be6c4bc9bcff
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: 4ffa78562052 ("apparmor: move resource checks to using labels")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/include/audit.h