Vulnerability · Published Mar 18, 2024 · Assigned by Linux
CVE-2023-52617PCI: switchtec: Fix stdev_release() crash after surprise hot remove
Medium 4.4
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 15% 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: switchtec: Fix stdev_release() crash after surprise hot remove A PCI device hot removal may occur while stdev->cdev is held open. The call to stdev_release() then happens during close or exit, at a point way past switchtec_pci_remove(). Otherwise the last ref would vanish with the trailing put_device(), just before return. At that later point in time, the devm cleanup has already removed the stdev->mmio_mrpc mapping. Also, the stdev->pdev reference was not a counted one. Therefore, in DMA mode, the iowrite32() in stdev_release() will cause a fatal page fault, and the subsequent dma_free_coherent(), if reached, would pass a stale &stdev->pdev->dev pointer. Fix by moving MRPC DMA shutdown into switchtec_pci_remove(), after stdev_kill(). Counting the stdev->pdev ref is now optional, but may prevent future accidents. Reproducible via the script at https://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.82-1 | DEBIAN-CVE-2023-52617 |
| Debian:13 | linux | 6.7.7-1 | DEBIAN-CVE-2023-52617 |
| Debian:14 | linux | 6.7.7-1 | DEBIAN-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux | 5.15.0-106.116 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux | 5.15.0-106.116 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1061.67 | USN-6766-3 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1061.67 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1063.72 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1063.72 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | 6.5.0-1022.23~22.04.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1063.72.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1063.72.1 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1059.67 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1059.67 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | 6.5.0-1022.24~22.04.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1058.63 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1058.63 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1044.51 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1044.51 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | 6.5.0-41.41~22.04.2 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1054.57 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1054.57 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1057.63 | USN-6795-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1057.63 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1058.63 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1058.63 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-106.116 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-106.116 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | 6.5.0-41.41.1~22.04.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1054.55 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1054.55 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1021.22 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1026.26 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1015.15 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | 6.5.0-1024.25 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1059.65 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1059.65 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | 6.5.0-1024.24~22.04.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1054.57 | USN-6766-2 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1054.57 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | 6.5.0-40.40.1~22.04.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | 6.5.0-1015.16~22.04.1 | UBUNTU-CVE-2023-52617 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | UBUNTU-CVE-2023-52617 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before d8c293549946ee5078ed0ab77793cec365559355f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before 4a5d0528cf19dbf060313dffbe047bc11c90c24cf7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before 1d83c85922647758c1f1e4806a4c5c3cf591a20af7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before 0233b836312e39a3c763fb53512b3fa455b473b3f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before e129c7fa7070fbce57feb0bfc5eaa65eef44b693f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 – before df25461119d987b8c81d232cfe4411e91dcabe66 |
| Linux | Linux | 5.0 |
References
- https://git.kernel.org/stable/c/d8c293549946ee5078ed0ab77793cec365559355
- https://git.kernel.org/stable/c/4a5d0528cf19dbf060313dffbe047bc11c90c24c
- https://git.kernel.org/stable/c/ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8
- https://git.kernel.org/stable/c/1d83c85922647758c1f1e4806a4c5c3cf591a20a
- https://git.kernel.org/stable/c/0233b836312e39a3c763fb53512b3fa455b473b3
- https://git.kernel.org/stable/c/e129c7fa7070fbce57feb0bfc5eaa65eef44b693
- https://git.kernel.org/stable/c/df25461119d987b8c81d232cfe4411e91dcabe66
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html x_transferred