CVE-2025-40089: cxl/features: Add check for no entries in cxl_feature_info
In the Linux kernel, the following vulnerability has been resolved:
cxl/features: Add check for no entries in cxlfeatureinfo
cxl EDAC calls cxlfeatureinfo() to get the feature information and if the hardware has no Features support, cxlfs may be passed in as NULL.
[ 51.957498] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 51.965571] #PF: supervisor read access in kernel mode [ 51.971559] #PF: errorcode(0x0000) - not-present page [ 51.977542] PGD 17e4f6067 P4D 0 [ 51.981384] Oops: Oops: 0000 [#1] SMP NOPTI [ 51.986300] CPU: 49 UID: 0 PID: 3782 Comm: systemd-udevd Not tainted 6.17.0dj test+ #64 PREEMPT(voluntary) [ 51.997355] Hardware name: <removed> [ 52.009790] RIP: 0010:cxlfeatureinfo+0xa/0x80 [cxlcore]
Add a check for cxlfs before dereferencing it and return -EOPNOTSUPP if there is no cxlfs created due to no hardware support.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In cxl_feature_info(), check whether cxlfs has no entries before dereferencing it, and return -EOPNOTSUPP when the hardware has no Features support and no cxlfs is created.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40089?
CVE-2025-40089 has been classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-40089?
To fix CVE-2025-40089, update the Linux kernel to the latest version where the vulnerability has been patched.
Which software is affected by CVE-2025-40089?
CVE-2025-40089 affects the Linux kernel, specifically related to the handling of cxl features.
What does CVE-2025-40089 affect in the Linux kernel?
CVE-2025-40089 affects the cxl_feature_info function which may receive NULL when no feature support is present on hardware.
Is there a workaround for CVE-2025-40089?
Currently, there are no known workarounds for CVE-2025-40089; updating the kernel is the recommended action.