umount options are incorrectly treated as mount options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
Triaged
|
Medium
|
Unassigned | ||
apparmor (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
apparmor_parser is treating options on umount rules as mount options. The flags used in mount(2) are entirely different than the flags used in umount2() and apparmor_parser knows nothing about the umount2() flags (MNT_FORCE, MNT_DETACH, MNT_EXPIRE, UMOUNT_NOFOLLOW).
This can be demonstrated by trying to compile a policy, with apparmor_parser version 2.9.1, containing a umount rule that is conditional on the "force" option:
$ echo "/t { umount options=force, }" | ./apparmor_parser -qQ; echo $?
unsupported mount options
1
Now we'll use a mount flag in the umount rule:
$ echo "/t { umount options=nosuid, }" | ./apparmor_parser -qQ; echo $?
0
The umount rule with a umount option fails to compile but the umount rule with a mount option compiles. This is not the intended behavior and it should be the other way around.
Changed in apparmor (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: aa-parser |
Ping?
Just wondering whether this is fitting into wily timeframe.