Where
-Infinity
0

Here is the fourth Landlock newsletter!

Official website: https://landlock.io Previews newsletter: https://lore.kernel.org/landlock/d4ed5733-d07b-5548-2534-a63e22906778 () digikod net

Articles and conferences ------------------------

We wrote a detailed article about Landlock explaining the underlying concepts, the implementation, and the community: https://landlock.io/talks/2024-06-06landlock-article.pdf This was written for the SSTIC conference: https://www.sstic.org/2024/presentation/landlock-design/

I did a workshop at the Pass the Salt conference to explain how to mitigate security vulnerabilities with Landlock (demonstrated with ImageMagick): https://cfp.pass-the-salt.org/pts2024/talk/8FVYDF/ Related materials are freely available to do it at home: https://github.com/landlock-lsm/workshop-imagemagick

Arto Niemi published a "Survey of Real-World Process Sandboxing" at the Conference of Open Innovations Association (FRUCT): https://fruct.org/publications/volume-35/fruct35/files/Niem.pdf Their conclusion: "[...] we found Landlock and minijail [which uses Landlock] to be relatively convenient from a developer perspective. In general, process self-containment and process-wrapping seems to be an order of magnitude easier to configure than MAC policies."

Researchers from University of Bergamo gave a talk at ASIA CCS conference about Cage4Deno: A Fine-Grained Sandbox for Deno Subprocesses (leveraging Landlock) https://cs.unibg.it/seclab-papers/2023/ASIACCS/paper/cage4deno.pdf They also gave a talk at the RAID conference about NatiSand: Native Code Sandboxing for JavaScript Runtimes (leveraging Landlock) https://cs.unibg.it/seclab-papers/2023/RAID/natisand.pdf

Eric Leblond gave a talk (in French) at the SSTIC conference about sandboxing with Landlock to mitigate real world security issues: https://www.sstic.org/2023/presentation/attaquesupplychainsuricata/

Günther Noack will give a talk at LSS Europe about Landlock and the new IOCTL support: https://sched.co/1ebVW

I'll give a talk at OSS Europe to better explain sandboxing with Landlock: https://sched.co/1ej3a

The XZ backdoor ---------------

XZ Utils is a widely used compression tool and library. The main maintainer implemented sandboxing with Landlock, and released a new version 5.6.0 with this feature. In March 2024, a backdoor was found and reported. It was introduced in February by a new maintainer who earned this trust after more than two years of effort.

Among the malicious changes, the attacker disabled Landlock's support for XZ Utils and released a new version 5.6.1: https://research.swtch.com/xz-timeline The sabotaged configuration check has since been fixed with version 5.6.2, but this effort to stealthily disable sandboxing is a clear sign that Landlock disturbs attackers: https://github.com/tukaani-project/xz/commit/f9cf4c05edd1

Merged kernel features ----------------------

Linux 6.7 (Landlock ABI 4) supports initial network access control with the LANDLOCKACCESSNETBINDTCP and LANDLOCKACCESSNETCONNECTTCP rights thanks to Konstantin Meskhidze. We can now control inbound and outbound TCP connections according to the source or the destination port. This led to kernel code refactoring which opens the way to more network protocol support. See user space documentation: https://docs.kernel.org/userspace-api/landlock.html#network-flags

Linux 6.10 (Landlock ABI 5) supports IOCTL control with the new LANDLOCKACCESSFSIOCTLDEV right thanks to Günther Noack. This restriction only applies to IOCTL commands implemented by device drivers (i.e. block or character devices). As other file system access rights, this can be used to only allow such IOCTL commands on a specified set of file hierarchies per sandbox. See user space documentation: https://docs.kernel.org/userspace-api/landlock.html#filesystem-flags

We also added a slight change in all supported kernels to inform system administrators (with kernel logs) how they can configure the system to support Landlock, if a process tried to sandbox itself on a kernel where Landlock is disabled. New documentation will help enable Landlock on systems when it is not already the case: https://docs.kernel.org/userspace-api/landlock.html#kernel-support

