AZL-117358: CVE-2026-99831 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
apparmor: fix profile leak when a policy load fails
The error paths of aareplaceprofiles() and aaunpack() do not break the refcount cycle between label and proxy. They just aaputprofile() the new profiles, which drops the label refcount from 2 to 1, and the proxy keeps the profile alive. Every failed atomic policy load (e.g. "profile can not be replaced", or a later profile in the blob failing to unpack) leaks every new profile in the set, along with its proxy, rules and its loaddata reference.
The leak is usually not visible from userspace, because the rawdata directory for a failed load is not created, but it becomes visible when the blob is deduplicated onto an existing loaddata, which then keeps its policy/rawdata/<rev> directory forever.
Add aaputunpublishedprofile(), which drops the profile's own proxy before putting the profile, and use it on those error paths. The proxy of an unpacked profile is always freshly allocated and not referenced by anything else before the profile is published, so putting it is safe.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Add aa_put_unpublished_profile() to drop an unpublished profile’s own proxy, and use it in the error paths of aa_replace_profiles() and aa_unpack() before putting the profile.
Event History
Frequently Asked Questions
What conditions trigger the leak?
The leak occurs when an atomic AppArmor policy load fails after new profiles have been created, such as when a profile cannot be replaced or when a later profile in the policy blob fails to unpack.
What resources remain allocated after a failed load?
Each failed atomic policy load can retain every new profile in the set, along with its proxy, rules, and loaddata reference. The affected profiles are kept alive by a label/proxy reference-count cycle.
How can administrators identify evidence of this issue?
The leak is usually not visible from userspace because a failed load does not create a raw_data directory. It can become visible when the policy blob is deduplicated onto existing loaddata, causing its policy/raw_data/<rev> directory to remain indefinitely.