[PATCH] audit: don't deref the syscall args when checking the openat2 open_how::flags

Paul Moore paul at paul-moore.com
Wed Feb 9 23:45:41 UTC 2022


On Wed, Feb 9, 2022 at 4:11 PM Paul Moore <paul at paul-moore.com> wrote:
>
> As reported by Jeff, dereferencing the openat2 syscall argument in
> audit_match_perm() to obtain the open_how::flags can result in an
> oops/page-fault.  This patch fixes this by using the open_how struct
> that we store in the audit_context with audit_openat2_how().
>
> Cc: stable at vger.kernel.org
> Fixes: 1c30e3af8a79 ("audit: add support for the openat2 syscall")
> Reported-by: Jeff Mahoney <jeffm at suse.com>
> Signed-off-by: Paul Moore <paul at paul-moore.com>
> ---
>  kernel/auditsc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Merged to audit/stable-5.17 with a note that Richard posted a similar
patch.  Assuming this passes the automated testing (it should, manual
testing was fine), this will be sent up to Linus soon.

-- 
paul-moore.com




More information about the Linux-audit mailing list