CVE-2025-40117: misc: pci_endpoint_test: Fix array underflow in pci_endpoint_test_ioctl()
In the Linux kernel, the following vulnerability has been resolved:
misc: pciendpointtest: Fix array underflow in pciendpointtestioctl()
Commit eefb83790a0d ("misc: pciendpointtest: Add doorbell test case") added NOBAR (-1) to the pcibarno enum which, in practical terms, changes the enum from an unsigned int to a signed int. If the user passes a negative number in pciendpointtestioctl() then it results in an array underflow in pciendpointtestbar().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch eefb83790a0d - Configuration
Apply the change that adds NO_BAR (-1) and changes the pci_barno enum from an unsigned int to a signed int to prevent array underflow in pci_endpoint_test_bar() / pci_endpoint_test_ioctl().
pci_endpoint_test pci_barno enum type = signed int
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40117?
CVE-2025-40117 is classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2025-40117?
To fix CVE-2025-40117, you should update your Linux kernel to the latest version where the vulnerability has been patched.
What does CVE-2025-40117 affect?
CVE-2025-40117 affects the Linux kernel, specifically in the pci_endpoint_test functionality.
What is the impact of CVE-2025-40117?
The impact of CVE-2025-40117 may lead to an array underflow in the pci_endpoint_test_ioctl method.
When was CVE-2025-40117 disclosed?
CVE-2025-40117 was disclosed following the commit adding a doorbell test case that introduced this vulnerability.