Since Linux 6.3, we improved documentation and kselftests (user space testing), and added support for KUnit (kernel testing). Part of this work lead us to support the UML architecture to easily run application tests in a CI against different kernel versions. With this support we can make sure that backward compatibility works fine for the tested applications. I encourage to take a look at landlock-test-tools and the GitHub CI configuration for the Rust library: https://github.com/landlock-lsm/landlock-test-tools https://github.com/landlock-lsm/rust-landlock/blob/main/.github/workflows/rust.yml#L166-L179

Roadmap and ongoing development -------------------------------

We created GitHub issues to track ongoing and future work: https://github.com/landlock-lsm/linux/issues https://github.com/orgs/landlock-lsm/projects/1

Feel free to reach out if you want to contribute! https://github.com/landlock-lsm/linux/contribute

We also plan to improve the website with extended documentation and examples.

Kernel development highlights -----------------------------

Günther Noack is now an official reviewer of Landlock! https://git.kernel.org/torvalds/c/5bf9e57e634b After the IOCTL feature, he is now working on improving the documentation, including man pages.

Mikhail Ivanov is working on socket type control. This is an important feature that will make it possible to create sandboxes without any network access, except for an explicit list of allowed protocols. This will nicely complement the TCP port control (and future ones for other protocols): https://github.com/landlock-lsm/linux/issues/6 He is also working on controlling TCP listen calls: https://github.com/landlock-lsm/linux/issues/15

Tahera Fahimi was selected as an Outreachy intern to work on IPC restrictions (e.g. abstract unix socket, signals) to better isolate a Landlock domain: https://github.com/landlock-lsm/linux/issues/7 https://github.com/landlock-lsm/linux/issues/8

I'm working on bringing audit support to Landlock: https://github.com/landlock-lsm/linux/issues/3

Landlock libraries ------------------

As explained by Günther Noack, the Go library now supports TCP and IOCTL restrictions: https://blog.gnoack.org/post/landlock-v4/ https://blog.gnoack.org/post/landlock-ioctl/

A new version of the Rust crate was released, with support for TCP control and some miscellaneous improvements: https://github.com/landlock-lsm/rust-landlock/releases/tag/v0.4.0

Please update your dependencies and use the latest Landlock ABI version for improved sandboxing.

We are also working on a new minimal C library: https://github.com/landlock-lsm/linux/issues/38

New Landlock user space supports --------------------------------

Firejail 0.9.74 (sandboxer) will be able to use landlock: https://github.com/netblue30/firejail/pull/6078

setpriv 2.40 (sandboxer): https://github.com/util-linux/util-linux/pull/2628

extrasafe 0.4.0 (sandbox library): https://github.com/boustrophedon/extrasafe/pull/28

bevymodlockdown (sandbox library): https://github.com/FrTerstappen/bevymodlockdown

Cloud Hypervisor (VM monitor) will be sandboxed with Landlock: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6214

Ukuleleweb (wiki server): https://github.com/gnoack/ukuleleweb/commit/0ecdd54b36fa

websrv 3.2.0 (web server): https://github.com/ngergs/websrv/commit/40fa2d7d2bbb

egress-eddie 0.5.0 (network filtering): https://github.com/capnspacehook/egress-eddie/releases/tag/v0.5.0

Suricata 7.0.0 (network security monitoring engine): https://docs.suricata.io/en/latest/configuration/landlock.html

sslh 2.1.0 (protocol multiplexer): https://lore.kernel.org/landlock/Zfq6f30spnYCx9Y () rutschle net/ https://github.com/yrutschle/sslh/releases/tag/v2.1.0

wireproxy 1.0.8 (Wireguard client): https://github.com/pufferffish/wireproxy/pull/108

Emilua 0.5.0 (Lua runtime): https://lore.kernel.org/landlock/CAK9RveLxro4zUG4jfFB=UNgcv5gdc8JuzNhMt=YbNhH=35ADzg () mail gmail com/ https://docs.emilua.org/api/0.5/changelog.html

Polkadot (blockchain SDK): https://github.com/paritytech/polkadot/pull/7303

XZ Utils 5.6.2 (archive manager): https://github.com/tukaani-project/xz/commit/374868d81d47

Zathura (document viewer) will be sandboxed with Landlock: https://github.com/pwmt/zathura/pull/575

