# CVE-2025-38062: genirq/msi: Store the IOMMU IOVA directly in msi\_desc instead of iommu\_cookie

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **Published:** 2025-06-18T09:33:41.282Z
- **Modified:** 2026-08-05T11:59:10.586Z

## Who should check

- Anyone running Linux \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< e4d3763223c7b72ded53425207075e7453b4e3d5; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< ba41e4e627db51d914444aee0b93eb67f31fa330; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 53f42776e435f63e5f8e61955e4c205dbfeaf524; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 856152eb91e67858a09e30a7149a1f29b04b7384; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 1f7df3a691740a7736bbc99dc4ed536120eb4746
- Anyone running Linux 5.2

## 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.

## Affected and fixed versions

- Linux: \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< e4d3763223c7b72ded53425207075e7453b4e3d5; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< ba41e4e627db51d914444aee0b93eb67f31fa330; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 53f42776e435f63e5f8e61955e4c205dbfeaf524; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 856152eb91e67858a09e30a7149a1f29b04b7384; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 1f7df3a691740a7736bbc99dc4ed536120eb4746 (cvelist)
- Linux: 5.2 (cvelist)

## Mitigation

- Upgrade Linux to 1f7df3a691740a7736bbc99dc4ed536120eb4746 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38062. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38062.md
Affected: Linux >= ece6e6f0218b7777e650bf93728130ae6f4feb7d, < e4d3763223c7b72ded53425207075e7453b4e3d5; >= ece6e6f0218b7777e650bf93728130ae6f4feb7d, < ba41e4e627db51d914444aee0b93eb67f31fa330; >= ece6e6f0218b7777e650bf93728130ae6f4feb7d, < 53f42776e435f63e5f8e61955e4c205dbfeaf524; >= ece6e6f0218b7777e650bf9…
Fixed in: Linux 53f42776e435f63e5f8e61955e4c205dbfeaf524, Linux 856152eb91e67858a09e30a7149a1f29b04b7384, Linux 1f7df3a691740a7736bbc99dc4ed536120eb4746

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38062 being exploited?

There is no confirmed exploitation: CVE-2025-38062 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-38062?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38062?

Linux \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< e4d3763223c7b72ded53425207075e7453b4e3d5; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< ba41e4e627db51d914444aee0b93eb67f31fa330; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 53f42776e435f63e5f8e61955e4c205dbfeaf524; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 856152eb91e67858a09e30a7149a1f29b04b7384; \>= ece6e6f0218b7777e650bf93728130ae6f4feb7d, \< 1f7df3a691740a7736bbc99dc4ed536120eb4746; Linux 5.2.

### Is there a fix for CVE-2025-38062?

Yes. Fixed in Linux 53f42776e435f63e5f8e61955e4c205dbfeaf524, Linux 856152eb91e67858a09e30a7149a1f29b04b7384, Linux 1f7df3a691740a7736bbc99dc4ed536120eb4746. Upgrade Linux to 1f7df3a691740a7736bbc99dc4ed536120eb4746 or later.

### How do I check if I'm affected by CVE-2025-38062?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e4d3763223c7b72ded53425207075e7453b4e3d5>
- patch: <https://git.kernel.org/stable/c/ba41e4e627db51d914444aee0b93eb67f31fa330>
- patch: <https://git.kernel.org/stable/c/53f42776e435f63e5f8e61955e4c205dbfeaf524>
- patch: <https://git.kernel.org/stable/c/856152eb91e67858a09e30a7149a1f29b04b7384>
- patch: <https://git.kernel.org/stable/c/1f7df3a691740a7736bbc99dc4ed536120eb4746>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38062>

HTML: <https://flawdb.com/CVE-2025-38062> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38062>
