diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-10 14:43:43 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-10 14:43:43 +0100 |
commit | 252787201edfdf563ddf6b6006aa534ddc504031 (patch) | |
tree | 080d103b965e5b814040d0894d8872dfc4efd16d /kernel | |
parent | tipc: improve size validations for received domain records (diff) | |
parent | audit: don't deref the syscall args when checking the openat2 open_how::flags (diff) | |
download | linux-252787201edfdf563ddf6b6006aa534ddc504031.tar.xz linux-252787201edfdf563ddf6b6006aa534ddc504031.zip |
Merge tag 'audit-pr-20220209' of git://git.kernel.org/pub/scm/linux/kernel/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
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 fce5d43a933f..a83928cbdcb7 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -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; } |