apparmor: fix oops in profile_unpack() when policy_db is not present
commit 5f20fdfed16bc599a325a145bf0123a8e1c9beea upstream. BugLink: http://bugs.launchpad.net/bugs/1592547 If unpack_dfa() returns NULL due to the dfa not being present, profile_unpack() is not checking if the dfa is not present (NULL). Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
committed by
Willy Tarreau
parent
4b0f1ec2fa
commit
1259d17c10
@@ -571,6 +571,9 @@ static struct aa_profile *unpack_profile(struct aa_ext *e)
|
||||
error = PTR_ERR(profile->policy.dfa);
|
||||
profile->policy.dfa = NULL;
|
||||
goto fail;
|
||||
} else if (!profile->policy.dfa) {
|
||||
error = -EPROTO;
|
||||
goto fail;
|
||||
}
|
||||
if (!unpack_u32(e, &profile->policy.start[0], "start"))
|
||||
/* default start state */
|
||||
|
||||
Reference in New Issue
Block a user