CVE-2022-50860
Description
In the Linux kernel, the following vulnerability has been resolved:
apparmor: Fix memleak in alloc_ns()
After changes in commit a1bd627b46d1 ("apparmor: share profile name on replacement"), the hname member of struct aa_policy is not valid slab object, but a subset of that, it can not be freed by kfree_sensitive(), use aa_policy_destroy() to fix it.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel's AppArmor alloc_ns() function occurs when the hname member of struct aa_policy is freed with kfree_sensitive() instead of aa_policy_destroy().
Vulnerability
The Linux kernel's AppArmor security module contains a memory leak in the alloc_ns() function. After commit a1bd627b46d1 ("apparmor: share profile name on replacement"), the hname member of struct aa_policy is no longer a valid slab object; it is a subset of the structure and cannot be freed using kfree_sensitive(). The proper cleanup function aa_policy_destroy() must be used instead to avoid leaking memory [1].
Exploitation
To trigger this bug, an attacker would need to induce namespace creation in AppArmor, leading to a call to alloc_ns() that fails to correctly free memory during cleanup. No special privileges beyond the ability to create namespaces are required, making the attack surface relatively broad on systems using AppArmor.
Impact
An attacker able to repeatedly trigger this code path can exhaust kernel memory, leading to a denial-of-service (DoS) condition. There is no evidence of code execution or privilege escalation resulting from this flaw.
Mitigation
The fix was included in the Linux kernel stable tree. Users should apply the kernel update that includes commit 0250cf8d37bb (or 12695b4b76d4). No workaround is available; patching is the recommended mitigation [2].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
59a32aa87a25d5f509fa740b10250cf8d37bb12695b4b76d4e9e6fa49dbabVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/0250cf8d37bb5201a117177afd24dc73a1c81657nvd
- git.kernel.org/stable/c/12695b4b76d437b9c0182a6f7dfb2248013a9dafnvd
- git.kernel.org/stable/c/5f509fa740b17307f0cba412485072f632d5af36nvd
- git.kernel.org/stable/c/9a32aa87a25d800b2c6f47bc2749a7bfd9a486f3nvd
- git.kernel.org/stable/c/e9e6fa49dbab6d84c676666f3fe7d360497fd65bnvd
News mentions
0No linked articles in our index yet.