apparmor: Fix abi check to include v8 abi
authorJohn Johansen <john.johansen@canonical.com>
Sat, 7 May 2022 01:57:12 +0000 (18:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:21 +0000 (13:14 +0100)
commitd567776ae28963ce963f79dcebc32af78ba975c8
tree493609478e8ee3cd25f9472529e6d413e0577aff
parentbc9d2cbbdcd3fe36e15dedcf3af6ce98cac0267f
apparmor: Fix abi check to include v8 abi

[ Upstream commit 1b5a6198f5a9d0aa5497da0dc4bcd4fc166ee516 ]

The v8 abi is supported by the kernel but the userspace supported
version check does not allow for it. This was missed when v8 was added
due to a bug in the userspace compiler which was setting an older abi
version for v8 encoding (which is forward compatible except on the
network encoding). However it is possible to detect the network
encoding by checking the policydb network support which the code
does. The end result was that missing the abi flag worked until
userspace was fixed and began correctly checking for the v8 abi
version.

Fixes: 56974a6fcfef ("apparmor: add base infastructure for socket mediation")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/apparmor/policy_unpack.c