mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
apparmor: fix NULL pointer dereference in unpack_pdb
pdb->dfa could be NULL if unpack_dfa fails, causing a NULL pointer
dereference.
Fixes: 2e12c5f060 ("apparmor: add additional flags to extended permission.")
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
716d384ac7
commit
7681ca43d2
|
|
@ -1045,7 +1045,7 @@ static int unpack_pdb(struct aa_ext *e, struct aa_policydb **policy,
|
|||
}
|
||||
|
||||
/* accept2 is in some cases being allocated, even with perms */
|
||||
if (pdb->perms && !pdb->dfa->tables[YYTD_ID_ACCEPT2]) {
|
||||
if (pdb->dfa && pdb->perms && !pdb->dfa->tables[YYTD_ID_ACCEPT2]) {
|
||||
/* add dfa flags table missing in v2 */
|
||||
u32 noents = pdb->dfa->tables[YYTD_ID_ACCEPT]->td_lolen;
|
||||
u16 tdflags = pdb->dfa->tables[YYTD_ID_ACCEPT]->td_flags;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user