# CVE-2025-21724: iommufd/iova\_bitmap: Fix shift-out-of-bounds in iova\_bitmap\_offset\_to\_index()

> 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, NVD) `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-26)
- **CWE:** CWE-787
- **Published:** 2025-02-27T02:07:31.630Z
- **Modified:** 2026-11-05T21:17:41.613Z

## Who should check

- Anyone running Linux \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< 44d9c94b7a3f29a3e07c4753603a35e9b28842a3; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< 38ac76fc06bc6826a3e4b12a98efbe98432380a9; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< d5d33f01b86af44b23eea61ee309e4ef22c0cdfe; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< b1f8453b8ff1ab79a03820ef608256c499769cb6; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< e24c1551059268b37f6f40639883eafb281b8b9c
- Anyone running Linux 6.1

## Description

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

iommufd/iova\_bitmap: Fix shift-out-of-bounds in iova\_bitmap\_offset\_to\_index()

Resolve a UBSAN shift-out-of-bounds issue in iova\_bitmap\_offset\_to\_index()
where shifting the constant "1" (of type int) by bitmap-\>mapped.pgshift
(an unsigned long value) could result in undefined behavior.

The constant "1" defaults to a 32-bit "int", and when "pgshift" exceeds
31 (e.g., pgshift = 63) the shift operation overflows, as the result
cannot be represented in a 32-bit type.

To resolve this, the constant is updated to "1UL", promoting it to an
unsigned long type to match the operand's type.

## Affected and fixed versions

- Linux: \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< 44d9c94b7a3f29a3e07c4753603a35e9b28842a3; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< 38ac76fc06bc6826a3e4b12a98efbe98432380a9; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< d5d33f01b86af44b23eea61ee309e4ef22c0cdfe; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< b1f8453b8ff1ab79a03820ef608256c499769cb6; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< e24c1551059268b37f6f40639883eafb281b8b9c (cvelist)
- Linux: 6.1 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-21724.md
Affected: Linux >= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, < 44d9c94b7a3f29a3e07c4753603a35e9b28842a3; >= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, < 38ac76fc06bc6826a3e4b12a98efbe98432380a9; >= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, < d5d33f01b86af44b23eea61ee309e4ef22c0cdfe; >= 58ccf0190d19d9a8a41f8a0…
Fixed in: Linux 44d9c94b7a3f29a3e07c4753603a35e9b28842a3, Linux 38ac76fc06bc6826a3e4b12a98efbe98432380a9

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-21724 being exploited?

There is no confirmed exploitation: CVE-2025-21724 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-26).

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

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

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

Linux \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< 44d9c94b7a3f29a3e07c4753603a35e9b28842a3; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< 38ac76fc06bc6826a3e4b12a98efbe98432380a9; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< d5d33f01b86af44b23eea61ee309e4ef22c0cdfe; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< b1f8453b8ff1ab79a03820ef608256c499769cb6; \>= 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1, \< e24c1551059268b37f6f40639883eafb281b8b9c; Linux 6.1.

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

Yes. Fixed in Linux 44d9c94b7a3f29a3e07c4753603a35e9b28842a3, Linux 38ac76fc06bc6826a3e4b12a98efbe98432380a9. No fix listed yet: follow the vendor advisory.

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

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/44d9c94b7a3f29a3e07c4753603a35e9b28842a3>
- patch: <https://git.kernel.org/stable/c/38ac76fc06bc6826a3e4b12a98efbe98432380a9>
- patch: <https://git.kernel.org/stable/c/d5d33f01b86af44b23eea61ee309e4ef22c0cdfe>
- patch: <https://git.kernel.org/stable/c/b1f8453b8ff1ab79a03820ef608256c499769cb6>
- patch: <https://git.kernel.org/stable/c/e24c1551059268b37f6f40639883eafb281b8b9c>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.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-21724>

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