Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1
+1
security/apparmor/policy_unpack.c
··· 863 863 *info = "failed to unpack profile tag.sets"; 864 864 goto fail; 865 865 } 866 + error = -EPROTO; 866 867 if (!aa_unpack_nameX(e, AA_STRUCTEND, NULL)) 867 868 goto fail; 868 869