Skip to content

Commit 2527872

Browse files
committed
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
2 parents 9aa422a + 7a82f89 commit 2527872

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/auditsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int audit_match_perm(struct audit_context *ctx, int mask)
185185
case AUDITSC_EXECVE:
186186
return mask & AUDIT_PERM_EXEC;
187187
case AUDITSC_OPENAT2:
188-
return mask & ACC_MODE((u32)((struct open_how *)ctx->argv[2])->flags);
188+
return mask & ACC_MODE((u32)ctx->openat2.flags);
189189
default:
190190
return 0;
191191
}

0 commit comments

Comments
 (0)