Skip to content

systemd (enabled the new way) does not mount securityfs filesystem even if AppArmor, etc., are enabled in the kernel #8840

Description

Version

Microsoft Windows [Version 10.0.22000.856]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.62.1-20220904-1-microsoft-custom-WSL2+ (from WSL2-Linux-Kernel source, adding AppArmor to .config and snapd AppArmor patches)

Distro Version

Debian bookworm/sid

Other Software

No other software.

Repro Steps

  1. If present, remove existing systemd-enabling solutions.
  2. Enable systemd in WSL as per blog post, adding to /etc/wsl.conf:
[boot]
systemd=true
  1. Shut down and restart WSL.
  2. Observe that AppArmor is not operative and no filesystem is mounted at /sys/kernel/security

Expected Behavior

Securityfs should be mounted at /sys/kernel/security, thus (output from mount):

securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)

as it is automatically mounted if any LSM is present in the kernel by current systemd releases.

Actual Behavior

No filesystem is mounted at /sys/kernel/security.

Diagnostic Logs

No response

Activity

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