# CVE-2025-39844: mm: move page table sync declarations to linux/pgtable.h

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.23% (percentile 8, 2026-11-26)
- **Published:** 2025-09-19T15:26:18.471Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 732e62212f49d549c91071b4da7942ee3058f7a2; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< eceb44e1f94bd641b2a4e8c09b64c797c4eabc15; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 6797a8b3f71b2cb558b8771a03450dc3e004e453; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 4f7537772011fad832f83d6848f8eab282545bef; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 469f9d22751472b81eaaf8a27fcdb5a70741c342; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d
- Anyone running Linux 5.13

## Description

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

mm: move page table sync declarations to linux/pgtable.h

During our internal testing, we started observing intermittent boot
failures when the machine uses 4-level paging and has a large amount of
persistent memory:

  BUG: unable to handle page fault for address: ffffe70000000034
  \#PF: supervisor write access in kernel mode
  \#PF: error\_code(0x0002) - not-present page
  PGD 0 P4D 0 
  Oops: 0002 \[\#1\] SMP NOPTI
  RIP: 0010:\_\_init\_single\_page+0x9/0x6d
  Call Trace:
   \<TASK\>
   \_\_init\_zone\_device\_page+0x17/0x5d
   memmap\_init\_zone\_device+0x154/0x1bb
   pagemap\_range+0x2e0/0x40f
   memremap\_pages+0x10b/0x2f0
   devm\_memremap\_pages+0x1e/0x60
   dev\_dax\_probe+0xce/0x2ec \[device\_dax\]
   dax\_bus\_probe+0x6d/0xc9
   \[... snip ...\]
   \</TASK\>

It turns out that the kernel panics while initializing vmemmap (struct
page array) when the vmemmap region spans two PGD entries, because the new
PGD entry is only installed in init\_mm.pgd, but not in the page tables of
other tasks.

And looking at \_\_populate\_section\_memmap():
  if (vmemmap\_can\_optimize(altmap, pgmap))                                
          // does not sync top level page tables
          r = vmemmap\_populate\_compound\_pages(pfn, start, end, nid, pgmap);
  else                                                                    
          // sync top level page tables in x86
          r = vmemmap\_populate(start, end, nid, altmap);

In the normal path, vmemmap\_populate() in arch/x86/mm/init\_64.c
synchronizes the top level page table (See commit 9b861528a801 ("x86-64,
mem: Update all PGDs for direct mapping and vmemmap mapping changes")) so
that all tasks in the system can see the new vmemmap area.

However, when vmemmap\_can\_optimize() returns true, the optimized path
skips synchronization of top-level page tables.  This is because
vmemmap\_populate\_compound\_pages() is implemented in core MM code, which
does not handle synchronization of the top-level page tables.  Instead,
the core MM has historically relied on each architecture to perform this
synchronization manually.

We're not the first party to encounter a crash caused by not-sync'd top
level page tables: earlier this year, Gwan-gyeong Mun attempted to address
the issue \[1\] \[2\] after hitting a kernel panic when x86 code accessed the
vmemmap area before the corresponding top-level entries were synced.  At
that time, the issue was believed to be triggered only when struct page
was enlarged for debugging purposes, and the patch did not get further
updates.

It turns out that current approach of relying on each arch to handle the
page table sync manually is fragile because 1) it's easy to forget to sync
the top level page table, and 2) it's also easy to overlook that the
kernel should not access the vmemmap and direct mapping areas before the
sync.

\# The solution: Make page table sync more code robust and harder to miss

To address this, Dave Hansen suggested \[3\] \[4\] introducing
{pgd,p4d}\_populate\_kernel() for updating kernel portion of the page tables
and allow each architecture to explicitly perform synchronization when
installing top-level entries.  With this approach, we no longer need to
worry about missing the sync step, reducing the risk of future
regressions.

The new interface reuses existing ARCH\_PAGE\_TABLE\_SYNC\_MASK,
PGTBL\_P\*D\_MODIFIED and arch\_sync\_kernel\_mappings() facility used by
vmalloc and ioremap to synchronize page tables.

pgd\_populate\_kernel() looks like this:
static inline void pgd\_populate\_kernel(unsigned long addr, pgd\_t \*pgd,
                                       p4d\_t \*p4d)
{
        pgd\_populate(&init\_mm, pgd, p4d);
        if (ARCH\_PAGE\_TABLE\_SYNC\_MASK & PGTBL\_PGD\_MODIFIED)
                arch\_sync\_kernel\_mappings(addr, addr);
}

It is worth noting that vmalloc() and apply\_to\_range() carefully
synchronizes page tables by calling p\*d\_alloc\_track() and
arch\_sync\_kernel\_mappings(), and thus they are not affected by
---truncated---

## Affected and fixed versions

- Linux: \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 732e62212f49d549c91071b4da7942ee3058f7a2; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< eceb44e1f94bd641b2a4e8c09b64c797c4eabc15; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 6797a8b3f71b2cb558b8771a03450dc3e004e453; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 4f7537772011fad832f83d6848f8eab282545bef; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 469f9d22751472b81eaaf8a27fcdb5a70741c342; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d (cvelist)
- Linux: 5.13 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-39844.md
Affected: Linux >= 8d400913c231bd1da74067255816453f96cd35b0, < 732e62212f49d549c91071b4da7942ee3058f7a2; >= 8d400913c231bd1da74067255816453f96cd35b0, < eceb44e1f94bd641b2a4e8c09b64c797c4eabc15; >= 8d400913c231bd1da74067255816453f96cd35b0, < 6797a8b3f71b2cb558b8771a03450dc3e004e453; >= 8d400913c231bd1da740672…
Fixed in: Linux 732e62212f49d549c91071b4da7942ee3058f7a2, Linux 6797a8b3f71b2cb558b8771a03450dc3e004e453, Linux 4f7537772011fad832f83d6848f8eab282545bef, Linux 469f9d22751472b81eaaf8a27fcdb5a70741c342, Linux 7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d

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

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

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

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

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

Linux \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 732e62212f49d549c91071b4da7942ee3058f7a2; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< eceb44e1f94bd641b2a4e8c09b64c797c4eabc15; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 6797a8b3f71b2cb558b8771a03450dc3e004e453; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 4f7537772011fad832f83d6848f8eab282545bef; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 469f9d22751472b81eaaf8a27fcdb5a70741c342; \>= 8d400913c231bd1da74067255816453f96cd35b0, \< 7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d; Linux 5.13.

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

Yes. Fixed in Linux 732e62212f49d549c91071b4da7942ee3058f7a2, Linux 6797a8b3f71b2cb558b8771a03450dc3e004e453, Linux 4f7537772011fad832f83d6848f8eab282545bef, Linux 469f9d22751472b81eaaf8a27fcdb5a70741c342, Linux 7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d. Upgrade Linux to 7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d or later.

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

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/732e62212f49d549c91071b4da7942ee3058f7a2>
- patch: <https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15>
- patch: <https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453>
- patch: <https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef>
- patch: <https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342>
- patch: <https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-032379.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-39844>

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