VYPR
Unrated severityNVD Advisory· Published Dec 9, 2025· Updated Apr 15, 2026

CVE-2022-50646

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

1

Patches

7

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.