CVE-2022-50669
Description
In the Linux kernel, the following vulnerability has been resolved:
misc: ocxl: fix possible name leak in ocxl_file_register_afu()
If device_register() returns error in ocxl_file_register_afu(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and info is freed in info_release().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel's OCXL driver when device_register() fails, potentially leading to resource exhaustion.
Description
The vulnerability is a memory leak in the ocxl_file_register_afu() function within the Linux kernel's OpenCAPI (OCXL) driver. When device_register() fails, the name allocated by dev_set_name() is not freed, leading to a leak of kernel memory [1][2][3].
Exploitation
Exploitation requires triggering a failure in device_register() during the registration of an AFU (Accelerator Function Unit). An attacker with local access and the ability to manipulate device registration (e.g., via hotplug or certain sysfs operations) could potentially cause repeated failures, leading to gradual memory depletion. No special privileges beyond local access are necessary.
Impact
A successful exploitation can result in kernel memory exhaustion, potentially causing system instability or denial of service (DoS). The leak is small per occurrence, but repeated triggers could exhaust memory resources.
Mitigation
The fix involves calling put_device() in the error path, which triggers kobject_cleanup() to free the device name and the info structure via the info_release() callback. Patches are available in the stable kernel tree (e.g., commits [1], [2], [3]) and have been backported to affected versions. Users should update to the latest stable kernel.
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
2Patches
60cd05062371a7525741cb3023299983a6bf6557b7de055d12fce8b3583d1a4cb1004aeedVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/0cd05062371a49774e8a45258bdedf0bd6d3d327nvd
- git.kernel.org/stable/c/2fce8b3583d1641a1716486f408478b58e96ec91nvd
- git.kernel.org/stable/c/3299983a6bf628249ac650908e62d12de959341envd
- git.kernel.org/stable/c/557b7de055d1e230ddb6664c29d26917b8db9143nvd
- git.kernel.org/stable/c/7525741cb302a1672b8c3a5edb2a08e4229b5c7cnvd
- git.kernel.org/stable/c/a4cb1004aeed2ab893a058fad00a5b41a12c4691nvd
News mentions
0No linked articles in our index yet.