Linux Security Modules development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] selftests/capabilities: test_execve: drop supplementary groups
Date: Wed, 11 Nov 2026 16:58:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-209349@kernel.org> (raw)
In-Reply-To: <20261111164645.260593-1-lylin1023@gmail.com>

> When run as root, test_execve keeps the caller's supplementary groups,
> which usually include group 0.
> 
> Since commit 337490f0007f ("exec: Correct the permission check for
> unsafe exec"), a setgid exec is not an id change if the new egid is
> already one of the caller's groups. As group 0 is one of them, the
> ambient capabilities survive exec of the sgidroot helper, and two
> cases fail:
> 
>   # [RUN]	Root, gid != 0, +ia, sgidroot => eip
>   # Wrong ambient state (AT_SECURE is set)
>   # [RUN]	Non-root +ia, sgidroot => i
>   # Wrong effective state (AT_SECURE is set)
> 
> Clear the supplementary groups before switching UIDs.
> 
> An AI coding assistant (Claude) was used to analyze the failure and to
> draft the fix and this changelog. Tested on v7.4-rc2: as root, all 21
> cases now pass (2 failed before); the unprivileged user namespace path
> is unchanged.
> 
> Fixes: 337490f0007f ("exec: Correct the permission check for unsafe exec")
> Signed-off-by: Kurt Lin <lylin1023@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261111164645.260593-1-lylin1023@gmail.com?part=1


      reply	other threads:[~2026-11-11 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 16:46 [PATCH] selftests/capabilities: test_execve: drop supplementary groups Kurt Lin
2026-11-11 16:58 ` sashiko-bot [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=sashiko-outbox-209349@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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