Skip to content

Commit

Permalink
Merge tag 'audit-pr-20220209' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/pcmoore/audit

Pull audit fix from Paul Moore:
 "Another audit fix, this time a single rather small but important fix
  for an oops/page-fault caused by improperly accessing userspace
  memory"

* tag 'audit-pr-20220209' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: don't deref the syscall args when checking the openat2 open_how::flags
  • Loading branch information
torvalds committed Feb 10, 2022
2 parents 9aa422a + 7a82f89 commit 2527872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static int audit_match_perm(struct audit_context *ctx, int mask)
case AUDITSC_EXECVE:
return mask & AUDIT_PERM_EXEC;
case AUDITSC_OPENAT2:
return mask & ACC_MODE((u32)((struct open_how *)ctx->argv[2])->flags);
return mask & ACC_MODE((u32)ctx->openat2.flags);
default:
return 0;
}
Expand Down

0 comments on commit 2527872

Please sign in to comment.