# CVE-2025-39776: mm/debug\_vm\_pgtable: clear page table entries at destroy\_args()

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

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; 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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-09-11T16:56:28.936Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 7bf57a0709cd7c9088cea8de023d6f4fbf2518b0; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 47d2a149611b8a94d24add9868c442a4af278658; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 63962ff932ef359925b94be2a88df6b4fd4fed0a; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 61a9f2e5c49f05e3ea2c16674540a075a1b4be6f; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 561171db3b3eb759ba3f284dba7a76f4476ade03; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< dde30854bddfb5d69f30022b53c5955a41088b33
- Anyone running Linux 5.15

## Description

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

mm/debug\_vm\_pgtable: clear page table entries at destroy\_args()

The mm/debug\_vm\_pagetable test allocates manually page table entries for
the tests it runs, using also its manually allocated mm\_struct.  That in
itself is ok, but when it exits, at destroy\_args() it fails to clear those
entries with the \*\_clear functions.

The problem is that leaves stale entries.  If another process allocates an
mm\_struct with a pgd at the same address, it may end up running into the
stale entry.  This is happening in practice on a debug kernel with
CONFIG\_DEBUG\_VM\_PGTABLE=y, for example this is the output with some extra
debugging I added (it prints a warning trace if pgtables\_bytes goes
negative, in addition to the warning at check\_mm() function):

\[    2.539353\] debug\_vm\_pgtable: \[get\_random\_vaddr         \]: random\_vaddr is 0x7ea247140000
\[    2.539366\] kmem\_cache info
\[    2.539374\] kmem\_cachep 0x000000002ce82385 - freelist 0x0000000000000000 - offset 0x508
\[    2.539447\] debug\_vm\_pgtable: \[init\_args                \]: args-\>mm is 0x000000002267cc9e
(...)
\[    2.552800\] WARNING: CPU: 5 PID: 116 at include/linux/mm.h:2841 free\_pud\_range+0x8bc/0x8d0
\[    2.552816\] Modules linked in:
\[    2.552843\] CPU: 5 UID: 0 PID: 116 Comm: modprobe Not tainted 6.12.0-105.debug\_vm2.el10.ppc64le+debug \#1 VOLUNTARY
\[    2.552859\] Hardware name: IBM,9009-41A POWER9 (architected) 0x4e0202 0xf000005 of:IBM,FW910.00 (VL910\_062) hv:phyp pSeries
\[    2.552872\] NIP:  c0000000007eef3c LR: c0000000007eef30 CTR: c0000000003d8c90
\[    2.552885\] REGS: c0000000622e73b0 TRAP: 0700   Not tainted  (6.12.0-105.debug\_vm2.el10.ppc64le+debug)
\[    2.552899\] MSR:  800000000282b033 \<SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE\>  CR: 24002822  XER: 0000000a
\[    2.552954\] CFAR: c0000000008f03f0 IRQMASK: 0
\[    2.552954\] GPR00: c0000000007eef30 c0000000622e7650 c000000002b1ac00 0000000000000001
\[    2.552954\] GPR04: 0000000000000008 0000000000000000 c0000000007eef30 ffffffffffffffff
\[    2.552954\] GPR08: 00000000ffff00f5 0000000000000001 0000000000000048 0000000000004000
\[    2.552954\] GPR12: 00000003fa440000 c000000017ffa300 c0000000051d9f80 ffffffffffffffdb
\[    2.552954\] GPR16: 0000000000000000 0000000000000008 000000000000000a 60000000000000e0
\[    2.552954\] GPR20: 4080000000000000 c0000000113af038 00007fffcf130000 0000700000000000
\[    2.552954\] GPR24: c000000062a6a000 0000000000000001 8000000062a68000 0000000000000001
\[    2.552954\] GPR28: 000000000000000a c000000062ebc600 0000000000002000 c000000062ebc760
\[    2.553170\] NIP \[c0000000007eef3c\] free\_pud\_range+0x8bc/0x8d0
\[    2.553185\] LR \[c0000000007eef30\] free\_pud\_range+0x8b0/0x8d0
\[    2.553199\] Call Trace:
\[    2.553207\] \[c0000000622e7650\] \[c0000000007eef30\] free\_pud\_range+0x8b0/0x8d0 (unreliable)
\[    2.553229\] \[c0000000622e7750\] \[c0000000007f40b4\] free\_pgd\_range+0x284/0x3b0
\[    2.553248\] \[c0000000622e7800\] \[c0000000007f4630\] free\_pgtables+0x450/0x570
\[    2.553274\] \[c0000000622e78e0\] \[c0000000008161c0\] exit\_mmap+0x250/0x650
\[    2.553292\] \[c0000000622e7a30\] \[c0000000001b95b8\] \_\_mmput+0x98/0x290
\[    2.558344\] \[c0000000622e7a80\] \[c0000000001d1018\] exit\_mm+0x118/0x1b0
\[    2.558361\] \[c0000000622e7ac0\] \[c0000000001d141c\] do\_exit+0x2ec/0x870
\[    2.558376\] \[c0000000622e7b60\] \[c0000000001d1ca8\] do\_group\_exit+0x88/0x150
\[    2.558391\] \[c0000000622e7bb0\] \[c0000000001d1db8\] sys\_exit\_group+0x48/0x50
\[    2.558407\] \[c0000000622e7be0\] \[c00000000003d810\] system\_call\_exception+0x1e0/0x4c0
\[    2.558423\] \[c0000000622e7e50\] \[c00000000000d05c\] system\_call\_vectored\_common+0x15c/0x2ec
(...)
\[    2.558892\] ---\[ end trace 0000000000000000 \]---
\[    2.559022\] BUG: Bad rss-counter state mm:000000002267cc9e type:MM\_ANONPAGES val:1
\[    2.559037\] BUG: non-zero pgtables\_bytes on freeing mm: -6144

