cxl: Fix a memory leak in an error handling path
Description
A memory leak in the Linux kernel CXL driver's afu_allocate_irqs() error path can cause kernel memory exhaustion.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel CXL driver's afu_allocate_irqs() error path can cause kernel memory exhaustion.
Vulnerability
A memory leak exists in the Linux kernel's CXL (Coherent Accelerator Interface) driver, specifically in the afu_allocate_irqs() function. The function uses bitmap_zalloc() to allocate a bitmap, but the error handling path does not free this allocation when a subsequent operation fails. According to the fix commit [1], a matching bitmap_free() call is required. The issue affects Linux kernel versions prior to the inclusion of commit c2c7a29f99788e9e5dfe41d16868ea33da7cc235. The exact version range is not specified in the available references, but the vulnerability is present in any kernel containing the flawed error path.
Exploitation
An attacker would need to trigger a failure in the afu_allocate_irqs() function after the bitmap_zalloc() call has succeeded. This could conceivably be achieved by inducing an error in a subsequent allocation (e.g., kzalloc for an array of IRQ contexts) or by providing invalid parameters that cause an early return. The exploit likely requires local access to the system and the ability to interact with a CXL accelerator device, as the function is part of the CXL driver's initialization path. The precise prerequisites are not fully detailed in the available references.
Impact
Successful exploitation results in a kernel memory leak: each invocation of the error path that fails to free the bitmap permanently wastes a small amount of kernel memory. Repeated exploitation can exhaust system memory, leading to resource exhaustion and denial of service. The vulnerability does not directly allow privilege escalation or arbitrary code execution.
Mitigation
The fix is provided by Linux kernel commit c2c7a29f99788e9e5dfe41d16868ea33da7cc235, which adds the missing bitmap_free() in the error path. Users should update to a kernel version that includes this commit. As of the publication date (2025-06-18), the fix is present in stable kernel releases. No workaround is available; the only mitigation is to apply the patch or upgrade to a fixed kernel version.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
10- osv-coords8 versionspkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2012%20SP5pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5-LTSSpkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Server%20LTSS%20Extended%20Security%2012%20SP5pkg:rpm/suse/kernel-source&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5-LTSSpkg:rpm/suse/kernel-source&distro=SUSE%20Linux%20Enterprise%20Server%20LTSS%20Extended%20Security%2012%20SP5pkg:rpm/suse/kernel-syms&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5-LTSSpkg:rpm/suse/kernel-syms&distro=SUSE%20Linux%20Enterprise%20Server%20LTSS%20Extended%20Security%2012%20SP5pkg:rpm/suse/kgraft-patch-SLE12-SP5_Update_71&distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2012%20SP5
< 4.12.14-122.269.1+ 7 more
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 4.12.14-122.269.1
- (no CPE)range: < 1-8.3.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
8- git.kernel.org/stable/c/3a15b45b5454da862376b5d69a4967f5c6fa1368mitre
- git.kernel.org/stable/c/4be138bcd6d68cec0ce47051b117541061f5141amitre
- git.kernel.org/stable/c/6544ff559315498ad6c0a311359ca44987f9ca07mitre
- git.kernel.org/stable/c/695af60af755873399ce01cb97176768828bc1fdmitre
- git.kernel.org/stable/c/89d51dc6878c47b6400922fac21b6a33f9d1a588mitre
- git.kernel.org/stable/c/addff638c41753639368c252d0c5ba0d8fe9ed97mitre
- git.kernel.org/stable/c/c2557780ee7818b701681c226fa4cb7c0b171665mitre
- git.kernel.org/stable/c/c2c7a29f99788e9e5dfe41d16868ea33da7cc235mitre
News mentions
0No linked articles in our index yet.