Pacman 7.0.0 (Arch Linux's package manager): https://gitlab.archlinux.org/pacman/pacman/-/mergerequests/167

Thanks to all contributors!

Regards, Mickaël

First published (updated )

Here is the fifth Landlock newsletter!

Official website: https://landlock.io Previews newsletter: https://lore.kernel.org/landlock/20240716.yui4Iezai8ae () digikod net/

TL;DR: Check your sandboxed programs with Linux 6.15, review the audit logs, and update the sandbox policy if you see any Landlock events.

Kernel features ===============

Restricting signals and abstract UNIX sockets ---------------------------------------------

Linux 6.12 (Landlock ABI 6) introduces IPC scoping with a new ruleset "scoped" field, thanks to Tahera Fahimi. This field accepts a set of flags: the LANDLOCKSCOPEABSTRACTUNIXSOCKET flag denies connections to abstract UNIX sockets created outside the current scoped domain, and the LANDLOCKSCOPESIGNAL flag denies sending signals to processes outside the current scoped domain.

These restrictions also apply to nested domains according to their scope. Both features have been requested to help isolate untrusted processes, making it easier to protect against related threats. These changes will also be useful for supporting other kinds of IPC isolation.

See user space documentation: https://docs.kernel.org/userspace-api/landlock.html#scope-flags

Audit logging for denied access requests ----------------------------------------

Linux 6.15 (Landlock ABI 7) adds the ability to log denied requests with audit. This provides visibility into why access requests are denied, including the origin of the security policy, missing access rights, and object descriptions.

The logging system is designed to minimize log spam while still alerting about unexpected blocked access. Being able to see what is denied, and more importantly why, is a crucial feature for any security mechanism. The default behavior alerts about unexpected access requests (i.e., attacks) while ignoring noise from programs unaware they are sandboxed. Tailored sandboxing can adjust this behavior with the three new LANDLOCKRESTRICTSELFLOG flags, though this should not be necessary in most cases.

This new Landlock capability is the most significant change since Landlock was merged into mainline: +46% SLOC for the kernel and +23% SLOC for kselftests. See sysadmin and user space documentation: https://docs.kernel.org/admin-guide/LSM/landlock.html#audit https://docs.kernel.org/userspace-api/landlock.html#c.syslandlockrestrictself

Kernel fixes ============

All stable kernels supporting Landlock now also provide a new interface to probe for user-visible fixes. This may be required by some Landlock libraries to safely expose more Landlock features on up-to-date kernels. This improvement in the quality of the Landlock specification should not be noticed by most users.

The first issue fixed by an erratum is related to TCP socket identification. Mikhail Ivanov fixed an issue where IPv4 and IPv6 stream sockets (e.g., SMC, MPTCP, or SCTP) were incorrectly restricted by TCP access rights during bind(2) and connect(2) operations. This change ensures that only TCP sockets are subject to TCP access rights, allowing other protocols to operate without unnecessary restrictions.

The second erratum is related to scoped signal handling. This fix addresses an issue where signal scoping was overly restrictive, preventing sandboxed threads from signaling other threads within the same process if they belonged to different domains. Because threads are not security boundaries, user space might assume that all thread within the same process can send signals between themselves (see nptl(7) and libpsx(3)). Consistent with ptrace(2) behavior, direct interaction between threads of the same process should always be allowed. This change ensures that any thread is allowed to send signals to any other thread within the same process, regardless of their domain.

Landlock libraries ==================

The Landlock crate and Go library have been updated, bringing support for the latest Landlock features, improved documentation, and better tests: https://github.com/landlock-lsm/rust-landlock/blob/main/CHANGELOG.md#v042

Go-Landlock is now packaged in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1096137

Please update your dependencies and use the latest Landlock ABI version for improved sandboxing.

Landlock logo =============

Landlock now has a logo! Guess what it means. ;) Feel free to use it to illustrate Landlock. https://github.com/landlock-lsm/landlock-logo

Talks and articles ==================

Günther Noack gave a talk at the Linux Security Summit Europe titled "Update On Landlock IOCTL Support": https://lsseu2024.sched.com/event/1ebVW He explains how Landlock works and why it was designed this way. He then discusses the challenges of implementing a useful and practical IOCTL control, and finally introduces ongoing work to improve Landlock.

