microsoft / microsoft/WSL

AppArmor Support

Open
#8,709 15 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**Is your feature request related to a problem? Please describe.**
I cannot launch applications which rely heavily on AppArmor (particularly snaps). Attempts to start AppArmor fail as follows (e.g. on Ubuntu 22.04):
```
# aa-status
apparmor module is not loaded.
# systemctl status snapd.apparmor.service
● snapd.apparmor.service - Load AppArmor profiles managed internally by snapd
Loaded: loaded (/lib/systemd/system/snapd.apparmor.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Tue 2022-08-09 14:56:30 CDT; 49s ago
└─ ConditionSecurity=apparmor was not met
```

**Describe the solution you'd like**
Now that [this MR](https://gitlab.com/apparmor/apparmor/-/commit/72c06c4d35e7f9dac3510038974f09f841ca7cad) has been merged into AppArmor, it should have native support for running in WSL. What needs to be done on the WSL side to enable AppArmor?

**Describe alternatives you've considered**
The only alternative is to use apps that do not rely on AppArmor which is not ideal.

**Additional context**
Is there an ETA for when AppArmor will be supported in WSL2 or a workaround until it will be ready? Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked AppArmor commit and the WSL-side integration needed for AppArmor on Ubuntu 22.04. Reproduce the reported aa-status and snapd.apparmor.service failures, then define done as AppArmor loading in WSL2 and the snapd AppArmor service starting successfully.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.