CVE-2022-50074: apparmor: Fix memleak in aa_simple_write_to_buffer()
In the Linux kernel, the following vulnerability has been resolved:
apparmor: Fix memleak in aa_simple_write_to_buffer()
When copy_from_user failed, the memory is freed by kvfree. however the
management struct and data blob are allocated independently, so only
kvfree(data) cause a memleak issue here. Use aa_put_loaddata(data) to
fix this issue.
Security readout for executives and security teams
Plain-English summary
CVE-2022-50074 is a Linux kernel AppArmor memory leak. If a user-to-kernel copy fails in a specific AppArmor buffer write path, part of an allocated structure is not released. The provided sources do not assign CVSS severity or report active exploitation.
Executive priority
Treat this as routine kernel maintenance unless AppArmor-heavy systems are exposed to untrusted local users. There is no provided evidence of active exploitation or high-impact compromise, but kernel memory leaks still warrant timely patching in normal update cycles.
Technical view
The flaw is in AppArmor aa_simple_write_to_buffer(). On copy_from_user failure, the code freed only the data blob with kvfree(data), while the management structure was allocated separately. The kernel fix uses aa_put_loaddata(data) to release the full allocation correctly.
Likely exposure
Exposure is limited to Linux systems running affected kernel versions or commits with AppArmor code present. The bundle lists Linux kernel versions and stable patch commits, but does not provide distribution-specific package names or exact operational prerequisites.
Exploitation context
No cited source reports exploitation, and KEV status is false. The source bundle does not state remote reachability, required privileges, or practical exploitability. Based on the affected component, this appears to be a local kernel/AppArmor memory-management issue rather than an internet-facing service flaw.
Researcher notes
The record is sparse: no CVSS, CWE, exploit details, or distro mapping are included. The key technical signal is a cleanup-path bug on copy_from_user failure in AppArmor. Avoid assuming privilege requirements or denial-of-service impact beyond what vendors confirm.
Mitigation direction
Apply Linux vendor or distribution kernel updates containing the referenced stable fixes.
Prioritize systems that use AppArmor for confinement or policy loading.
Review kernel.org stable commits if maintaining custom kernels.
If patch timing is unclear, follow vendor guidance for affected kernel branches.
Validation and detection
Inventory running Linux kernel versions across servers and images.
Confirm whether AppArmor is enabled or packaged on those systems.
Check vendor advisories or package changelogs for CVE-2022-50074 coverage.
For custom kernels, verify the aa_put_loaddata(data) fix is present.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-50074 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
7Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Jun 18, 2025, 11:02 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.