UBUNTU-CVE-2026-89761: Medium severity ubuntu/linux-azure vulnerability
In the Linux kernel, the following vulnerability has been resolved: apparmor: fix out-of-bounds write when null terminating a label vec aavecunique() null terminates at vec[n - dups] when VECFLAGTERMINATE is passed. If the components are all distinct no duplicates are dropped, dups is 0 and the terminator goes to vec[n], so the caller has to provide room for n + 1 entries. aalabelstrnparse() sets up its vector with vecsetup(profile, vec, len, gfp) and then calls aavecunique(vec, len, VECFLAGTERMINATE), but vecsetup() does not reserve the terminator entry. Up to LOCALVECENTRIES it uses the local array of LOCALVECENTRIES pointers, above that it allocates exactly len pointers. The terminator therefore lands one entry past the end of the local array when len is LOCALVECENTRIES, and one entry past the end of the allocation when len is larger. len comes from the number of "//&" separated components in the label name and labelcountstrnentries() does not bound it. An unprivileged task reaches the parse by writing to /proc/self/attr/apparmor/current or through lsmsetselfattr(2), both of which go through dosetattr(), and the name is parsed before the changeprofile permission is checked. The querylabel() path behind the securityfs .access file, which is mode 0666, performs no permission check at all. Every component has to resolve to a loaded profile, so a system with policy loaded is required. The other two VECFLAGTERMINATE users work on a label vec that aalabelalloc() has already sized with "+ 1 for null terminator entry on vec". Reserve the same entry in vecsetup() and DEFINEVEC(). Passing len + 1 from the caller instead would move len == LOCALVECENTRIES out of the local array and into kzalloc().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1
Event History
Frequently Asked Questions
Who can trigger the vulnerable parsing path?
An unprivileged local task can reach it by writing to /proc/self/attr/apparmor/current or by using lsm_set_self_attr(2). No user interaction is required, but the attacker needs local access and low privileges.
What input condition is needed to cause the out-of-bounds write?
The supplied label name must contain "//&"-separated components such that all components are distinct. The component count is not bounded, and when no duplicates are removed the null terminator is written one pointer beyond the vector allocation or local array.