{"id":"CVE-2025-22092","state":"PUBLISHED","title":"PCI: Fix NULL dereference in SR-IOV VF creation error path","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: Fix NULL dereference in SR-IOV VF creation error path\n\nClean up when virtfn setup fails to prevent NULL pointer dereference\nduring device removal. The kernel oops below occurred due to incorrect\nerror handling flow when pci_setup_device() fails.\n\nAdd pci_iov_scan_device(), which handles virtfn allocation and setup and\ncleans up if pci_setup_device() fails, so pci_iov_add_virtfn() doesn't need\nto call pci_stop_and_remove_bus_device().  This prevents accessing\npartially initialized virtfn devices during removal.\n\n  BUG: kernel NULL pointer dereference, address: 00000000000000d0\n  RIP: 0010:device_del+0x3d/0x3d0\n  Call Trace:\n   pci_remove_bus_device+0x7c/0x100\n   pci_iov_add_virtfn+0xfa/0x200\n   sriov_enable+0x208/0x420\n   mlx5_core_sriov_configure+0x6a/0x160 [mlx5_core]\n   sriov_numvfs_store+0xae/0x1a0\n\n[bhelgaas: commit log, return ERR_PTR(-ENOMEM) directly]","publishedAt":"2025-04-16T14:12:43.879Z","updatedAt":"2026-05-11T21:12:43.548Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e3f30d563a388220a7c4e3b9a7b52ac0b0324b26","status":"affected","lessThan":"ef421b4d206f0d3681804b8f94f06a8458a53aaf","versionType":"git"},{"version":"e3f30d563a388220a7c4e3b9a7b52ac0b0324b26","status":"affected","lessThan":"c67a233834b778b8c78f8b62c072ccf87a9eb6d0","versionType":"git"},{"version":"e3f30d563a388220a7c4e3b9a7b52ac0b0324b26","status":"affected","lessThan":"04d50d953ab46d96b0b32d5ad955fceaa28622db","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/iov.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.13.11","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14.2","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/iov.c"]}],"references":["https://git.kernel.org/stable/c/ef421b4d206f0d3681804b8f94f06a8458a53aaf","https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0","https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/22xxx/CVE-2025-22092.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-22092","state":"PUBLISHED","datePublished":"2025-04-16T14:12:43.879Z","dateUpdated":"2026-05-11T21:12:43.548Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.817Z"},"containers":{"cna":{"title":"PCI: Fix NULL dereference in SR-IOV VF creation error path","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: Fix NULL dereference in SR-IOV VF creation error path\n\nClean up when virtfn setup fails to prevent NULL pointer dereference\nduring device removal. The kernel oops below occurred due to incorrect\nerror handling flow when pci_setup_device() fails.\n\nAdd pci_iov_scan_device(), which handles virtfn allocation and setup and\ncleans up if pci_setup_device() fails, so pci_iov_add_virtfn() doesn't need\nto call pci_stop_and_remove_bus_device().  This prevents accessing\npartially initialized virtfn devices during removal.\n\n  BUG: kernel NULL pointer dereference, address: 00000000000000d0\n  RIP: 0010:device_del+0x3d/0x3d0\n  Call Trace:\n   pci_remove_bus_device+0x7c/0x100\n   pci_iov_add_virtfn+0xfa/0x200\n   sriov_enable+0x208/0x420\n   mlx5_core_sriov_configure+0x6a/0x160 [mlx5_core]\n   sriov_numvfs_store+0xae/0x1a0\n\n[bhelgaas: commit log, return ERR_PTR(-ENOMEM) directly]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e3f30d563a388220a7c4e3b9a7b52ac0b0324b26","status":"affected","lessThan":"ef421b4d206f0d3681804b8f94f06a8458a53aaf","versionType":"git"},{"version":"e3f30d563a388220a7c4e3b9a7b52ac0b0324b26","status":"affected","lessThan":"c67a233834b778b8c78f8b62c072ccf87a9eb6d0","versionType":"git"},{"version":"e3f30d563a388220a7c4e3b9a7b52ac0b0324b26","status":"affected","lessThan":"04d50d953ab46d96b0b32d5ad955fceaa28622db","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/iov.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.13.11","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14.2","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/iov.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ef421b4d206f0d3681804b8f94f06a8458a53aaf"},{"url":"https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0"},{"url":"https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:12:43.548Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.13.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.14.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}