From: "Mickaël Salaün" <mic@digikod.net>
To: "Günther Noack" <gnoack3000@gmail.com>
Cc: "Christian Brauner" <brauner@kernel.org>,
"Günther Noack" <gnoack@google.com>,
"Paul Moore" <paul@paul-moore.com>,
"Serge E . Hallyn" <serge@hallyn.com>,
"Daniel Durning" <danieldurning.work@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Justin Suess" <utilityemal77@gmail.com>,
"Lennart Poettering" <lennart@poettering.net>,
"Mikhail Ivanov" <ivanov.mikhail1@huawei-partners.com>,
"Nicolas Bouchinet" <nicolas.bouchinet@oss.cyber.gouv.fr>,
"Shervin Oloumi" <enlightened@google.com>,
"Tingmao Wang" <m@maowtm.org>,
kernel-team@cloudflare.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH v6 6/8] selftests/landlock: Add capability restriction tests
Date: Tue, 20 Oct 2026 11:36:59 +0200 [thread overview]
Message-ID: <20261020.eiT3bah4uy4a@digikod.net> (raw)
In-Reply-To: <20261017.63923e5027e9@gnoack.org>
On Sat, Oct 17, 2026 at 12:20:12PM +0200, Günther Noack wrote:
> On Wed, Oct 14, 2026 at 10:27:12AM +0200, Mickaël Salaün wrote:
> > Add tests to exercise LANDLOCK_PERMISSION_CAPABILITY_USE enforcement. A
> > sandboxed process is denied a handled capability when no rule grants it,
> > and an explicit rule restores it. Unknown capability values above
> > CAP_LAST_CAP are accepted at rule-add time yet have no runtime effect,
> > because deny-by-default still applies once the domain is enforced.
> > Stacking tests cover the per-layer allow/deny combinations, including a
> > layer that does not handle the permission, and invalid rule attributes
> > return the expected errors.
> >
> > Three tests exercise non-standard capability contexts: enforcing a
> > domain via CAP_SYS_ADMIN authorization without no_new_privs, restricting
> > capabilities gained through the kernel's user namespace ownership bypass
> > (cap_capable_helper), and checking CAP_SYS_ADMIN against a descendant
> > user namespace, with an unsandboxed positive control, to confirm the
> > decision is independent of the target.
> >
> > Audit tests verify denied and allowed capabilities, per-member quiet
> > interactions, and CAP_OPT_NOAUDIT suppression. Trace tests cover
> > accepted, rejected, and no-op rule adds, and normal, quiet, and
> > CAP_OPT_NOAUDIT denials.
> >
> > Test coverage for security/landlock is 91.8% of 2864 lines according to
> > LLVM 22.
> >
> > Cc: Christian Brauner <brauner@kernel.org>
> > Cc: Günther Noack <gnoack@google.com>
> > Cc: Paul Moore <paul@paul-moore.com>
> > Cc: Serge E. Hallyn <serge@hallyn.com>
> > Signed-off-by: Mickaël Salaün <mic@digikod.net>
> > ---
> Same comments as in the preceding commit as well;
> specifically,
> * some helper functions could call ASSERT directly
> * EXPECT instead of ASSERT in various places
Agreed
next prev parent reply other threads:[~2026-10-20 9:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 8:27 [PATCH v6 0/8] Landlock: Namespace and capability control Mickaël Salaün
2026-10-14 8:27 ` [PATCH v6 1/8] landlock: Rename quiet_masks to quiet_access Mickaël Salaün
2026-10-17 10:20 ` Günther Noack
2026-10-14 8:27 ` [PATCH v6 2/8] landlock: Wrap per-layer access masks in struct layer_config Mickaël Salaün
2026-10-14 8:27 ` [PATCH v6 3/8] landlock: Enforce namespace use restrictions Mickaël Salaün
2026-10-14 8:27 ` [PATCH v6 4/8] landlock: Enforce capability restrictions Mickaël Salaün
2026-10-14 8:27 ` [PATCH v6 5/8] selftests/landlock: Add namespace restriction tests Mickaël Salaün
2026-10-17 8:11 ` Günther Noack
2026-10-20 9:36 ` Mickaël Salaün
2026-10-14 8:27 ` [PATCH v6 6/8] selftests/landlock: Add capability " Mickaël Salaün
2026-10-17 10:20 ` Günther Noack
2026-10-20 9:36 ` Mickaël Salaün [this message]
2026-10-14 8:27 ` [PATCH v6 7/8] samples/landlock: Add capability and namespace restriction support Mickaël Salaün
2026-10-14 8:27 ` [PATCH v6 8/8] landlock: Add documentation for capability and namespace restrictions Mickaël Salaün
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=20261020.eiT3bah4uy4a@digikod.net \
--to=mic@digikod.net \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=danieldurning.work@gmail.com \
--cc=enlightened@google.com \
--cc=gnoack3000@gmail.com \
--cc=gnoack@google.com \
--cc=ivanov.mikhail1@huawei-partners.com \
--cc=kernel-team@cloudflare.com \
--cc=lennart@poettering.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=m@maowtm.org \
--cc=nicolas.bouchinet@oss.cyber.gouv.fr \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=utilityemal77@gmail.com \
/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
all inboxes | Powered by JetHome®