# CVE-2025-22034: mm/gup: reject FOLL\_SPLIT\_PMD with hugetlb VMAs

> 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-26)
- **Published:** 2025-04-16T14:11:53.301Z
- **Modified:** 2026-08-05T11:56:06.819Z

## Who should check

- Anyone running Linux \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 2e877ff3492267def06dd50cb165dc9ab8838e7d; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 48d28417c66cce2f3b0ba773fcb6695a56eff220; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< fd900832e8440046627b60697687ab5d04398008; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 8977752c8056a6a094a279004a49722da15bace3
- Anyone running Linux 6.10

## Description

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

mm/gup: reject FOLL\_SPLIT\_PMD with hugetlb VMAs

Patch series "mm: fixes for device-exclusive entries (hmm)", v2.

Discussing the PageTail() call in make\_device\_exclusive\_range() with
Willy, I recently discovered \[1\] that device-exclusive handling does not
properly work with THP, making the hmm-tests selftests fail if THPs are
enabled on the system.

Looking into more details, I found that hugetlb is not properly fenced,
and I realized that something that was bugging me for longer -- how
device-exclusive entries interact with mapcounts -- completely breaks
migration/swapout/split/hwpoison handling of these folios while they have
device-exclusive PTEs.

The program below can be used to allocate 1 GiB worth of pages and making
them device-exclusive on a kernel with CONFIG\_TEST\_HMM.

Once they are device-exclusive, these folios cannot get swapped out
(proc$pid/smaps\_rollup will always indicate 1 GiB RSS no matter how much
one forces memory reclaim), and when having a memory block onlined to
ZONE\_MOVABLE, trying to offline it will loop forever and complain about
failed migration of a page that should be movable.

\# echo offline \> /sys/devices/system/memory/memory136/state
\# echo online\_movable \> /sys/devices/system/memory/memory136/state
\# ./hmm-swap &
... wait until everything is device-exclusive
\# echo offline \> /sys/devices/system/memory/memory136/state
\[  285.193431\]\[T14882\] page: refcount:2 mapcount:0 mapping:0000000000000000
  index:0x7f20671f7 pfn:0x442b6a
\[  285.196618\]\[T14882\] memcg:ffff888179298000
\[  285.198085\]\[T14882\] anon flags: 0x5fff0000002091c(referenced\|uptodate\|
  dirty\|active\|owner\_2\|swapbacked\|node=1\|zone=3\|lastcpupid=0x7ff)
\[  285.201734\]\[T14882\] raw: ...
\[  285.204464\]\[T14882\] raw: ...
\[  285.207196\]\[T14882\] page dumped because: migration failure
\[  285.209072\]\[T14882\] page\_owner tracks the page as allocated
\[  285.210915\]\[T14882\] page last allocated via order 0, migratetype
  Movable, gfp\_mask 0x140dca(GFP\_HIGHUSER\_MOVABLE\|\_\_GFP\_COMP\|\_\_GFP\_ZERO),
  id 14926, tgid 14926 (hmm-swap), ts 254506295376, free\_ts 227402023774
\[  285.216765\]\[T14882\]  post\_alloc\_hook+0x197/0x1b0
\[  285.218874\]\[T14882\]  get\_page\_from\_freelist+0x76e/0x3280
\[  285.220864\]\[T14882\]  \_\_alloc\_frozen\_pages\_noprof+0x38e/0x2740
\[  285.223302\]\[T14882\]  alloc\_pages\_mpol+0x1fc/0x540
\[  285.225130\]\[T14882\]  folio\_alloc\_mpol\_noprof+0x36/0x340
\[  285.227222\]\[T14882\]  vma\_alloc\_folio\_noprof+0xee/0x1a0
\[  285.229074\]\[T14882\]  \_\_handle\_mm\_fault+0x2b38/0x56a0
\[  285.230822\]\[T14882\]  handle\_mm\_fault+0x368/0x9f0
...

This series fixes all issues I found so far.  There is no easy way to fix
without a bigger rework/cleanup.  I have a bunch of cleanups on top (some
previous sent, some the result of the discussion in v1) that I will send
out separately once this landed and I get to it.

I wish we could just use some special present PROT\_NONE PTEs instead of
these (non-present, non-none) fake-swap entries; but that just results in
the same problem we keep having (lack of spare PTE bits), and staring at
other similar fake-swap entries, that ship has sailed.

With this series, make\_device\_exclusive() doesn't actually belong into
mm/rmap.c anymore, but I'll leave moving that for another day.

I only tested this series with the hmm-tests selftests due to lack of HW,
so I'd appreciate some testing, especially if the interaction between two
GPUs wanting a device-exclusive entry works as expected.

\<program\>
\#include \<stdio.h\>
\#include \<fcntl.h\>
\#include \<stdint.h\>
\#include \<unistd.h\>
\#include \<stdlib.h\>
\#include \<string.h\>
\#include \<sys/mman.h\>
\#include \<sys/ioctl.h\>
\#include \<linux/types.h\>
\#include \<linux/ioctl.h\>

\#define HMM\_DMIRROR\_EXCLUSIVE \_IOWR('H', 0x05, struct hmm\_dmirror\_cmd)

struct hmm\_dmirror\_cmd {
	\_\_u64 addr;
	\_\_u64 ptr;
	\_\_u64 npages;
	\_\_u64 cpages;
	\_\_u64 faults;
};

const size\_t size = 1 \* 1024 \* 1024 \* 1024ul;
const size\_t chunk\_size = 2 \* 1024 \* 1024ul;

int m
---truncated---

## Affected and fixed versions

- Linux: \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 2e877ff3492267def06dd50cb165dc9ab8838e7d; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 48d28417c66cce2f3b0ba773fcb6695a56eff220; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< fd900832e8440046627b60697687ab5d04398008; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 8977752c8056a6a094a279004a49722da15bace3 (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- Upgrade Linux to 8977752c8056a6a094a279004a49722da15bace3 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-22034. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-22034.md
Affected: Linux >= 9cb28da54643ad464c47585cd5866c30b0218e67, < 2e877ff3492267def06dd50cb165dc9ab8838e7d; >= 9cb28da54643ad464c47585cd5866c30b0218e67, < 48d28417c66cce2f3b0ba773fcb6695a56eff220; >= 9cb28da54643ad464c47585cd5866c30b0218e67, < fd900832e8440046627b60697687ab5d04398008; >= 9cb28da54643ad464c47585…
Fixed in: Linux 2e877ff3492267def06dd50cb165dc9ab8838e7d, Linux 48d28417c66cce2f3b0ba773fcb6695a56eff220, Linux 8977752c8056a6a094a279004a49722da15bace3

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

There is no confirmed exploitation: CVE-2025-22034 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-22034?

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

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

Linux \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 2e877ff3492267def06dd50cb165dc9ab8838e7d; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 48d28417c66cce2f3b0ba773fcb6695a56eff220; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< fd900832e8440046627b60697687ab5d04398008; \>= 9cb28da54643ad464c47585cd5866c30b0218e67, \< 8977752c8056a6a094a279004a49722da15bace3; Linux 6.10.

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

Yes. Fixed in Linux 2e877ff3492267def06dd50cb165dc9ab8838e7d, Linux 48d28417c66cce2f3b0ba773fcb6695a56eff220, Linux 8977752c8056a6a094a279004a49722da15bace3. Upgrade Linux to 8977752c8056a6a094a279004a49722da15bace3 or later.

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

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/2e877ff3492267def06dd50cb165dc9ab8838e7d>
- patch: <https://git.kernel.org/stable/c/48d28417c66cce2f3b0ba773fcb6695a56eff220>
- patch: <https://git.kernel.org/stable/c/fd900832e8440046627b60697687ab5d04398008>
- patch: <https://git.kernel.org/stable/c/8977752c8056a6a094a279004a49722da15bace3>

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

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