Skip to content

Add support for Landlock #713

Description

@arch-hash

It would be great if Bubblewrap could integrate Landlock for path-based security restrictions inside the sandbox. Currently, Bubblewrap isolates processes using namespaces and mount points, but it lacks a mechanism to enforce more granular file access controls. Using Landlock, we can control access to specific paths (files/directories) within the sandbox for defense in-depth. Chromium's Sandbox2 now also uses landlock. Integrate Landlock after Bubblewrap sets up the sandbox environment (namespaces, mounts) and add a new CLI flag like --landlock-allow READ:/path/to/dir to specify access rules for files or directories.

Activity

  1. rusty-snake commented on Nov 14, 2025

    @rusty-snake
    Contributor

    Duplicate of #690

  2. smcv commented on Dec 3, 2025

    @smcv
    Collaborator

    Specifically, see #690 (comment).

    Landlock is a mechanism, rather than a feature. It sounds as though the feature you are looking for is more like: having files/directories that exist inside the sandbox, but are inaccessible? Which doesn't immediately sound particularly useful.

    However, one possible use of per-path access controls would be to bind-mount all of a directory (for example /dev) into a sandbox (so that for example hotplugged raw-HID devices work as expected, with them appearing and disappearing inside the sandbox), but prevent some of it from being accessed (for example allowing access to /dev/hidraw* but not /dev/video*). Something like that would be an example of a use-case for which Landlock is one possible implementation. Is this the sort of thing that you had in mind? Or if not that, then what?

    I have very limited time for bubblewrap, so reviewing a mechanism that allows a concrete use-case like that to be solved would be a much higher priority for me than reviewing an abstract mechanism just floating around with no obvious purpose (or, worse, providing an alternative way to achieve something that can already be achieved differently).

    I am unlikely to be able to implement this feature any time in the next few months/years (and if I did, the most likely result would be that it would be left waiting for reviews for an arbitrary length of time), but if there was a PR from someone else I'd try to review it.

  3. smcv commented on Jan 23, 2026

    @smcv
    Collaborator

    I'm closing this as too broad to be actionable, but features that are less broad/speculative (have a concrete use-case), and happen to have be implemented using Landlock, could be considered. #704 is a good example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions