# CVE-2025-21815: mm/compaction: fix UBSAN shift-out-of-bounds warning

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2025-02-27T20:04:14.733Z
- Modified: 2026-06-17T08:44:21.663Z
- Weaknesses: CWE-125
- Assigned by: Linux

## Description

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

mm/compaction: fix UBSAN shift-out-of-bounds warning

syzkaller reported a UBSAN shift-out-of-bounds warning of (1UL << order)
in isolate_freepages_block().  The bogus compound_order can be any value
because it is union with flags.  Add back the MAX_PAGE_ORDER check to fix
the warning.

(As written by CVE List.)

## Affected

- Linux Linux: from 3da0272a4c7d0d37b47b28e87014f421296fc2be before 4491159774d973a9e2e998d25d8fbb20fada6dfa; from 3da0272a4c7d0d37b47b28e87014f421296fc2be before 10b7d3eb535098ccd4c82a182a33655d8a0e5c88; from 3da0272a4c7d0d37b47b28e87014f421296fc2be before d1366e74342e75555af2648a2964deb2d5c92200; 6.7 (not affected: before 6.7; from 6.12.14 up to 6.12.*; from 6.13.3 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.7 before 6.12.14; from 6.13 before 6.13.3

## References

- <https://git.kernel.org/stable/c/4491159774d973a9e2e998d25d8fbb20fada6dfa> (patch)
- <https://git.kernel.org/stable/c/10b7d3eb535098ccd4c82a182a33655d8a0e5c88> (patch)
- <https://git.kernel.org/stable/c/d1366e74342e75555af2648a2964deb2d5c92200> (patch)

## Sources

- CVE List: [CVE-2025-21815](https://www.cve.org/CVERecord?id=CVE-2025-21815), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-21815](https://nvd.nist.gov/vuln/detail/CVE-2025-21815), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-21815 · Whole record: https://cve.day/CVE-2025-21815.json · Rebuilt by cve.day 2026-11-25T22:58:54.619Z
