Join our Newsletter — 33% off our NHI Course
Home› Glossary› Architecture & Implementation› Linux Landlock
Architecture & Implementation

Linux Landlock

← Back to Glossary
By NHI Mgmt Group Updated October 28, 2026 Domain: Architecture & Implementation

Linux Landlock is a Linux security mechanism for restricting what a process can do with the filesystem. It lets an application create a per-process sandbox by limiting read, write, execute and some privilege-related actions, even if the process is compromised later.

What Landlock Changes About Filesystem Control

Linux Landlock adds unprivileged, per-process filesystem confinement on top of the normal Linux permission model. That matters because it lets software restrict itself after startup, reducing the blast radius if the process is later compromised.

How Landlock Fits with the Linux Security Model

Landlock is not a replacement for traditional discretionary access control or kernel hardening. It works as an additional containment layer, so the process still needs its ordinary permissions, but its future filesystem actions can be narrowed further by policy.

That makes Landlock especially useful when an application handles untrusted input, loads plugins, or executes code paths that should not keep broad file access for the life of the process. A process can keep running normally while being denied access to paths that are not needed for its task.

Practical Uses and Policy Boundaries

The most useful Landlock policies are narrow and task-specific. They are usually built around the idea that a process should be able to read only the files it needs, write only to approved locations, and avoid creating a reusable foothold in the broader filesystem if it is exploited.

Because Landlock focuses on filesystem operations, it is strongest when paired with other controls for network access, memory safety, privilege separation, and service isolation. It is a containment mechanism, not a full sandbox for every kind of resource.

Why Landlock Matters for Compromise Containment

Landlock becomes most valuable after a bug, deserialization flaw, plugin issue, or injected payload turns a legitimate process into an attacker-controlled one. If the process can no longer traverse sensitive directories or alter executable content, the attacker has less room to stage persistence or tamper with local assets.

The main security value is reducing what a compromised workload can do, even when the initial exploit cannot be prevented in time. That shifts the security goal from perfect prevention to limiting post-compromise damage.

Risk and Threat Considerations

Landlock can create a false sense of containment if teams assume filesystem sandboxing alone will stop compromise. If policy scope is too broad, or if the process still has other powerful paths such as inherited credentials, writable service directories, or indirect execution routes, an attacker may still achieve meaningful impact.

Failure mechanism: A policy that does not cover the files, directories, or writable paths the process can actually reach leaves room for data theft, tampering, or persistence even after confinement is enabled.

Impact: A compromised process may still read secrets, overwrite trusted files, or prepare a later-stage attack unless Landlock is combined with least privilege and complementary isolation controls.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 provides the primary governance reference for this term.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeLandlock narrows process file actions to the minimum required set.
SC-7 — Boundary ProtectionLandlock enforces a local process boundary around filesystem reachability.
SI-3 — Malicious Code ProtectionLandlock helps restrict post-exploit behavior when a process is hijacked.
Recommendation — Apply AC-6 to limit each process to the filesystem access it actually needs. Use SC-7 to contain a process inside a defined filesystem boundary. Combine SI-3 with sandboxing to limit malicious code impact after execution begins.

Practitioner Guidance

What to watch for: Use Landlock where the application has a clear filesystem boundary, especially for tools that process uploads, render content, run extensions, or execute user-driven workflows. The policy should match the real file access pattern of the process, not an idealised one.

Governance implication: Treat Landlock as a defense-in-depth control that should be reviewed alongside application behavior, service ownership, and rollout testing. If a process needs broad file access to function, that design choice should be explicit rather than accidental.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 28, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org