public inbox for audit@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Ricardo Robaina <rrobaina@redhat.com>,
	audit@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: eparis@redhat.com, Ricardo Robaina <rrobaina@redhat.com>,
	Steve Grubb <sgrubb@redhat.com>
Subject: Re: [PATCH v2] audit: handle unknown status requests in  audit_receive_msg
Date: Tue, 10 Mar 2026 15:22:40 -0400	[thread overview]
Message-ID: <7e02e707baecb7c94db329d5d03c1c15@paul-moore.com> (raw)
In-Reply-To: <20260309130533.158095-1-rrobaina@redhat.com>

On Mar  9, 2026 Ricardo Robaina <rrobaina@redhat.com> wrote:
> 
> Currently, audit_receive_msg() ignores unknown status bits in AUDIT_SET
> requests, incorrectly returning success to newer user space tools
> querying unsupported features. This breaks forward compatibility.
> 
> Fix this by defining AUDIT_STATUS_ALL and returning -EINVAL if any
> unrecognized bits are set (s.mask & ~AUDIT_STATUS_ALL).
> This ensures invalid requests are safely rejected, allowing user space
> to reliably test for and gracefully handle feature detection on older
> kernels.
> 
> Suggested-by: Steve Grubb <sgrubb@redhat.com>
> Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
> ---
> v1 -> v2:
>  - Moved AUDIT_STATUS_ALL from include/uapi/linux/audit.h to 
>    include/linux/audit.h.
> 
>  include/linux/audit.h | 9 +++++++++
>  kernel/audit.c        | 2 ++
>  2 files changed, 11 insertions(+)

Merged into audit/dev, thanks.

--
paul-moore.com

  reply	other threads:[~2026-03-10 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 13:05 [PATCH v2] audit: handle unknown status requests in audit_receive_msg Ricardo Robaina
2026-03-10 19:22 ` Paul Moore [this message]
2026-03-10 19:24   ` Ricardo Robaina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e02e707baecb7c94db329d5d03c1c15@paul-moore.com \
    --to=paul@paul-moore.com \
    --cc=audit@vger.kernel.org \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrobaina@redhat.com \
    --cc=sgrubb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox