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

High 7.1 Published Updated

A shift-out-of-bounds error in the Linux kernel memory compaction code can cause a system crash or undefined behavior.

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-2025-21815?

CVE-2025-21815 is a high-severity vulnerability in Linux kernel, published on 27 Feb 2025. 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:

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.

Weakness: CWE-125

Which versions are affected by CVE-2025-21815?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21815?

Apply the vendor's patch.

Is CVE-2025-21815 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21815, DEBIAN-CVE-2025-21815, GHSA-37p3-cfcq-p2hp, ROOT-OS-UBUNTU-2404-CVE-2025-21815, UBUNTU-CVE-2025-21815.

Is CVE-2025-21815 in your software?

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

Check your SBOMs for free