mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
audit: fix possible null-pointer dereference in audit_filter_rules
commit 6e3ee990c90494561921c756481d0e2125d8b895 upstream.
Fix possible null-pointer dereference in audit_filter_rules.
audit_filter_rules() error: we previously assumed 'ctx' could be null
Cc: [email protected]
Fixes: bf361231c2 ("audit: add saddr_fam filter field")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Gaosheng Cui <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
c974f2f92c
commit
d6f451f1f6
1 changed files with 1 additions and 1 deletions
|
|
@ -624,7 +624,7 @@ static int audit_filter_rules(struct task_struct *tsk,
|
|||
result = audit_comparator(audit_loginuid_set(tsk), f->op, f->val);
|
||||
break;
|
||||
case AUDIT_SADDR_FAM:
|
||||
if (ctx->sockaddr)
|
||||
if (ctx && ctx->sockaddr)
|
||||
result = audit_comparator(ctx->sockaddr->ss_family,
|
||||
f->op, f->val);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue