From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796154216; b=hz0H75fdBkUdgjlFD8XMhB/hdu0mWoObyPi1x4pmtmqdLKl6j45THpWcvRXPM/zoyW1P Gbk7zjEVlrwAzJA58Cmi6U6wwrpAUmDZh77H3xunTek+S2sLO6AZgBwoJHo7gxAQ3Rudv rvOizFOLuB8L1QpYTqKHBA+tMRHFYZJPCenpVmrtyw/ANZlqwfz/+JdWgwW1ibagDGksw Up5rXt8h/heqDb6VgA683D2FIlP+/JvWGzKALElhKVfF0Q9z5Xk4dRAOHJuMi0BHJ+1b5 EV4aAzbhx9G/+2Ep7cKdJz6WMB9hhJ8kSNlvEo69LUOd1sCTb8Tw9aWtgvUArkTtrWQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796154216; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=PSQuZ4MuG2En2rnd/00G+Ed6owqRf/1V9kgAYrKpTiw=; b=ro4EY5TxuFuR+9QAOJum24ZmlVkv4wLEbb2qIjrLwReELfcj3Q+5T4I93UMdTE9ZmDyt edxqPnfOz1FXtEYTaXcfsKOF7PetCHH2nkkDgQa77MlL+r+xltJsJQsEOTZtGcADYLKBj smldohVVdaN4ZmRPCgXDbXfXcYrQEj07BnLdHL+KQItN8VPj6KOY58sE6iyziX1c45PXf EawBTjD0ZtYRpXw+t3gKBIOMAXA5YN0b9BzRxwKHLbEC5F8GU6Txgl9TwL+1hiPgfpcmH hgEq6UQ+lHxHj1sdGaziu5mcBY3C60931OH6gF0ZDCSc2i8eKIbz5q9i89BvHNMQJBQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Xx+CJFxi; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86383606A333 for ; Tue, 1 Dec 2026 19:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Xx+CJFxi Received: by smtp.kernel.org (Postfix) with ESMTPSA id 456511F00925 for ; Tue, 1 Dec 2026 19:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796154216; bh=PSQuZ4MuG2En2rnd/00G+Ed6owqRf/1V9kgAYrKpTiw=; h=From:Subject:Reply-To:Cc:In-Reply-To:References:Date; b=Xx+CJFxiltE1aWwCbFV9aDFg43Vkg7bqn9cf222Jm38bZ0mplDOL1PiFBN49hAIaw VWm8BvHuM8N7koUXZa7xEJV7z9PU/kMAV3cF7H77/yu3A4FryE6SyeOuUXOa9iOcrl WL0GM7VuBVnTENzmV4J/hIeNb2uNUPsS/kEmrJBRZodVTpaSH1M0cr1RzDF/vKsMYP zMzxpa+zquyLHCsZCi6RP+wRchK9LuPJjLX6gJv82cFnJZPB1egGHIj4IWR1BDVIEw v3p1QD4nMcbULcMzJ/iLqg5Wb5ZFFx+x0uq7mmRMnUPPqRs79Kv7sF3G1dcmu9f4nC ba/q2bEQrd8MQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] landlock: Clarify namespace and capability permission boundaries Reply-To: sashiko-reviews@lists.linux.dev Cc: linux-security-module@vger.kernel.org In-Reply-To: <20261201193814.760891-1-mic@digikod.net> References: <20261201193814.760891-1-mic@digikod.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 19:43:35 +0000 X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] landlock: incomplete update of namespace fd-reference wording in docs -- commit b0c0c94c5196be874090a6228b828116a0227e60 Author: Micka=C3=ABl Sala=C3=BCn landlock: Clarify namespace and capability permission boundaries This commit rewords the capability and namespace restrictions section in Documentation/userspace-api/landlock.rst to clarify that LANDLOCK_PERMISSION_NAMESPACE_USE covers namespace creation and reassociation rather than opening existing namespaces, and describes capability exercise as an independent check. Link: https://patch.msgid.link/179566442733.1993761.8053687674090289362@163= .com [1] > diff --git a/Documentation/userspace-api/landlock.rst b/Documentation/use= rspace-api/landlock.rst > index 7cc5fde482623..1748267930408 100644 > --- a/Documentation/userspace-api/landlock.rst > +++ b/Documentation/userspace-api/landlock.rst [ ... ] > @@ -525,25 +525,23 @@ rights (``handled_access_*``) or cross-domain scope= s (``scoped``), per-category > permissions constrain the sandboxed process's own use of these enums; me= mbers > not allowed by a rule are denied by default. > =20 > -``LANDLOCK_PERMISSION_NAMESPACE_USE`` gates *acquisition of access* to > -namespaces: creation via :manpage:`unshare(2)` / :manpage:`clone(2)` > -/ :manpage:`clone3(2)`, entry via :manpage:`setns(2)`, and fd-reference > -acquisition via :manpage:`open_tree(2)` / :manpage:`fsmount(2)`. Namesp= aces > -the process is already a member of when the domain is enforced are impli= citly > -allowed (the process could not continue running otherwise); rules descri= be > -which new namespace types the process may acquire. > +``LANDLOCK_PERMISSION_NAMESPACE_USE`` restricts which namespace types a > +process may create or reassociate with. It covers creation even when the > +caller does not join the new namespace, but does not restrict opening an > +existing namespace. Enforcing this permission does not revoke existing > +namespace membership. [Severity: Low] Should the other occurrences of the "fd-reference acquisition" phrasing in this document and in the UAPI header kernel-doc (which is included into this guide) be updated to match? In Documentation/userspace-api/landlock.rst under "Creating a new ruleset": For namespace access-control, we can add rules that allow using specific namespace types (see :manpage:`namespaces(7)` for the list of ``CLONE_NEW= *`` values): creating them via :manpage:`unshare(2)` / :manpage:`clone(2)` / :manpage:`clone3(2)`, joining them via :manpage:`setns(2)`, or acquiring = an fd reference via :manpage:`open_tree(2)` / :manpage:`fsmount(2)`. In Documentation/userspace-api/landlock.rst under "Namespace (ABI < 12)": Starting with the Landlock ABI version 12, it is possible to restrict nam= espace use (see :manpage:`namespaces(7)`) across creation (:manpage:`unshare(2)`, :manpage:`clone(2)`, :manpage:`clone3(2)`), entry (:manpage:`setns(2)`), = and fd-reference acquisition (:manpage:`open_tree(2)`, :manpage:`fsmount(2)`)= with the new ``LANDLOCK_PERMISSION_NAMESPACE_USE`` permission flag and ``LANDLOCK_RULE_NAMESPACE`` rule type. And in include/uapi/linux/landlock.h: * - %LANDLOCK_PERMISSION_NAMESPACE_USE: Restrict the use of specific nam= espace * types: creation (:manpage:`unshare(2)`, :manpage:`clone(2)`, * :manpage:`clone3(2)`), joining (:manpage:`setns(2)`), and acquiring = an fd * reference (:manpage:`open_tree(2)`, :manpage:`fsmount(2)`). Leaving those three passages unchanged keeps the old distinction between creation and fd-reference acquisition in the same rendered userspace API guide. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201193814.7608= 91-1-mic@digikod.net?part=3D1