]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
apparmor: fix unpack_tags to properly return error in failure cases
authorJohn Johansen <john.johansen@canonical.com>
Tue, 14 Apr 2026 02:56:26 +0000 (19:56 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 23 Apr 2026 03:02:46 +0000 (20:02 -0700)
commit72971e6f745ad5c366629b0affbe3a6b619dcd8b
tree71d5a096e65177064b7db38eb1c16574d3b2d17d
parentf17b68f0c33ff184713c356cd024035d437bac8c
apparmor: fix unpack_tags to properly return error in failure cases

error is initialized to -EPROTO but set by some of the internal
functions, unfortunately the last two checks assume error is set to
-EPROTO already for the failure case. Ensure it is by setting it
before these checks.

Fixes: 3d28e2397af7a ("apparmor: add support loading per permission tagging")
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy_unpack.c