CVE-2022-50734
Description
In the Linux kernel, the following vulnerability has been resolved:
nvmem: core: Fix memleak in nvmem_register()
dev_set_name will alloc memory for nvmem->dev.kobj.name in nvmem_register, when nvmem_validate_keepouts failed, nvmem's memory will be freed and return, but nobody will free memory for nvmem->dev.kobj.name, there will be memleak, so moving nvmem_validate_keepouts() after device_register() and let the device core deal with cleaning name in error cases.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel's nvmem_register() occurs when nvmem_validate_keepouts() fails, because the device name allocated by dev_set_name is not freed.
Vulnerability
Analysis
A memory leak vulnerability exists in the Linux kernel's NVMEM (Non-Volatile Memory) subsystem. In the nvmem_register() function, dev_set_name() allocates memory for the device name (nvmem->dev.kobj.name). If the subsequent call to nvmem_validate_keepouts() fails, the function frees the nvmem structure but does not free the allocated device name, leading to a memory leak [1].
Exploitation
This is a local vulnerability that can be triggered by any user or process that can cause the NVMEM registration to fail during the keepouts validation step. No special privileges are required beyond the ability to trigger NVMEM device registration (e.g., via hotplug or driver binding). The attacker does not need to be authenticated to the system in a privileged sense, but must have the ability to interact with the NVMEM subsystem [1].
ImpactAn attacker who can repeatedly trigger this error path can exhaust kernel memory, leading to a denial-of-service (DoS) condition. The leak is per-failure, so repeated attempts can accumulate and eventually cause system instability or crash [1].
MitigationThe fix has been applied in the
Linux kernel stable tree. The patch moves the nvmem_validate_keepouts() call after device_register(), so that the device core handles cleanup of the device name in error cases. Users should update to a kernel version containing the commit 9391cc3a787a [1].
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
49391cc3a787a2bd2774df0ceb6054b9b239abd1244561fa2Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.