CVE-2022-49891: tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()
In the Linux kernel, the following vulnerability has been resolved:
tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()
test_gen_kprobe_cmd() only free buf in fail path, hence buf will leak
when there is no failure. Move kfree(buf) from fail path to common path
to prevent the memleak. The same reason and solution in
test_gen_kretprobe_cmd().
unreferenced object 0xffff888143b14000 (size 2048):
comm "insmod", pid 52490, jiffies 4301890980 (age 40.553s)
hex dump (first 32 bytes):
70 3a 6b 70 72 6f 62 65 73 2f 67 65 6e 5f 6b 70 p:kprobes/gen_kp
72 6f 62 65 5f 74 65 73 74 20 64 6f 5f 73 79 73 robe_test do_sys
backtrace:
[<000000006d7b836b>] kmalloc_trace+0x27/0xa0
[<0000000009528b5b>] 0xffffffffa059006f
[<000000008408b580>] do_one_initcall+0x87/0x2a0
[<00000000c4980a7e>] do_init_module+0xdf/0x320
[<00000000d775aad0>] load_module+0x3006/0x3390
[<00000000e9a74b80>] __do_sys_finit_module+0x113/0x1b0
[<000000003726480d>] do_syscall_64+0x35/0x80
[<000000003441e93b>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel memory leak in kprobe/kretprobe tracing test code. A local, low-privileged actor could cause kernel memory to be consumed, potentially affecting availability. The sources do not show remote attackability, data theft, integrity impact, or active exploitation.
Executive priority
Treat as a normal kernel availability fix, not an emergency internet-facing incident. Prioritize patching shared Linux systems and hosts with untrusted local users, then fold remaining systems into routine kernel maintenance.
Technical view
The affected functions test_gen_kprobe_cmd() and test_gen_kretprobe_cmd() allocated a buffer and freed it only on failure. Successful paths leaked about 2048 bytes per observed object. The CVSS vector is local, low complexity, low privileges, no user interaction, and high availability impact.
Likely exposure
Exposure is most likely on systems running affected Linux kernel versions where local users can exercise the affected tracing kprobe/kretprobe test path. Internet-facing exposure is not indicated by the provided sources.
Exploitation context
No KEV listing is provided, and the source bundle does not cite active exploitation. The described impact is local denial of service through memory exhaustion rather than confidentiality or integrity compromise.
Researcher notes
Evidence is limited to the CVE record and kernel stable commit references. The affected list in the bundle is version-oriented but not a full distribution matrix, so distro backport status must be verified separately.
Mitigation direction
Update to a kernel or distribution package containing the referenced stable commits.
Check Linux distribution advisories for CVE-2022-49891-specific backports.
Prioritize shared systems where untrusted local users have shell access.
Restrict unnecessary local access to tracing or test-related kernel functionality where feasible.
Validation and detection
Inventory Linux kernel versions across affected assets.
Confirm vendor packages include the stable fixes or CVE backport.
Review kernel advisory notes for affected version ranges in your distribution.
Validate that no KEV or cited exploitation source exists before escalating urgency.
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.
cwe · low confidence lookup
CWE-401: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
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.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-401 · source CWE mapping
Missing Release of Memory after Effective Lifetime
Missing Release of Memory after Effective Lifetime represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.