Activity log for bug #1728130

Date Who What changed Old value New value Message
2017-10-27 18:52:22 John Johansen bug added bug
2017-10-27 20:25:51 Doug Smythies bug added subscriber Doug Smythies
2022-11-23 13:16:41 Georgia Garcia description Currently allows pinning a single feature abi or running in a developer mode where the full abi available of the current kernel is enforced. However this can result in breaking applications in undesirable ways. If an application is shipped with its own policy, that policy might be different than the pinned feature abi, which can either result in denials because features the policy was not developed for are being enforced. If the feature version is not pinned then the most recent kernel abi is taken and applied to policy, which has not been updated. This can result in denials for userspace effectively breaking userspace. This is less than ideal for most users as it leads to a bad experience than they have not opted into and can lead to them disabling security protections. [ Impact ] Currently allows pinning a single feature abi or running in a developer mode where the full abi available of the current kernel is enforced. However this can result in breaking applications in undesirable ways. If an application is shipped with its own policy, that policy might be different than the pinned feature abi, which can either result in denials because features the policy was not developed for are being enforced. If the feature version is not pinned then the most recent kernel abi is taken and applied to policy, which has not been updated. This can result in denials for userspace effectively breaking userspace. This is less than ideal for most users as it leads to a bad experience than they have not opted into and can lead to them disabling security protections. [ Test Plan ] The test can be done with several features. Here we are using mqueue as an example. Verify that the kernel that has mqueue mediation support: root@ubuntu:~# [ -e /sys/kernel/security/apparmor/features/ipc/posix_mqueue ] && echo "supports mqueue" supports mqueue cd /tmp pull-ppa-source --ppa georgiag/mqueue-sru apparmor focal cd apparmor-2.13.3/tests/regression/apparmor/ USE_SYSTEM=1 make Using the parser from the mqueue-sru PPA, load the profile. echo " abi <kernel>, include <tunables/global> /tmp/apparmor-2.13.3/tests/regression/apparmor/posix_mq_rcv { include <abstractions/base> /tmp/apparmor-2.13.3/tests/regression/apparmor/posix_mq_snd ux, } " | apparmor_parser -q -r Run the test, which should fail. ./posix_mq_rcv -c ./posix_mq_snd FAIL - could not open mq: Permission denied Now use an abi that does not have mqueue. This simulates a scenario where a policy was developed before mqueue support was added, so posix message queues should be allowed by default. echo " abi <abi/2.13>, include <tunables/global> /tmp/apparmor-2.13.3/tests/regression/apparmor/posix_mq_rcv { include <abstractions/base> /tmp/apparmor-2.13.3/tests/regression/apparmor/posix_mq_snd ux, } " | apparmor_parser -q -r Run the test again, it should pass. ./posix_mq_rcv -c ./posix_mq_snd PASS [ Where problems could occur ] ABI pinning forces policies that don't have abi specified in their profile to use the ABI pinned in parser.conf. When the ABI is pinned and the user is trying to use mediation that is not in the pinned ABI, they might be confused why it is always being allowed. This can be circumvented by specifying the correct abi in the profile. [ Other Info ] The patches for focal (apparmor-2.13) can be found at: https://launchpad.net/~georgiag/+archive/ubuntu/mqueue-sru/ apparmor-3.0 already has this feature.
2022-11-23 20:47:57 Georgia Garcia merge proposal linked https://code.launchpad.net/~georgiag/qa-regression-testing/+git/qa-regression-testing/+merge/433546
2022-11-29 09:14:01 Launchpad Janitor apparmor (Ubuntu): status New Confirmed
2022-12-06 10:01:25 Łukasz Zemczak apparmor (Ubuntu Focal): status New Fix Committed
2022-12-06 10:01:27 Łukasz Zemczak bug added subscriber Ubuntu Stable Release Updates Team
2022-12-06 10:01:29 Łukasz Zemczak bug added subscriber SRU Verification
2022-12-06 10:01:33 Łukasz Zemczak tags verification-needed verification-needed-focal
2022-12-12 12:33:57 Georgia Garcia tags verification-needed verification-needed-focal verification-done verification-done-focal
2023-03-29 00:12:21 Launchpad Janitor apparmor (Ubuntu Focal): status Fix Committed Fix Released
2023-03-29 00:12:30 Chris Halse Rogers removed subscriber Ubuntu Stable Release Updates Team