# CVE-2025-22090: x86/mm/pat: Fix VM\_PAT handling when fork() fails in copy\_page\_range()

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

- **Severity:** HIGH 7.3
- **CVSS:** 7.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; 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.30% (percentile 16, 2026-11-26)
- **Published:** 2025-04-16T14:12:42.561Z
- **Modified:** 2026-11-10T13:17:42.287Z

## Who should check

- Anyone running Linux \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< a6623712ba8449876f0b3de9462831523fb851e4; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< b07398e8a5da517083f5c3f2daa8f6681b48ab28; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< 8d6373f83f367dbed316ddeb178130a3a64b5b67; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< da381c33f3aa6406406c9fdf07b8b0b63e0ce722; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< de6185b8892d88142ef69768fe4077cbf40109c0; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< dc84bc2aba85a1508f04a936f9f9a15f64ebfb31
- Anyone running Linux 2.6.29

## Description

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

x86/mm/pat: Fix VM\_PAT handling when fork() fails in copy\_page\_range()

If track\_pfn\_copy() fails, we already added the dst VMA to the maple
tree. As fork() fails, we'll cleanup the maple tree, and stumble over
the dst VMA for which we neither performed any reservation nor copied
any page tables.

Consequently untrack\_pfn() will see VM\_PAT and try obtaining the
PAT information from the page table -- which fails because the page
table was not copied.

The easiest fix would be to simply clear the VM\_PAT flag of the dst VMA
if track\_pfn\_copy() fails. However, the whole thing is about "simply"
clearing the VM\_PAT flag is shaky as well: if we passed track\_pfn\_copy()
and performed a reservation, but copying the page tables fails, we'll
simply clear the VM\_PAT flag, not properly undoing the reservation ...
which is also wrong.

So let's fix it properly: set the VM\_PAT flag only if the reservation
succeeded (leaving it clear initially), and undo the reservation if
anything goes wrong while copying the page tables: clearing the VM\_PAT
flag after undoing the reservation.

Note that any copied page table entries will get zapped when the VMA will
get removed later, after copy\_page\_range() succeeded; as VM\_PAT is not set
then, we won't try cleaning VM\_PAT up once more and untrack\_pfn() will be
happy. Note that leaving these page tables in place without a reservation
is not a problem, as we are aborting fork(); this process will never run.

A reproducer can trigger this usually at the first try:

  https://gitlab.com/davidhildenbrand/scratchspace/-/raw/main/reproducers/pat\_fork.c

  WARNING: CPU: 26 PID: 11650 at arch/x86/mm/pat/memtype.c:983 get\_pat\_info+0xf6/0x110
  Modules linked in: ...
  CPU: 26 UID: 0 PID: 11650 Comm: repro3 Not tainted 6.12.0-rc5+ \#92
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014
  RIP: 0010:get\_pat\_info+0xf6/0x110
  ...
  Call Trace:
   \<TASK\>
   ...
   untrack\_pfn+0x52/0x110
   unmap\_single\_vma+0xa6/0xe0
   unmap\_vmas+0x105/0x1f0
   exit\_mmap+0xf6/0x460
   \_\_mmput+0x4b/0x120
   copy\_process+0x1bf6/0x2aa0
   kernel\_clone+0xab/0x440
   \_\_do\_sys\_clone+0x66/0x90
   do\_syscall\_64+0x95/0x180

Likely this case was missed in:

  d155df53f310 ("x86/mm/pat: clear VM\_PAT if copy\_p4d\_range failed")

... and instead of undoing the reservation we simply cleared the VM\_PAT flag.

Keep the documentation of these functions in include/linux/pgtable.h,
one place is more than sufficient -- we should clean that up for the other
functions like track\_pfn\_remap/untrack\_pfn separately.

## Affected and fixed versions

- Linux: \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< a6623712ba8449876f0b3de9462831523fb851e4; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< b07398e8a5da517083f5c3f2daa8f6681b48ab28; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< 8d6373f83f367dbed316ddeb178130a3a64b5b67; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< da381c33f3aa6406406c9fdf07b8b0b63e0ce722; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< de6185b8892d88142ef69768fe4077cbf40109c0; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< dc84bc2aba85a1508f04a936f9f9a15f64ebfb31 (cvelist)
- Linux: 2.6.29 (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-22090. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-22090.md
Affected: Linux >= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, < a6623712ba8449876f0b3de9462831523fb851e4; >= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, < b07398e8a5da517083f5c3f2daa8f6681b48ab28; >= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, < 8d6373f83f367dbed316ddeb178130a3a64b5b67; >= 2ab640379a0ab4cef746ced…
Fixed in: Linux 8d6373f83f367dbed316ddeb178130a3a64b5b67

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

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

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

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

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

Linux \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< a6623712ba8449876f0b3de9462831523fb851e4; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< b07398e8a5da517083f5c3f2daa8f6681b48ab28; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< 8d6373f83f367dbed316ddeb178130a3a64b5b67; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< da381c33f3aa6406406c9fdf07b8b0b63e0ce722; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< de6185b8892d88142ef69768fe4077cbf40109c0; \>= 2ab640379a0ab4cef746ced1d7e04a0941774bcb, \< dc84bc2aba85a1508f04a936f9f9a15f64ebfb31; Linux 2.6.29.

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

Yes. Fixed in Linux 8d6373f83f367dbed316ddeb178130a3a64b5b67. No fix listed yet: follow the vendor advisory.

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

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/b07398e8a5da517083f5c3f2daa8f6681b48ab28>
- patch: <https://git.kernel.org/stable/c/8d6373f83f367dbed316ddeb178130a3a64b5b67>
- patch: <https://git.kernel.org/stable/c/da381c33f3aa6406406c9fdf07b8b0b63e0ce722>
- patch: <https://git.kernel.org/stable/c/de6185b8892d88142ef69768fe4077cbf40109c0>
- patch: <https://git.kernel.org/stable/c/dc84bc2aba85a1508f04a936f9f9a15f64ebfb31>
- other: <https://git.kernel.org/stable/c/a6623712ba8449876f0b3de9462831523fb851e4>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.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-22090>

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