# CVE-2025-22031: PCI/bwctrl: Fix NULL pointer dereference on bus number exhaustion

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-04-16T14:11:51.264Z
- **Modified:** 2026-06-17T08:44:53.193Z

## Who should check

- Anyone running Linux \>= 665745f274870c921020f610e2c99a3b1613519b, \< d93d309013e89631630a12b1770d27e4be78362a; \>= 665745f274870c921020f610e2c99a3b1613519b, \< 1181924af78e5299ddec6e457789c02dd5966559; \>= 665745f274870c921020f610e2c99a3b1613519b, \< 667f053b05f00a007738cd7ed6fa1901de19dc7e
- Anyone running Linux 6.13

## Description

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

PCI/bwctrl: Fix NULL pointer dereference on bus number exhaustion

When BIOS neglects to assign bus numbers to PCI bridges, the kernel
attempts to correct that during PCI device enumeration.  If it runs out
of bus numbers, no pci\_bus is allocated and the "subordinate" pointer in
the bridge's pci\_dev remains NULL.

The PCIe bandwidth controller erroneously does not check for a NULL
subordinate pointer and dereferences it on probe.

Bandwidth control of unusable devices below the bridge is of questionable
utility, so simply error out instead.  This mirrors what PCIe hotplug does
since commit 62e4492c3063 ("PCI: Prevent NULL dereference during pciehp
probe").

The PCI core emits a message with KERN\_INFO severity if it has run out of
bus numbers.  PCIe hotplug emits an additional message with KERN\_ERR
severity to inform the user that hotplug functionality is disabled at the
bridge.  A similar message for bandwidth control does not seem merited,
given that its only purpose so far is to expose an up-to-date link speed
in sysfs and throttle the link speed on certain laptops with limited
Thermal Design Power.  So error out silently.

User-visible messages:

  pci 0000:16:02.0: bridge configuration invalid (\[bus 00-00\]), reconfiguring
  \[...\]
  pci\_bus 0000:45: busn\_res: \[bus 45-74\] end is updated to 74
  pci 0000:16:02.0: devices behind bridge are unusable because \[bus 45-74\] cannot be assigned for them
  \[...\]
  pcieport 0000:16:02.0: pciehp: Hotplug bridge without secondary bus, ignoring
  \[...\]
  BUG: kernel NULL pointer dereference
  RIP: pcie\_update\_link\_speed
  pcie\_bwnotif\_enable
  pcie\_bwnotif\_probe
  pcie\_port\_probe\_service
  really\_probe

## Affected and fixed versions

- Linux: \>= 665745f274870c921020f610e2c99a3b1613519b, \< d93d309013e89631630a12b1770d27e4be78362a; \>= 665745f274870c921020f610e2c99a3b1613519b, \< 1181924af78e5299ddec6e457789c02dd5966559; \>= 665745f274870c921020f610e2c99a3b1613519b, \< 667f053b05f00a007738cd7ed6fa1901de19dc7e (cvelist)
- Linux: 6.13 (cvelist)

## Mitigation

- Upgrade Linux to 667f053b05f00a007738cd7ed6fa1901de19dc7e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-22031. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-22031.md
Affected: Linux >= 665745f274870c921020f610e2c99a3b1613519b, < d93d309013e89631630a12b1770d27e4be78362a; >= 665745f274870c921020f610e2c99a3b1613519b, < 1181924af78e5299ddec6e457789c02dd5966559; >= 665745f274870c921020f610e2c99a3b1613519b, < 667f053b05f00a007738cd7ed6fa1901de19dc7e; Linux 6.13
Fixed in: Linux 1181924af78e5299ddec6e457789c02dd5966559, Linux 667f053b05f00a007738cd7ed6fa1901de19dc7e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-22031 being exploited?

There is no confirmed exploitation: CVE-2025-22031 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-22031?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-22031?

Linux \>= 665745f274870c921020f610e2c99a3b1613519b, \< d93d309013e89631630a12b1770d27e4be78362a; \>= 665745f274870c921020f610e2c99a3b1613519b, \< 1181924af78e5299ddec6e457789c02dd5966559; \>= 665745f274870c921020f610e2c99a3b1613519b, \< 667f053b05f00a007738cd7ed6fa1901de19dc7e; Linux 6.13.

### Is there a fix for CVE-2025-22031?

Yes. Fixed in Linux 1181924af78e5299ddec6e457789c02dd5966559, Linux 667f053b05f00a007738cd7ed6fa1901de19dc7e. Upgrade Linux to 667f053b05f00a007738cd7ed6fa1901de19dc7e or later.

### How do I check if I'm affected by CVE-2025-22031?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d93d309013e89631630a12b1770d27e4be78362a>
- patch: <https://git.kernel.org/stable/c/1181924af78e5299ddec6e457789c02dd5966559>
- patch: <https://git.kernel.org/stable/c/667f053b05f00a007738cd7ed6fa1901de19dc7e>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-22031>

HTML: <https://flawdb.com/CVE-2025-22031> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-22031>
