CVE-2025-40117: misc: pci_endpoint_test: Fix array underflow in pci_endpoint_test_ioctl()

Published Nov 12, 2025
·
Updated

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

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch eefb83790a0d
  2. 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

Nov 12, 2025
CVE Published
via MITRE·10:23 AM
Data Sourced
via MITRE·10:23 AM
DescriptionSeverity
Data Sourced
via NVD·11:15 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2025-40117?

CVE-2025-40117 is classified as a moderate severity vulnerability in the Linux kernel.

2

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.

3

What does CVE-2025-40117 affect?

CVE-2025-40117 affects the Linux kernel, specifically in the pci_endpoint_test functionality.

4

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.

5

When was CVE-2025-40117 disclosed?

CVE-2025-40117 was disclosed following the commit adding a doorbell test case that introduced this vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203