Message ID | 20170201091310.22695-7-john.johansen@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c index 907d3f0..e780181 100644 --- a/security/apparmor/mount.c +++ b/security/apparmor/mount.c @@ -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; }
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> --- security/apparmor/mount.c | 1 + 1 file changed, 1 insertion(+)