Look up another CVE · open CVE-2024-35843 in the interactive tracker
CVE-2024-35843
iommu/vt-d: Use device rbtree in iopf reporting path
Published 2024-05-17 (2 years ago) by the Linux kernel CNA. Subsystem drivers/iommu. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-35843 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.8.9-1 | Update the kernel and reboot. Fixed in 6.8.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.8.9-1 | Update the kernel and reboot. Fixed in 6.8.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.8.9-1 | Update the kernel and reboot. Fixed in 6.8.9-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
The existing I/O page fault handler currently locates the PCI device by calling pci_get_domain_bus_and_slot(). This function searches the list of all PCI devices until the desired device is found. To improve lookup efficiency, replace it with device_rbtree_find() to search the device within the probed device rbtree. The I/O page fault is initiated by the device, which does not have any synchronization mechanism with the software to ensure that the device stays in the probed device tree. Theoretically, a device could be released by the IOMMU subsystem after device_rbtree_find() and before iopf_get_dev_fault_param(), which would cause a use-after-free problem. Add a mutex to synchronize the I/O page fault reporting path and the IOMMU release device path. This lock doesn't introduce any performance overhead, as the conflict between I/O page fault reporting and device releasing is very rare.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/iommu/intel/dmar.c
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h
drivers/iommu/intel/svm.c
- What this is
- INTEL IOMMU (VT-d)MAINTAINERS section matched on drivers/iommu/intel/ · iommu@lists.linux.dev · Supported
Check it on the machine
grep -wE 'CONFIG_DMAR_TABLE|CONFIG_INTEL_IOMMU' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormYnot built on arm64/arm64, arm64/cloud-arm64, arm64/rt/arm64, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, i386/686, i386/686-pae, i386/rt/686-pae, ppc64el/powerpc64le
- trixieYnot built on arm64/arm64, arm64/arm64-16k, arm64/cloud-arm64, arm64/rt/arm64, armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- forky, sidYnot built on arm64/arm64, arm64/arm64-16k, arm64/cloud-arm64, arm64/rt-arm64, armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- Y
- built in where it is built at all; some flavours do not build it
- Build switches
- CONFIG_DMAR_TABLE, CONFIG_INTEL_IOMMU
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-05-17 (2 years ago)source
- CVSS
- 8.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.22%, higher than 11.3% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/iommu
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.1 | 6.8.2 | 3d39238991e7 |
| 6.1 | 6.9 | def054b01a86 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable `prq_event_thread()` is driven by device-generated PCIe Page Requests, which local software can produce on demand through an SVA-capable accelerator work queue, a DRM render node, or a PRI-capable device assigned to a guest via VFIO/IOMMUFD. There is no network or physical-only requirement.
- AC:LAttack complexity, low
- The attacker can flood the PRQ ring (even provoking PRQ overflow) to keep the racy window continuously executing and retry indefinitely, and in the assigned-device/malicious-endpoint case also controls the removal side via link-down, surprise-removal or AER-triggered teardown. The window is also structurally wide because `device_del()` frees `dev->iommu` before `pci_destroy_dev()` unlinks the device from the PCI bus list, so `pci_get_domain_bus_and_slot()` keeps returning a device whose `dev->iommu` is already freed.
- PR:LPrivileges required, low
- Only access to a device that can emit page requests is needed — an SVA work queue or render node routinely granted to unprivileged users, or guest-side control of a passed-through device. No real root or CAP_SYS_ADMIN in the init namespace is required.
- UI:NUser interaction, none
- The page request is generated by the attacker-driven device and handled asynchronously in the IOMMU threaded IRQ handler; no victim action is involved.
- S:CScope, changed
- The VT-d driver is the authority that confines DMA-capable devices to their assigned address spaces, and here a device-initiated page request corrupts host kernel memory outside that confinement. In the passthrough deployment this is a guest/device-to-host escape across the IOMMU isolation boundary.
- C:HConfidentiality impact, high
- The use-after-free reads `param->fault_param` and `fparam->data` out of a freed kmalloc-96/128 object that an unprivileged process can reallocate with sprayed content, turning the subsequent dereferences into an arbitrary kernel-memory read and disclosure primitive.
- I:HIntegrity impact, high
- `mutex_lock(¶m->lock)` writes into the freed object, `list_add_tail(&evt_pending->list, &fparam->faults)` gives a write through an attacker-controlled pointer, and `fparam->handler(&evt->fault, fparam->data)` is an indirect call through a function pointer read from freed memory — a control-flow hijack primitive.
- A:HAvailability impact, high
- Dereferencing the freed `dev_iommu` in the IOMMU threaded IRQ handler oopses or panics the kernel, and a corrupted mutex in that path can hang all subsequent page-fault handling.