Commit 024dce01 authored by John Johansen's avatar John Johansen Committed by Thadeu Lima de Souza Cascardo

UBUNTU: SAUCE: apparmor: fix oops in bind_mnt when dev_path lookup fails

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/1660840Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 38567b0e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment