CVE-2025-38062
genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
Check your servers for CVE-2025-38062
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38062 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
The IOMMU translation for MSI message addresses has been a 2-step process, separated in time:
1) iommu_dma_prepare_msi(): A cookie pointer containing the IOVA address is stored in the MSI descriptor when an MSI interrupt is allocated.
2) iommu_dma_compose_msi_msg(): this cookie pointer is used to compute a translated message address.
This has an inherent lifetime problem for the pointer stored in the cookie that must remain valid between the two steps. However, there is no locking at the irq layer that helps protect the lifetime. Today, this works under the assumption that the iommu domain is not changed while MSI interrupts being programmed. This is true for normal DMA API users within the kernel, as the iommu domain is attached before the driver is probed and cannot be changed while a driver is attached.
Classic VFIO type1 also prevented changing the iommu domain while VFIO was running as it does not support changing the "container" after starting up.
However, iommufd has improved this so that the iommu domain can be changed during VFIO operation. This potentially allows userspace to directly race VFIO_DEVICE_ATTACH_IOMMUFD_PT (which calls iommu_attach_group()) and VFIO_DEVICE_SET_IRQS (which calls into iommu_dma_compose_msi_msg()).
This potentially causes both the cookie pointer and the unlocked call to iommu_get_domain_for_dev() on the MSI translation path to become UAFs.
Fix the MSI cookie UAF by removing the cookie pointer. The translated IOVA address is already known during iommu_dma_prepare_msi() and cannot change. Thus, it can simply be stored as an integer in the MSI descriptor.
The other UAF related to iommu_get_domain_for_dev() will be addressed in patch "iommu: Make iommu_dma_prepare_msi() into a generic operation" by using the IOMMU group mutex.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 10.8% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from ece6e6f0218b7777e650bf93728130ae6f4feb7d, before e4d3763223c7b72ded53425207075e7453b4e3d5 affected from ece6e6f0218b7777e650bf93728130ae6f4feb7d, before ba41e4e627db51d914444aee0b93eb67f31fa330 affected from ece6e6f0218b7777e650bf93728130ae6f4feb7d, before 53f42776e435f63e5f8e61955e4c205dbfeaf524 affected from ece6e6f0218b7777e650bf93728130ae6f4feb7d, before 856152eb91e67858a09e30a7149a1f29b04b7384 affected from ece6e6f0218b7777e650bf93728130ae6f4feb7d, before 1f7df3a691740a7736bbc99dc4ed536120eb4746
Other versions: unaffected
|
| Linux |
affected 5.2 unaffected before 5.2 unaffected from 6.1.141 up to and including 6.1.* unaffected from 6.6.93 up to and including 6.6.* unaffected from 6.12.31 up to and including 6.12.* unaffected from 6.14.9 up to and including 6.14.* unaffected 6.15 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38062 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38062
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-38062
trivy image --scanners vuln IMAGE | grep CVE-2025-38062
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/e4d3763223c7b72ded53425207075e7453b4e3d5 git.kernel.org
- https://git.kernel.org/stable/c/ba41e4e627db51d914444aee0b93eb67f31fa330 git.kernel.org
- https://git.kernel.org/stable/c/53f42776e435f63e5f8e61955e4c205dbfeaf524 git.kernel.org
- https://git.kernel.org/stable/c/856152eb91e67858a09e30a7149a1f29b04b7384 git.kernel.org
- https://git.kernel.org/stable/c/1f7df3a691740a7736bbc99dc4ed536120eb4746 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html lists.debian.org
Source: the record CVE-2025-38062 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse