Skip to content

fix(policy): include /dev/zero in restrictive default Landlock policy #5903

Open

Description

@Epistetechnician

Summary

restrictive_default_policy() in crates/openshell-policy/src/lib.rs currently permits read-only access to /dev/urandom and read-write access to /dev/null, but omits /dev/zero.

Impact

Workloads running under the restrictive default Landlock policy fail with EACCES when tools or libraries open /dev/zero (for example, dd if=/dev/zero, memory/test fixtures, and build/test harnesses that read zero bytes).

Proposed Fix

Add /dev/zero to read_only in restrictive_default_policy() alongside /dev/urandom, keeping /dev/null in read_write, and cover all three device entries in restrictive_default_has_filesystem_policy.

A tested, DCO-signed patch (openshell-policy: 301/301 tests passing, clippy -D warnings clean) is ready to submit as a PR once this issue is accepted (state:accepted).

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

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions