Vulnerability · Published Feb 26, 2025 · Assigned by Linux
CVE-2022-49434PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store() The sysfs sriov_numvfs_store() path acquires the device lock before the config space access lock: sriov_numvfs_store device_lock # A (1) acquire device lock sriov_configure vfio_pci_sriov_configure # (for example) vfio_pci_core_sriov_configure pci_disable_sriov sriov_disable pci_cfg_access_lock pci_wait_cfg # B (4) wait for dev->block_cfg_access == 0 Previously, pci_dev_lock() acquired the config space access lock before the device lock: pci_dev_lock pci_cfg_access_lock dev->block_cfg_access = 1 # B (2) set dev->block_cfg_access = 1 device_lock # A (3) wait for device lock Any path that uses pci_dev_lock(), e.g., pci_reset_function(), may deadlock with sriov_numvfs_store() if the operations occur in the sequence (1) (2) (3) (4). Avoid the deadlock by reversing the order in pci_dev_lock() so it acquires the device lock before the config space access lock, the same as the sriov_numvfs_store() path. [bhelgaas: combined and adapted commit log from Jay Zhou's independent subsequent posting: https://lore.kernel.org/r/20220404062539.1710-1-jianjay.zhou@huawei.com]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 5.18.5-1 | DEBIAN-CVE-2022-49434 |
| Debian:13 | linux | 5.18.5-1 | DEBIAN-CVE-2022-49434 |
| Debian:14 | linux | 5.18.5-1 | DEBIAN-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux | 5.15.0-47.51 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1019.23 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1019.24 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1017.23 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1015.18 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1002.4 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1013.15 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1015.20 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1017.21 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-47.53 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1007.7 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1017.22 | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1014.16 | UBUNTU-CVE-2022-49434 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-49434 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-49434 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 17530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before c3c6dc1853b8bf3c718f96fd8480a6eb09ba483117530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before aed6d4d519210c28817948f34c53b6e058e0456c17530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before c9a81f9ed6ae3554621d6a50220b1bc74b67d81e17530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before eff3587b9c01439b738298475e555c028ac9f55e17530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before 2cdd5284035322795b0964f899eefba254cfe48317530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before ea047f51172aa68841adef7f52d375002438b8f017530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before 59ea6b3ae51df7cd6bfd84c9c0030609b931562217530e71e0166a37f8e20a9b7bcf1d50ae3cff8e – before a91ee0e9fca9d7501286cfbced9b30a33e52740a |
| Linux | Linux | 4.13 |
References
- https://git.kernel.org/stable/c/c3c6dc1853b8bf3c718f96fd8480a6eb09ba4831
- https://git.kernel.org/stable/c/aed6d4d519210c28817948f34c53b6e058e0456c
- https://git.kernel.org/stable/c/c9a81f9ed6ae3554621d6a50220b1bc74b67d81e
- https://git.kernel.org/stable/c/eff3587b9c01439b738298475e555c028ac9f55e
- https://git.kernel.org/stable/c/2cdd5284035322795b0964f899eefba254cfe483
- https://git.kernel.org/stable/c/ea047f51172aa68841adef7f52d375002438b8f0
- https://git.kernel.org/stable/c/59ea6b3ae51df7cd6bfd84c9c0030609b9315622
- https://git.kernel.org/stable/c/a91ee0e9fca9d7501286cfbced9b30a33e52740a