Rust

rust-landlock

A Rust library for the Linux Landlock sandboxing feature

L

landlock-lsm

Dernière activité 4 août 2026
landlock-lsm/rust-landlock

314

étoiles

26

forks

19

issues ouvertes

landlocklinuxsandboxingsecurity

Ce README est souvent en anglais.

Rust Landlock library

Landlock is a security feature available since Linux 5.13. The goal is to enable to restrict ambient rights (e.g., global filesystem access) for a set of processes by creating safe security sandboxes as new security layers in addition to the existing system-wide access-controls. This kind of sandbox is expected to help mitigate the security impact of bugs, unexpected or malicious behaviors in applications. Landlock empowers any process, including unprivileged ones, to securely restrict themselves. More information about Landlock can be found in the official website.

This Rust crate provides a safe abstraction for the Landlock system calls along with some helpers.

Use cases

This crate is especially useful to protect users' data by sandboxing:

  • trusted applications dealing with potentially malicious data (e.g., complex file format, network request) that could exploit security vulnerabilities;
  • sandbox managers, container runtimes or shells launching untrusted applications.

Examples

A simple example can be found with the path_beneath_rules() helper. More complex examples can be found with the Ruleset documentation and the sandboxer example.

Changelog

Projets similaires

A Go library for the Linux Landlock sandboxing feature

Golandlocklinuxsandboxing
Llandlock-lsm
360 étoiles20

The lightest AI sandbox. A process-based sandbox for Linux, no container, no VM, no privilege, no prompt injection

Rustai-agentsfaaslandlock
Mmultikernel
529 étoiles55

Run any Linux process in a secure, unprivileged sandbox using Landlock. Think firejail, but lightweight, user-friendly, and baked into the kernel.

Gocligolangkernel
ZZouuup
2,3 k étoiles54