Here the modprobe process ended up with an allocated mm\_struct from the
mm\_struct slab that was used before by the debug\_vm\_pgtable test.  That is
not a problem, since the mm\_stru
---truncated---

## Affected and fixed versions

- Linux: \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 7bf57a0709cd7c9088cea8de023d6f4fbf2518b0; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 47d2a149611b8a94d24add9868c442a4af278658; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 63962ff932ef359925b94be2a88df6b4fd4fed0a; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 61a9f2e5c49f05e3ea2c16674540a075a1b4be6f; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 561171db3b3eb759ba3f284dba7a76f4476ade03; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< dde30854bddfb5d69f30022b53c5955a41088b33 (cvelist)
- Linux: 5.15 (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-39776. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39776.md
Affected: Linux >= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, < 7bf57a0709cd7c9088cea8de023d6f4fbf2518b0; >= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, < 47d2a149611b8a94d24add9868c442a4af278658; >= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, < 63962ff932ef359925b94be2a88df6b4fd4fed0a; >= 3c9b84f044a9e54cf56d1b2…
Fixed in: Linux 7bf57a0709cd7c9088cea8de023d6f4fbf2518b0, Linux 47d2a149611b8a94d24add9868c442a4af278658, Linux 63962ff932ef359925b94be2a88df6b4fd4fed0a, Linux 61a9f2e5c49f05e3ea2c16674540a075a1b4be6f, Linux 561171db3b3eb759ba3f284dba7a76f4476ade03

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

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

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

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

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

Linux \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 7bf57a0709cd7c9088cea8de023d6f4fbf2518b0; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 47d2a149611b8a94d24add9868c442a4af278658; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 63962ff932ef359925b94be2a88df6b4fd4fed0a; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 61a9f2e5c49f05e3ea2c16674540a075a1b4be6f; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< 561171db3b3eb759ba3f284dba7a76f4476ade03; \>= 3c9b84f044a9e54cf56d1b2c9b80a2d2ce56d70a, \< dde30854bddfb5d69f30022b53c5955a41088b33; Linux 5.15.

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

Yes. Fixed in Linux 7bf57a0709cd7c9088cea8de023d6f4fbf2518b0, Linux 47d2a149611b8a94d24add9868c442a4af278658, Linux 63962ff932ef359925b94be2a88df6b4fd4fed0a, Linux 61a9f2e5c49f05e3ea2c16674540a075a1b4be6f, Linux 561171db3b3eb759ba3f284dba7a76f4476ade03. No fix listed yet: follow the vendor advisory.

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

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/7bf57a0709cd7c9088cea8de023d6f4fbf2518b0>
- patch: <https://git.kernel.org/stable/c/47d2a149611b8a94d24add9868c442a4af278658>
- patch: <https://git.kernel.org/stable/c/63962ff932ef359925b94be2a88df6b4fd4fed0a>
- patch: <https://git.kernel.org/stable/c/61a9f2e5c49f05e3ea2c16674540a075a1b4be6f>
- patch: <https://git.kernel.org/stable/c/561171db3b3eb759ba3f284dba7a76f4476ade03>
- patch: <https://git.kernel.org/stable/c/dde30854bddfb5d69f30022b53c5955a41088b33>
- 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-39776>

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