Commit 25278720 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 9aa422ad 7a82f89d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}