diff options
author | Linus Torvalds | 2021-10-20 06:11:17 -1000 |
---|---|---|
committer | Linus Torvalds | 2021-10-20 06:11:17 -1000 |
commit | 6da52dead8f59fcf81e19ad3937d903a9b87e1de (patch) | |
tree | 5e30679b1787126eb6a1dd58239dc1bc5a750f40 /kernel | |
parent | fc9b289344b845576aedefe0691a4210987f3711 (diff) | |
parent | 6e3ee990c90494561921c756481d0e2125d8b895 (diff) |
Merge tag 'audit-pr-20211019' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit fix from Paul Moore:
"One small audit patch to add a pointer NULL check"
* tag 'audit-pr-20211019' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
audit: fix possible null-pointer dereference in audit_filter_rules
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/auditsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 8dd73a64f921..b1cb1dbf7417 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -657,7 +657,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; |