cve.bz

CVE-2025-39776 Use After Free

7.8 highEPSS 0.2%Fix available

High (7.8). EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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---

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-39776 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-39776?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-39776?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-39776 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.15 and later

Fixed in

ProductRelease lineFixed in
Linux5.155.15.190
Linux6.16.1.149
Linux6.66.6.103
Linux6.126.12.44
Linux6.166.16.4
Linuxlater releases6.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux-6.16.1.153-1~deb11u1DLA-4328-1
Debian12linux6.1.153-1DEBIAN-CVE-2025-39776 DSA-6009-1
Debian13linux6.12.48-1DEBIAN-CVE-2025-39776 DSA-6008-1
Debian14linux6.16.5-1DEBIAN-CVE-2025-39776
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-39776
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-39776
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-39776
Ubuntu22.04:LTSlinux, linux-lowlatency5.15.0-163.173UBUNTU-CVE-2025-39776 USN-7909-1
Ubuntu22.04:LTSlinux-aws5.15.0-1097.104UBUNTU-CVE-2025-39776 USN-7909-1
Ubuntu22.04:LTSlinux-aws-6.8, linux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-39776 USN-8028-5
Ubuntu22.04:LTSlinux-azure5.15.0-1101.110UBUNTU-CVE-2025-39776 USN-7910-2
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-39776 USN-8126-1
Ubuntu22.04:LTSlinux-azure-fde5.15.0-1102.111.1UBUNTU-CVE-2025-39776
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-39776
Ubuntu22.04:LTSlinux-gcp5.15.0-1097.106UBUNTU-CVE-2025-39776 USN-7909-4
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-39776 USN-8031-1
58 more for Ubuntu in the JSON and on Ubuntu's page.
Azure Linux2kernel5.15.200.1-1AZL-74673
Azure Linux3kernel6.6.104.2-1AZL-67247
Alpaquita23linux-lts6.1.151-r0BELL-CVE-2025-39776
Alpaquita25linux-lts6.12.44-r0BELL-CVE-2025-39776
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-39776

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpaquita.

Red Hat

Red Hat rates this Low.

Red Hat's statement

A low impact flaw was found in the Linux kernel's mm/debug_vm_pgtable self-test, affecting the kernel packages in Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 10, and Red Hat In-Vehicle OS 1. This test, which runs on kernels built with CONFIG_DEBUG_VM_PGTABLE=y such as debug kernel builds, manually allocates page table entries and an mm_struct, but its destroy_args() exit path fails to clear those entries. Stale page table entries are therefore left behind in the freed mm_struct, and if another process later reuses that mm_struct from the slab allocator, it can run into the stale entries when its memory map is torn down, resulting in kernel warnings and incorrect page table accounting (for example a WARNING in free_pud_range(), a bad rss-counter state, and a non-zero pgtables_bytes value when the mm is freed). Red Hat Enterprise Linux 6, 7, and 8 are not affected because the vulnerable code is not present in those releases. Red Hat assesses the impact of this flaw as low, with the RH CVSS 3.1 score of 5.5 reflecting availability-only impact; this differs from the generic NIST score of 7.8, which assumes high impact to confidentiality, integrity, and availability, because the affected code is a debug self-test whose failure mode is kernel warnings and incorrect accounting rather than exposure or corruption of data. Because the flaw is confined to this debug self-test and its impact is limited to kernel configurations that enable it, the fix has been deferred for the affected Red Hat Enterprise Linux 9, 10, and Red Hat In-Vehicle OS streams; the residual risk of continuing to run affected kernels is spurious kernel warnings and incorrect page-table accounting on debug kernels that enable this test.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-39776.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-134-10Siemens SIMATIC2026-05-12Critical ManufacturingSIMATIC CN 4100none listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON