From: Paul Moore <paul@paul-moore.com>
To: Sergio Correia <scorreia@redhat.com>,
audit@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: eparis@redhat.com, sergeh@kernel.org, jmorris@namei.org,
rrobaina@redhat.com, Sergio Correia <scorreia@redhat.com>
Subject: Re: [PATCH] audit: fix incorrect inheritable capability in CAPSET records
Date: Tue, 12 May 2026 16:05:38 -0400 [thread overview]
Message-ID: <ca2feee94cf63464559bcf75c113c242@paul-moore.com> (raw)
In-Reply-To: <20260512132833.1304542-1-scorreia@redhat.com>
On May 12, 2026 Sergio Correia <scorreia@redhat.com> wrote:
>
> __audit_log_capset() records the effective capability set into the
> inheritable field due to a copy-paste error. Every CAPSET audit
> record therefore reports cap_pi (process inheritable) with the value
> of cap_effective instead of cap_inheritable.
>
> This silently corrupts audit data used for compliance and forensic
> analysis: an attacker who modifies inheritable capabilities to
> prepare for a privilege-escalating exec would have the change masked
> in the audit trail.
>
> The bug has been present since the original introduction of CAPSET
> audit records in 2008.
>
> Fixes: e68b75a027bb ("When the capset syscall is used it is not possible for audit to record the actual capbilities being added/removed. This patch adds a new record type which emits the target pid and the eff, inh, and perm cap sets.")
> Reviewed-by: Ricardo Robaina <rrobaina@redhat.com>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Sergio Correia <scorreia@redhat.com>
> ---
> kernel/auditsc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Good work, thanks! I'm merging this into audit/stable-7.1 and will
send this up to Linus later this week.
--
paul-moore.com
prev parent reply other threads:[~2026-05-12 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 13:28 [PATCH] audit: fix incorrect inheritable capability in CAPSET records Sergio Correia
2026-05-12 20:05 ` Paul Moore [this message]
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=ca2feee94cf63464559bcf75c113c242@paul-moore.com \
--to=paul@paul-moore.com \
--cc=audit@vger.kernel.org \
--cc=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rrobaina@redhat.com \
--cc=scorreia@redhat.com \
--cc=sergeh@kernel.org \
/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