CVE-2022-50646
Description
In the Linux kernel, the following vulnerability has been resolved:
scsi: hpsa: Fix possible memory leak in hpsa_init_one()
The hpda_alloc_ctlr_info() allocates h and its field reply_map. However, in hpsa_init_one(), if alloc_percpu() failed, the hpsa_init_one() jumps to clean1 directly, which frees h and leaks the h->reply_map.
Fix by calling hpda_free_ctlr_info() to release h->replay_map and h instead free h directly.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel's hpsa driver occurs when alloc_percpu() fails, leaving reply_map un-freed.
Vulnerability
In the Linux kernel's SCSI hpsa driver, the function hpsa_init_one() allocates a controller structure h and its reply_map field via hpda_alloc_ctlr_info(). If the subsequent alloc_percpu() call fails, the error path jumps to clean1, which frees h directly but does not release the previously allocated h->reply_map, causing a memory leak [1].
Exploitation
This vulnerability is triggered during driver initialization when memory allocation fails. An attacker would need to induce memory pressure on the system to cause alloc_percpu() to fail, then trigger the driver probe path. No special privileges are required beyond the ability to cause the driver to load (e.g., via hotplug or system boot).
Impact
A local attacker could exhaust kernel memory by repeatedly triggering the leak, leading to a denial-of-service condition. The leak is small per occurrence but can accumulate over time.
Mitigation
The fix replaces the direct kfree(h) with a call to hpda_free_ctlr_info(), which properly frees both h and h->reply_map. The patch has been applied to the stable kernel trees [2][3]. Users should update to a kernel containing the fix.
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
7f4d1c14e8b40f8fc2f186529c808edbf580bbfe10a1d9fbcfc998d0a7d650aa7be66168b9c9ff300e0deVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- git.kernel.org/stable/c/0aa7be66168b1e84b2581ffff3ccb54a6c804a1envd
- git.kernel.org/stable/c/9c9ff300e0de07475796495d86f449340d454a0cnvd
- git.kernel.org/stable/c/bfe10a1d9fbccdf39f8449d62509f070d8aaaac1nvd
- git.kernel.org/stable/c/c808edbf580bfc454671cbe66e9d7c2e938e7601nvd
- git.kernel.org/stable/c/f4d1c14e8b404766ff2bb8644bb19443d73965denvd
- git.kernel.org/stable/c/f8fc2f18652917cdcc89cb23f3a1b7cb6e119c5envd
- git.kernel.org/stable/c/fc998d0a7d65672f0812f11cd0ec4bbe4f8f8507nvd
News mentions
0No linked articles in our index yet.