All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: audit@vger.kernel.org, linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2 2/4] landlock: Add capability objects to denial tracing
Date: Wed, 18 Nov 2026 16:39:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-221516@kernel.org> (raw)
In-Reply-To: <20261118163254.2554413-3-mic@digikod.net>

> The capability denial tracepoint identifies the capability number but
> not the credentials or user namespace against which it was checked.
> Typed BPF consumers therefore cannot reconstruct the authoritative hook
> context, especially when a check targets a user namespace other than the
> caller's current namespace.
> 
> Carry the exact cred and user_ns used by each commoncap check through
> check_cap() to the tracepoint's BTF prototype.  The capable hook
> forwards its arguments.  Other callers mirror old->user_ns for
> CAP_SETPCAP, and init_user_ns for CAP_SYS_RAWIO and CAP_SYS_ADMIN.  The
> latter checks protect global hardening and the global admin memory
> reserve, so nested user-namespace capabilities must not authorize them.
> 
> Keep these pointers out of TP_STRUCT__entry and TP_printk so the raw
> ring-buffer layout and textual format remain unchanged.  They provide
> context only and do not participate in Landlock's verdict.
> 
> Do not carry the capability options.  CAP_OPT_NOAUDIT already suppresses
> the complete denial record, and the remaining option bits do not explain
> the checked security relationship.
> 
> Cc: Günther Noack <gnoack@google.com>
> Fixes: 97c8386f1d74 ("landlock: Enforce capability restrictions")
> 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/20261118163254.2554413-1-mic@digikod.net?part=2


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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 16:32 [PATCH v2 0/4] Landlock: Fix namespace and capability denials Mickaël Salaün
2026-11-18 16:32 ` [PATCH v2 1/4] landlock: Distinguish namespace creation and entry denials Mickaël Salaün
2026-11-18 16:40   ` sashiko-bot
2026-11-18 16:32 ` [PATCH v2 2/4] landlock: Add capability objects to denial tracing Mickaël Salaün
2026-11-18 16:39   ` sashiko-bot [this message]
2026-11-18 16:32 ` [PATCH v2 3/4] selftests/landlock: Test namespace denial operations Mickaël Salaün
2026-11-18 16:37   ` sashiko-bot
2026-11-18 16:32 ` [PATCH v2 4/4] landlock: Document " Mickaël Salaün
2026-11-18 16:39   ` 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-221516@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=audit@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.