CVE-2025-40116
Description
In the Linux kernel, the following vulnerability has been resolved:
usb: host: max3421-hcd: Fix error pointer dereference in probe cleanup
The kthread_run() function returns error pointers so the max3421_hcd->spi_thread pointer can be either error pointers or NULL. Check for both before dereferencing it.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's MAX3421 HCD HCD driver, a NULL or error pointer dereference in probe cleanup can occur when kthread_run() fails, leading to a potential crash.
Vulnerability
Overview
In the Linux kernel, the MAX3421 Host Controller Driver (HCD) for USB over SPI contains a bug in its probe cleanup path. The kthread_run() function can return either a valid pointer, NULL, or an error pointer (e.g., ERR_PTR(-ENOMEM)). The driver's cleanup code only checked for NULL before dereferencing the spi_thread pointer, but did not handle error pointers. This oversight can lead to a NULL or error pointer dereference when the probe fails after a thread creation error [1][2][3][4].
Exploitation
Conditions
An attacker would need to trigger a failure in kthread_run() during the probe of the MAX3421 device. This could be achieved by exhausting system resources (e.g., memory pressure) or by other means that cause thread creation to fail. The vulnerability is triggered during driver probe, which typically occurs at device enumeration at boot or hotplug. No special privileges are required beyond the ability to cause the device to be probed.
Impact
Impact
If exploited, the dereference of an invalid pointer can cause a kernel crash (oops), leading to a denial of service (DoS) on the affected system. The impact is limited to availability; there is no evidence of privilege escalation or data corruption from this bug.
Mitigation
The fix has been applied to the Linux kernel stable branches as of the referenced commits [1][2][3][4]. Users should update their kernel to a version containing the fix. No workaround is available other than avoiding the use of the MAX3421 hardware or applying the patch.
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
889838fe5c6c03facf69a735ee0e0ce06f3573723c3dda1ccb0439e3762ace68ea6de1d05b682ce44bf20186e8f2bdba5Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/186e8f2bdba551f3ae23396caccd452d985c23e3nvd
- git.kernel.org/stable/c/3723c3dda1cc82c9bbca08fcbd46705a361bfd56nvd
- git.kernel.org/stable/c/3facf69a735e730ae36387f18780fe420708aa91nvd
- git.kernel.org/stable/c/89838fe5c6c010ff8d3924f22afd9c18c5c95310nvd
- git.kernel.org/stable/c/b0439e3762ac9ea580f714e1504a1827d1ad32f5nvd
- git.kernel.org/stable/c/b682ce44bf20ada752a2f6ce70d5a575c56f6a35nvd
- git.kernel.org/stable/c/e0e0ce06f3571be9b26790e4df56ba37b1de8543nvd
- git.kernel.org/stable/c/e68ea6de1d0551f90d7a2c75f82cb3ebe5e397dcnvd
News mentions
0No linked articles in our index yet.