From: "Mickaël Salaün" <mic@digikod.net>
To: "Christian Brauner" <brauner@kernel.org>,
"Günther Noack" <gnoack@google.com>
Cc: "Mickaël Salaün" <mic@digikod.net>,
"Charles Zaffery" <czaffery@roblox.com>,
"Daniel Burgener" <dburgener@linux.microsoft.com>,
"Francis Laniel" <flaniel@linux.microsoft.com>,
"James Morris" <jmorris@namei.org>,
"Jann Horn" <jannh@google.com>, "Jeff Xu" <jeffxu@google.com>,
"Kees Cook" <kees@kernel.org>,
"Luca Boccassi" <luca.boccassi@gmail.com>,
"Mikhail Ivanov" <ivanov.mikhail1@huawei-partners.com>,
"Praveen K Paladugu" <prapal@linux.microsoft.com>,
"Robert Salvet" <robert.salvet@roblox.com>,
"Shervin Oloumi" <enlightened@google.com>,
"Tyler Hicks" <code@tyhicks.com>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: [RFC PATCH v1 0/3] Expose Landlock domain IDs via pidfd
Date: Fri, 31 Jan 2025 17:34:44 +0100 [thread overview]
Message-ID: <20250131163447.1140564-1-mic@digikod.net> (raw)
Hi,
Landlock enables users to create unprivileged nested security sandboxes
(i.e. domains). Each of these domains get a unique ID, which is used to
identify and compare different domains. With the audit support, these
IDs will be used in logs, but users also need a way to map these IDs to
processes and directly read domain IDs of arbitrary tasks.
pidfd is a reference to a task that enables users to interact with it
and read some of its properties with the PIDFD_GET_INFO IOCTL. This
patch series extend this interface with two new properties:
PIDFD_INFO_LANDLOCK_LAST_DOMAIN and PIDFD_INFO_LANDLOCK_FIRST_DOMAIN.
Being able to read tasks' domain IDs is useful for telemetry, debugging, and
tests. It enables users:
- to know if a task is well sandboxed;
- to know which tasks are part of the same sandbox;
- to map Landlock audit logs to running processes.
Furthermore, thanks to recvmsg(2)'s SCM_PIDFD, it is also possible to reliably
identify a peer's sandbox.
This patch series is based on the audit support patch series v5:
https://lore.kernel.org/all/20250108154338.1129069-1-mic@digikod.net/
I'll talk about this feature at FOSDEM:
https://fosdem.org/2025/schedule/event/fosdem-2025-6071-sandbox-ids-with-landlock/
Regards,
Mickaël Salaün (3):
landlock: Add landlock_read_domain_id()
pidfd: Extend PIDFD_GET_INFO with PIDFD_INFO_LANDLOCK_*_DOMAIN
samples/landlock: Print domain ID
fs/pidfs.c | 24 +++++++++++-
include/linux/landlock.h | 26 +++++++++++++
include/uapi/linux/pidfd.h | 4 ++
samples/landlock/sandboxer.c | 29 +++++++++++++-
security/landlock/Makefile | 12 ++++--
security/landlock/domain.c | 2 -
security/landlock/domain.h | 8 ++--
security/landlock/ruleset.c | 2 +
security/landlock/syscalls.c | 75 ++++++++++++++++++++++++++++++++++++
9 files changed, 169 insertions(+), 13 deletions(-)
create mode 100644 include/linux/landlock.h
base-commit: a4b76d5e6800121372b88c85628a7867a5fdc707
--
2.48.1
next reply other threads:[~2025-01-31 16:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 16:34 Mickaël Salaün [this message]
2025-01-31 16:34 ` [RFC PATCH v1 1/3] landlock: Add landlock_read_domain_id() Mickaël Salaün
2025-01-31 16:34 ` [RFC PATCH v1 2/3] pidfd: Extend PIDFD_GET_INFO with PIDFD_INFO_LANDLOCK_*_DOMAIN Mickaël Salaün
2025-01-31 19:02 ` Paul Moore
2025-02-01 10:28 ` Mickaël Salaün
2025-02-01 11:09 ` Christian Brauner
2025-02-01 23:48 ` Paul Moore
2025-01-31 16:34 ` [RFC PATCH v1 3/3] samples/landlock: Print domain ID Mickaël Salaün
2025-01-31 17:35 ` [RFC PATCH v1 0/3] Expose Landlock domain IDs via pidfd 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=20250131163447.1140564-1-mic@digikod.net \
--to=mic@digikod.net \
--cc=brauner@kernel.org \
--cc=code@tyhicks.com \
--cc=czaffery@roblox.com \
--cc=dburgener@linux.microsoft.com \
--cc=enlightened@google.com \
--cc=flaniel@linux.microsoft.com \
--cc=gnoack@google.com \
--cc=ivanov.mikhail1@huawei-partners.com \
--cc=jannh@google.com \
--cc=jeffxu@google.com \
--cc=jmorris@namei.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--cc=prapal@linux.microsoft.com \
--cc=robert.salvet@roblox.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