aa-status crashes with a backtrace if prevented from reading the profile list
Bug #1383703 reported by
Steve Beattie
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
Confirmed
|
Low
|
Unassigned |
Bug Description
If aa-status is run within an apparmor confined environment (e.g. within an lxc container), it throws a python traceback if apparmor prevents it from reading the profile list:
Traceback (most recent call last):
File "/usr/sbin/
commands[
File "/usr/sbin/
if get_profiles() == {}:
File "/usr/sbin/
for p in open(apparmor_
PermissionError: [Errno 13] Permission denied: '/sys/kernel/
Changed in apparmor: | |
importance: | Undecided → Low |
Changed in apparmor: | |
status: | New → Confirmed |
tags: | added: aa-tools |
To post a comment you must log in.
This is because the default container AA profile prevents reading under /sys/kernel/ security/ **. Changing the profile to allow reading makes aa-status work but it shows the list of profiles from the host.
This makes me wonder why https:/ /wiki.ubuntu. com/LxcSecurity has this entry:
* apparmor policy stacking allows containers to use apparmor themselves even while
they apparmor-confined by the host