Linux Security Modules development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org, selinux@vger.kernel.org
Subject: Re: [PATCH v2 1/2] capabilities: Check PR_SET_SECUREBITS with ns_capable()
Date: Tue, 17 Nov 2026 10:23:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-218605@kernel.org> (raw)
In-Reply-To: <20261117101738.2523492-2-mic@digikod.net>

> PR_SET_SECUREBITS checks CAP_SETPCAP with cap_capable(), which skips the
> LSM capable hooks, so a task can change privileged securebits despite an
> LSM denial.
> 
> Use ns_capable() instead, as PR_CAPBSET_DROP already does.  Move the
> check to a helper that only requires CAP_SETPCAP when needed, so that
> changes limited to the unprivileged securebits still do not reach the
> LSMs or set PF_SUPERPRIV.
> 
> Cc: Christian Brauner <brauner@kernel.org>
> Cc: Günther Noack <gnoack@google.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: John Johansen <john.johansen@canonical.com>
> Cc: KP Singh <kpsingh@kernel.org>
> Cc: Matt Bobrowski <matt@bobrowski.net>
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: Serge Hallyn <serge@hallyn.com>
> Cc: Stephen Smalley <stephen.smalley.work@gmail.com>
> Cc: stable@vger.kernel.org
> Reviewed-by: Serge Hallyn (AMD) <sergeh@kernel.org>
> Fixes: 3898b1b4ebff ("capabilities: implement per-process securebits")
> Signed-off-by: Mickaël Salaün <mic@digikod.net>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117101738.2523492-1-mic@digikod.net?part=1


  reply	other threads:[~2026-11-17 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 10:17 [PATCH v2 0/2] Fix LSM mediation of PR_SET_SECUREBITS Mickaël Salaün
2026-11-17 10:17 ` [PATCH v2 1/2] capabilities: Check PR_SET_SECUREBITS with ns_capable() Mickaël Salaün
2026-11-17 10:23   ` sashiko-bot [this message]
2026-11-17 10:17 ` [PATCH v2 2/2] selftests/landlock: Test PR_SET_SECUREBITS mediation Mickaël Salaün
2026-11-17 10:23   ` sashiko-bot

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-218605@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=selinux@vger.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