# CVE-2025-22092: PCI: Fix NULL dereference in SR-IOV VF creation error path

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-04-16T14:12:43.879Z
- Modified: 2026-06-17T08:45:07.597Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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

PCI: Fix NULL dereference in SR-IOV VF creation error path

Clean up when virtfn setup fails to prevent NULL pointer dereference
during device removal. The kernel oops below occurred due to incorrect
error handling flow when pci_setup_device() fails.

Add pci_iov_scan_device(), which handles virtfn allocation and setup and
cleans up if pci_setup_device() fails, so pci_iov_add_virtfn() doesn't need
to call pci_stop_and_remove_bus_device().  This prevents accessing
partially initialized virtfn devices during removal.

  BUG: kernel NULL pointer dereference, address: 00000000000000d0
  RIP: 0010:device_del+0x3d/0x3d0
  Call Trace:
   pci_remove_bus_device+0x7c/0x100
   pci_iov_add_virtfn+0xfa/0x200
   sriov_enable+0x208/0x420
   mlx5_core_sriov_configure+0x6a/0x160 [mlx5_core]
   sriov_numvfs_store+0xae/0x1a0

[bhelgaas: commit log, return ERR_PTR(-ENOMEM) directly]

(As written by CVE List.)

## Affected

- Linux Linux: from e3f30d563a388220a7c4e3b9a7b52ac0b0324b26 before ef421b4d206f0d3681804b8f94f06a8458a53aaf; from e3f30d563a388220a7c4e3b9a7b52ac0b0324b26 before c67a233834b778b8c78f8b62c072ccf87a9eb6d0; from e3f30d563a388220a7c4e3b9a7b52ac0b0324b26 before 04d50d953ab46d96b0b32d5ad955fceaa28622db; 6.13 (not affected: before 6.13; from 6.13.11 up to 6.13.*; from 6.14.2 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 6.13 before 6.13.11; from 6.14 before 6.14.2

## References

- <https://git.kernel.org/stable/c/ef421b4d206f0d3681804b8f94f06a8458a53aaf> (patch)
- <https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0> (patch)
- <https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2025-22092 · Whole record: https://cve.day/CVE-2025-22092.json · Rebuilt by cve.day 2026-11-25T22:58:56.608Z
