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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2025-11-12T10:23:17.851Z
- Modified: 2026-10-19T21:10:00.160Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

misc: pci_endpoint_test: Fix array underflow in pci_endpoint_test_ioctl()

Commit eefb83790a0d ("misc: pci_endpoint_test: Add doorbell test case")
added NO_BAR (-1) to the pci_barno enum which, in practical terms,
changes the enum from an unsigned int to a signed int.  If the user
passes a negative number in pci_endpoint_test_ioctl() then it results in
an array underflow in pci_endpoint_test_bar().

(As written by CVE List.)

## Affected

- Linux Linux: from eefb83790a0dda112d1755e4f5e213738d717e76 before 6df3687922570f753574c40b35e83b26b32292d0; from eefb83790a0dda112d1755e4f5e213738d717e76 before 1ad82f9db13d85667366044acdfb02009d576c5a; 6.17 (not affected: before 6.17; from 6.17.3 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/6df3687922570f753574c40b35e83b26b32292d0>
- <https://git.kernel.org/stable/c/1ad82f9db13d85667366044acdfb02009d576c5a>

## Sources

- CVE List: [CVE-2025-40117](https://www.cve.org/CVERecord?id=CVE-2025-40117), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-40117](https://nvd.nist.gov/vuln/detail/CVE-2025-40117), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-40117 · Whole record: https://cve.day/CVE-2025-40117.json · Rebuilt by cve.day 2026-11-25T22:59:07.541Z
