[PATCH v2 1/4] landlock: Distinguish namespace creation and entry denials
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Nov 18 16:40:34 UTC 2026
> Landlock reports denied namespace creation and entry with the same
> internal request type. Before commit 08471914d6bb ("ns: allocate the
> namespace id before the namespace_init hook"), denied creation carried
> ID zero and could be distinguished from entry by ID alone. That commit
> moved ID allocation before namespace_init(), so creation now carries the
> ID of an unreachable new namespace while entry carries the existing
> target ID. Namespace IDs are object context, not operation
> discriminators.
>
> Split the request type into creation and entry. Keep the two namespace
> values together before capability; this renumbers the unreleased
> capability request in raw and typed trace context. Report
> namespace_op=create or namespace_op=enter immediately after blockers in
> namespace audit records and trace event text. Placing the operation
> before namespace_type and namespace_id lets consumers establish the
> semantics before interpreting the following namespace context,
> especially whether namespace_id is the creation-time value or identifies
> an existing entry target.
>
> Keep namespace.use as the policy blocker: the new value only describes
> the semantic hook context and does not add a policy control.
>
> Cc: Günther Noack <gnoack at google.com>
> Fixes: 15dd86021b57 ("landlock: Enforce namespace use restrictions")
> Signed-off-by: Mickaël Salaün <mic at 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=1
More information about the Linux-security-module-archive
mailing list