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

Published Sep 19, 2025
·
Updated

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: errorcode(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP NOPTI RIP: 0010:initsinglepage+0x9/0x6d Call Trace: <TASK> initzonedevicepage+0x17/0x5d memmapinitzonedevice+0x154/0x1bb pagemaprange+0x2e0/0x40f memremappages+0x10b/0x2f0 devmmemremappages+0x1e/0x60 devdaxprobe+0xce/0x2ec [devicedax] daxbusprobe+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 initmm.pgd, but not in the page tables of other tasks.

And looking at populatesectionmemmap(): if (vmemmapcanoptimize(altmap, pgmap)) // does not sync top level page tables r = vmemmappopulatecompoundpages(pfn, start, end, nid, pgmap); else // sync top level page tables in x86 r = vmemmappopulate(start, end, nid, altmap);

In the normal path, vmemmappopulate() in arch/x86/mm/init64.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 vmemmapcanoptimize() returns true, the optimized path skips synchronization of top-level page tables. This is because vmemmappopulatecompoundpages() 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}populatekernel() 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 ARCHPAGETABLESYNCMASK, PGTBLPDMODIFIED and archsynckernelmappings() facility used by vmalloc and ioremap to synchronize page tables.

pgdpopulatekernel() looks like this: static inline void pgdpopulatekernel(unsigned long addr, pgdt pgd, p4dt p4d) { pgdpopulate(&initmm, pgd, p4d); if (ARCHPAGETABLESYNCMASK & PGTBLPGDMODIFIED) archsynckernelmappings(addr, addr); }

It is worth noting that vmalloc() and applytorange() carefully synchronizes page tables by calling pdalloctrack() and archsynckernelmappings(), and thus they are not affected by ---truncated---

Affected Software

14 affected componentsFixes available
Linux Linux kernel=
Microsoft azl3 kernel 6.6.96.2-2
Linux Linux kernel>=5.13<5.15.192
Linux Linux kernel>=5.16<6.1.151
Linux Linux kernel>=6.2<6.6.105
Linux Linux kernel>=6.7<6.12.46
Linux Linux kernel>=6.13<6.16.6
Linux Linux kernel=6.17-rc1
Linux Linux kernel=6.17-rc2
Linux Linux kernel=6.17-rc3
Linux Linux kernel=6.17-rc4
Debian Debian Linux=11.0
Microsoft azl3 kernel 6.6.104.2-4
Microsoft cbl2 kernel 5.15.186.1-1

Event History

Sep 19, 2025
CVE Published
via MITRE·03:26 PM
Data Sourced
via MITRE·03:26 PM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityAffected Software
Sep 21, 2025
Data Sourced
via Microsoft·01:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity
Updated
via Microsoft·08:02 AM
Affected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-39844?

CVE-2025-39844 has a high severity rating due to its potential to cause intermittent boot failures on systems using 4-level paging with large persistent memory.

2

How do I fix CVE-2025-39844?

To fix CVE-2025-39844, update to the latest version of the Linux kernel that includes the patch resolving this vulnerability.

3

What systems are affected by CVE-2025-39844?

CVE-2025-39844 affects systems running the Linux kernel with 4-level paging and a significant amount of persistent memory.

4

Can CVE-2025-39844 lead to data loss?

While CVE-2025-39844 primarily causes boot issues, any interruptions during system operations may risk data consistency or loss.

5

Is there a workaround for CVE-2025-39844?

Currently, the most effective way to mitigate CVE-2025-39844 is to apply the kernel update or patch provided by your Linux distribution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203