]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: apparmor: fix oops in bind_mnt when dev_path lookup fails
authorJohn Johansen <john.johansen@canonical.com>
Sat, 3 Dec 2016 10:36:39 +0000 (02:36 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
Bind mounts can oops when devname lookup fails because the devname is
uninitialized and used in auditing the denial.

BugLink: http://bugs.launchpad.net/bugs/1660840
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
security/apparmor/mount.c

index 907d3f0a0278b58306e534ef85245c9875cd4d80..e78018172eab1066621f3a2298cc2cd558898057 100644 (file)
@@ -335,6 +335,7 @@ static int match_mnt_path_str(struct aa_profile *profile, const struct path *mnt
                goto audit;
        if (IS_ERR(devname)) {
                error = PTR_ERR(devname);
+               devname = NULL;
                info = devinfo;
                goto audit;
        }