CVE-2024-42302 json
PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal
published 2024-08-17 2 y ago modified 2026-10-15 25 d ago also EUVD-2024-39525
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 13%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal
Keith reports a use-after-free when a DPC event occurs concurrently to hot-removal of the same portion of the hierarchy:
The dpc_handler() awaits readiness of the secondary bus below the Downstream Port where the DPC event occurred. To do so, it polls the config space of the first child device on the secondary bus. If that child device is concurrently removed, accesses to its struct pci_dev cause the kernel to oops.
That's because pci_bridge_wait_for_secondary_bus() neglects to hold a reference on the child device. Before v6.3, the function was only called on resume from system sleep or on runtime resume. Holding a reference wasn't necessary back then because the pciehp IRQ thread could never run concurrently. (On resume from system sleep, IRQs are not enabled until after the resume_noirq phase. And runtime resume is always awaited before a PCI device is removed.)
However starting with v6.3, pci_bridge_wait_for_secondary_bus() is also called on a DPC event. Commit 53b54ad074de ("PCI/DPC: Await readiness of secondary bus after reset"), which introduced that, failed to appreciate that pci_bridge_wait_for_secondary_bus() now needs to hold a reference on the child device because dpc_handler() and pciehp may indeed run concurrently. The commit was backported to v5.10+ stable kernels, so that's the oldest one affected.
Add the missing reference acquisition.
Abridged stack trace:
BUG: unable to handle page fault for address: 00000000091400c0 CPU: 15 PID: 2464 Comm: irq/53-pcie-dpc 6.9.0 RIP: pci_bus_read_config_dword+0x17/0x50 pci_dev_wait() pci_bridge_wait_for_secondary_bus() dpc_reset_link() pcie_do_recovery() dpc_handler()
Patch / fix
- Linux Linux 5.10.224, 5.15.165, 6.1.103, 6.3, 6.6.44, 6.10.3, 6.11
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem V1.1.1
- linux Debian 12 6.1.106-1
- linux Debian 14, Debian 13 6.10.3-1
debian advisories DEBIAN-CVE-2024-42302
- linux Ubuntu 22.04 LTS 5.15.0-125.135
- linux Ubuntu 24.04 LTS 6.8.0-50.51
- linux-aws Ubuntu 22.04 LTS 5.15.0-1072.78
- linux-aws Ubuntu 24.04 LTS 6.8.0-1020.22
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1071.79
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1019.21
- linux-gke Ubuntu 22.04 LTS 5.15.0-1069.75
- linux-gke Ubuntu 24.04 LTS 6.8.0-1015.19
ubuntu advisories UBUNTU-CVE-2024-42302
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 9 5.14.0-570.12.1.el9_6
- rv RHEL 9 5.14.0-570.12.1.el9_6
- perf RHEL 9 5.14.0-570.12.1.el9_6
- rtla RHEL 9 5.14.0-570.12.1.el9_6
- libperf RHEL 9 5.14.0-570.12.1.el9_6
- kernel-rt RHEL 9 5.14.0-570.12.1.el9_6
- kernel-64k RHEL 9 5.14.0-570.12.1.el9_6
- kernel-core RHEL 9 5.14.0-570.12.1.el9_6
red hat advisories RHSA-2025:6966
- kernel-rt Linux Micro 6.0 6.4.0-10.1
- kernel-source-rt Linux Micro 6.0 6.4.0-10.1
- kernel-livepatch-MICRO-6-0-RT_Update_2 Linux Micro 6.0 1-1.1
- kernel-source Linux Micro 6.0 6.4.0-19.1
- kernel-default Linux Micro 6.0 6.4.0-19.1
- kernel-kvmsmall Linux Micro 6.0 6.4.0-19.1
- kernel-default-base Linux Micro 6.0 6.4.0-17.1.1.51
- kernel-livepatch-MICRO-6-0_Update_2 Linux Micro 6.0 1-1.1
suse advisories SUSE-SU-2025:20047-1SUSE-SU-2025:20044-1SUSE-SU-2024:3483-1SUSE-SU-2024:3383-1SUSE-SU-2024:3209-1SUSE-SU-2024:3195-1
- kernel CBL-Mariner 2.0 5.15.167.1-1
- kernel Azure Linux 3.0 6.6.47.1-1
azure linux advisories AZL-47962AZL-48048
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- git.kernel.org/stable/c/c52f9e1a9eb40f13993142c331a6cfd334d4b91d commit
- git.kernel.org/stable/c/2c111413f38ca5cf87557cab89f6d82b0e3433e7 commit
- git.kernel.org/stable/c/f63df70b439bb8331358a306541893bf415bf1da commit
- git.kernel.org/stable/c/2cc8973bdc4d6c928ebe38b88090a2cdfe81f42f commit
- git.kernel.org/stable/c/b16f3ea1db47a6766a9f1169244cf1fc287a7c62 commit
- git.kernel.org/stable/c/11a1f4bc47362700fcbde717292158873fb847ed commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-42302 updated cvss 7.1
kernel: PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 moreaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-570.12.1.el9_6, perf 5.14.0-570.12.1.el9_6, rtla 5.14.0-570.12.1.el9_6, python3-perf 5.14.0-570.12.1.el9_6, kernel-devel-matched 5.14.0-570.12.1.el9_6, kernel-64k-devel-matched 5.14.0-570.12.1.el9_6, +7 more Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-570.12.1.el9_6, kernel-64k 5.14.0-570.12.1.el9_6, kernel-core 5.14.0-570.12.1.el9_6, kernel-tools 5.14.0-570.12.1.el9_6, kernel-modules 5.14.0-570.12.1.el9_6, kernel-64k-core 5.14.0-570.12.1.el9_6, +27 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-s390x 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-x86_64 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-aarch64 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-ppc64le 5.14.0-570.12.1.el9_6 Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-570.12.1.el9_6, kernel-rt-64k 5.14.0-570.12.1.el9_6, kernel-rt-core 5.14.0-570.12.1.el9_6, kernel-rt-modules 5.14.0-570.12.1.el9_6, kernel-rt-64k-core 5.14.0-570.12.1.el9_6, kernel-rt-debug-core 5.14.0-570.12.1.el9_6, +14 more Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-570.12.1.el9_6, kernel-rt-kvm 5.14.0-570.12.1.el9_6, kernel-rt-core 5.14.0-570.12.1.el9_6, kernel-rt-modules 5.14.0-570.12.1.el9_6, kernel-rt-debug-kvm 5.14.0-570.12.1.el9_6, kernel-rt-debug-core 5.14.0-570.12.1.el9_6, +6 morefixed: vendor fix RHSA-2025:6966
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-24-102-01 updated cvss 7.8
Siemens SIMATIC S7-1500 TM MFP
-
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystemaffected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.23% chance of exploitation in the next 30 days, higher than 13% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/c52f9e1a9eb40f13993142c331a6cfd334d4b91d
patch
-
git.kernel.org
/stable/c/2c111413f38ca5cf87557cab89f6d82b0e3433e7
patch
-
git.kernel.org
/stable/c/f63df70b439bb8331358a306541893bf415bf1da
patch
-
git.kernel.org
/stable/c/2cc8973bdc4d6c928ebe38b88090a2cdfe81f42f
patch
-
git.kernel.org
/stable/c/b16f3ea1db47a6766a9f1169244cf1fc287a7c62
patch
-
git.kernel.org
/stable/c/11a1f4bc47362700fcbde717292158873fb847ed
patch
-
lists.debian.org
/debian-lts-announce/2025/01/msg00001.html
mailing-list, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2024/10/msg00003.html
mailing-list, third-party-advisory
- cert-portal.siemens.com /productcert/html/ssa-265688.html
Sources
- CVE List CVE-2024-42302
- NVD CVE-2024-42302
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.