CVE-2025-22092

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]
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

31 Oct 2025, 20:53

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: Se corrige la desreferencia de NULL en la ruta de error de creación de VF de SR-IOV. Se limpia cuando falla la configuración de virtfn para evitar la desreferencia de punteros NULL durante la eliminación del dispositivo. El error del kernel que se muestra a continuación se produjo debido a un flujo de gestión de errores incorrecto cuando falla pci_setup_device(). Se ha añadido pci_iov_scan_device(), que gestiona la asignación y configuración de virtfn y realiza la limpieza si falla pci_setup_device(), de modo que pci_iov_add_virtfn() no necesite llamar a pci_stop_and_remove_bus_device(). Esto impide el acceso a dispositivos virtfn parcialmente inicializados durante la eliminación. ERROR: desreferencia de puntero NULL del kernel, dirección: 00000000000000d0 RIP: 0010:device_del+0x3d/0x3d0 Rastreo de llamadas: 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: registro de confirmaciones, devuelve ERR_PTR(-ENOMEM) directamente]
First Time Linux linux Kernel
Linux
References () https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db - () https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db - Patch
References () https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0 - () https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0 - Patch
References () https://git.kernel.org/stable/c/ef421b4d206f0d3681804b8f94f06a8458a53aaf - () https://git.kernel.org/stable/c/ef421b4d206f0d3681804b8f94f06a8458a53aaf - Patch
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CWE CWE-476

16 Apr 2025, 15:16

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-16 15:16

Updated : 2025-10-31 20:53


NVD link : CVE-2025-22092

Mitre link : CVE-2025-22092

CVE.ORG link : CVE-2025-22092


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-476

NULL Pointer Dereference