Linux Security Modules development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2 2/4] capability: bound ptrace and cred subset checks by userns ceilings
Date: Thu, 19 Nov 2026 10:51:34 +0000	[thread overview]
Message-ID: <sashiko-outbox-222988@kernel.org> (raw)
In-Reply-To: <20261119104208.782900-3-halg@google.com>

> Same-namespace ptrace checks only compare cap_permitted (or
> cap_effective), ignoring the userns capability ceiling. As a result, a
> task with a lowered ceiling could trace a less-restricted same-UID task
> in the same user namespace and use it to create a wider child user
> namespace.
> 
> Require the tracee's cred_userns_bset() to be a subset of the tracer's
> in the same-namespace check in cap_ptrace_access_check() and
> cap_ptrace_traceme(). Cross-namespace implicit CAP_SYS_PTRACE via user
> namespace ownership is already bounded by cap_capable_helper(), while
> tracers holding explicit CAP_SYS_PTRACE retain access.
> 
> Also update cred_cap_issubset() so commit_creds() resets mm->dumpable
> and pdeath_signal whenever a credential transition widens the effective
> userns capability ceiling.
> 
> Suggested-by: Christian Brauner <brauner@kernel.org>
> Suggested-by: Andy Lutomirski <luto@kernel.org>
> Signed-off-by: Hallgrimur H. Gunnarsson <halg@google.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119104208.782900-1-halg@google.com?part=2


  reply	other threads:[~2026-11-19 10:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 10:42 [PATCH v2 0/4] userns: per-namespace capability bounding set Hallgrimur H. Gunnarsson
2026-11-19 10:42 ` [PATCH v2 1/4] userns: introduce capability bounding set for user namespaces Hallgrimur H. Gunnarsson
2026-11-19 11:11   ` sashiko-bot
2026-11-19 10:42 ` [PATCH v2 2/4] capability: bound ptrace and cred subset checks by userns ceilings Hallgrimur H. Gunnarsson
2026-11-19 10:51   ` sashiko-bot [this message]
2026-11-19 10:42 ` [PATCH v2 3/4] proc: expose userns capability mask as CapUns in /proc/<pid>/status Hallgrimur H. Gunnarsson
2026-11-19 10:46   ` sashiko-bot
2026-11-19 10:42 ` [PATCH v2 4/4] selftests/capabilities: add userns capability bounding set tests Hallgrimur H. Gunnarsson
2026-11-19 10:47   ` 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-222988@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