I gave a talk at the Open Source Summit Europe on "Linux Sandboxing with Landlock": https://osseu2024.sched.com/event/1ej3a This was an introduction to Landlock, including why and how it should be used to secure user environments.

Tahera Fahimi participated in a panel discussion at the Open Source Summit Europe, where she talked about her Outreachy internship working on Landlock: https://osseu2024.sched.com/event/1ej1w

I also gave a talk at FOSDEM about Sandbox IDs with Landlock: https://fosdem.org/2025/schedule/event/fosdem-2025-6071-sandbox-ids-with-landlock/ This talk explains the properties of Landlock IDs, how they are used in audit, and how they could be used to identify a set of processes, such as a container.

I updated the Landlock workshop to demonstrate sandboxing with ImageMagick: https://github.com/landlock-lsm/workshop-imagemagick https://landlock.io/talks/2025-01-29landlock-workshop.pdf

I was invited to present Landlock at the Compartmentalization Community meeting: https://drive.google.com/drive/folders/129kNPaTriApmdRU4OFwl3KwDYJlIXLEH (see Eval & Benchmarking meeting of 2025-04-24)

An interesting article about sandboxing was published on the Emilua (Lua runtime) blog: https://blog.emilua.org/2025/01/12/software-sandboxing-basics/

Rémi Gacogne will give a talk at Pass the Salt about sandboxing Pacman: https://cfp.pass-the-salt.org/pts2025/talk/FUL7LS/

Documentation and examples ==========================

Günther Noack is writing documentation with use cases for Landlock. We'll move this documentation to the official website when ready but in the meantime it's worth a read! https://wiki.gnoack.org/UsingLandlock https://github.com/gnoack/landlock-examples

New Linux distributions support ===============================

GNOME OS's kernel has Landlock enabled by default (it's been a while, but we missed it): https://gitlab.gnome.org/GNOME/gnome-build-meta/-/mergerequests/2559

Flatcar's kernel has had Landlock enabled by default since last year: https://github.com/flatcar/scripts/pull/2158

Red Hat Enterprise Linux 9.6.0 (RHEL) has enabled Landlock by default and also backported features up to Landlock ABI 5, thanks to Ryan Sullivan and Red Hat reviewers: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/commit/9039cec1ed523025381bdbc62cb924601be5059b It is available since kernel-5.14.0-568.el9: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/commit/5ba435c29b4704e87af1a0fd291ea6610ff5af92 CentOS Stream, Rocky Linux, and other RHEL alternatives should also gain the same support: https://bugs.rockylinux.org/view.php?id=7987

New Landlock user space support ===============================

GNOME's tracker-extract is now sandboxed with Landlock (it's been a while, but it wasn't mentioned in a previous newsletter): https://gitlab.gnome.org/GNOME/localsearch/-/mergerequests/499 Support was merged in GNOME 46: https://gitlab.gnome.org/Teams/Websites/release.gnome.org/-/issues/37 There were some interesting compatibility issues that have since been fixed: https://gitlab.gnome.org/GNOME/localsearch/-/issues/319#note2046228 All these issues can be avoided by using a Landlock library with best-effort support (Rust or Go for now).

HashiCorp's Nomad can now run sandboxed processes with Landlock: https://developer.hashicorp.com/nomad/plugins/drivers/exec2

Unblob 24.12.4 has gained support for Landlock: https://github.com/onekey-sec/unblob/pull/1022

dosemu2 has gained support for Landlock: https://github.com/dosemu2/dosemu2/pull/2344

wireproxy 1.0.8 has gained support for Landlock: https://github.com/pufferffish/wireproxy/pull/108

Landrun is a new sandboxing tool leveraging Landlock: https://github.com/Zouuup/landrun https://news.ycombinator.com/item?id=43445662

Ongoing work ============

Ongoing kernel work can be tracked here: https://github.com/orgs/landlock-lsm/projects/1

It would be good to have guidelines to help developers sandbox their applications. OpenSSF Working Groups could be a good place for that: https://github.com/ossf/wg-best-practices-os-developers/issues/631 Any help would be appreciated.

We are working on a Landlock configuration format to empower all Linux users to sandbox their applications with Landlock: https://github.com/landlock-lsm/landlockconfig A new tool will make this library easy to use.

Thanks to all contributors!

Regards, Mickaël

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203