CVE-2024-35843 iommu/vt-d: Use device rbtree in iopf reporting path

High 8.8 Published Updated

A race condition in the Linux kernel IOMMU driver allows a use-after-free, potentially enabling local attackers to execute code or escalate privileges.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-35843?

CVE-2024-35843 is a high-severity use after free vulnerability in Linux kernel, published on 17 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

iommu/vt-d: Use device rbtree in iopf reporting path

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.

Weakness: CWE-416

Which versions are affected by CVE-2024-35843?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-35843?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2024-35843 being exploited?

There is no known exploitation of CVE-2024-35843 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-35843, DEBIAN-CVE-2024-35843, GHSA-v44p-g5j5-r658, ROOT-OS-DEBIAN-11-CVE-2024-35843, ROOT-OS-DEBIAN-12-CVE-2024-35843, ROOT-OS-UBUNTU-2204-CVE-2024-35843 and 1 more.

Is CVE-2024-35843 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free