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
This commit is contained in:
@ -185,7 +185,7 @@ static int audit_match_perm(struct audit_context *ctx, int mask)
|
|||||||
case AUDITSC_EXECVE:
|
case AUDITSC_EXECVE:
|
||||||
return mask & AUDIT_PERM_EXEC;
|
return mask & AUDIT_PERM_EXEC;
|
||||||
case AUDITSC_OPENAT2:
|
case AUDITSC_OPENAT2:
|
||||||
return mask & ACC_MODE((u32)((struct open_how *)ctx->argv[2])->flags);
|
return mask & ACC_MODE((u32)ctx->openat2.flags);
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user