]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var
authorJohn Johansen <john.johansen@canonical.com>
Wed, 15 Feb 2017 23:13:50 +0000 (15:13 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 8 Mar 2017 13:35:49 +0000 (10:35 -0300)
The lperms struct is uninitialized for use with auditing if there is
an early failure due to a path name error. This can result in incorrect
logging or in the extreme case apparmor killing the task with a signal
which results in the failure in the referenced bug.

BugLink: http://bugs.launchpad.net/bugs/1664912
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
security/apparmor/file.c

index 1d049da7cc37a72c766c91b4e02a7774e6b5f8d6..646d3effd0f9ff31010b55b6d9e14b0aed7af40c 100644 (file)
@@ -374,7 +374,7 @@ static int profile_path_link(struct aa_profile *profile,
                             struct path_cond *cond)
 {
        const char *lname, *tname = NULL;
-       struct aa_perms lperms, perms;
+       struct aa_perms lperms = {}, perms;
        const char *info = NULL;
        u32 request = AA_MAY_LINK;
        unsigned int state;