# CVE-2026-31686: mm/kasan: fix double free for kasan pXds

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; 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.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-415
- **Published:** 2026-04-27T17:30:53.853Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 3298bdf5a878ded06351eb293856fa84e050029e; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 2277246ea265cdca64ce6fdea4b26cd6ff0ec4db; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< cec74b2ab7dff866b1d77eaa545b9e8fd14a1f87; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< a05f77cb227c39c5069aea6f12762a29d1e6c103; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< f6204f7ff6aff62ce6242a76982c5ba3a9ded707; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 85d98614e089a67dc6faa8ca766fe10a639f82b4; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< b38237a2ea9c6c19836eee2c57037e1f9f103576; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b
- Anyone running Linux 4.19

## Description

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

mm/kasan: fix double free for kasan pXds

kasan\_free\_pxd() assumes the page table is always struct page aligned. 
But that's not always the case for all architectures.  E.g.  In case of
powerpc with 64K pagesize, PUD table (of size 4096) comes from slab cache
named pgtable-2^9.  Hence instead of page\_to\_virt(pxd\_page()) let's just
directly pass the start of the pxd table which is passed as the 1st
argument.

This fixes the below double free kasan issue seen with PMEM:

radix-mmu: Mapped 0x0000047d10000000-0x0000047f90000000 with 2.00 MiB pages
==================================================================
BUG: KASAN: double-free in kasan\_remove\_zero\_shadow+0x9c4/0xa20
Free of addr c0000003c38e0000 by task ndctl/2164

CPU: 34 UID: 0 PID: 2164 Comm: ndctl Not tainted 6.19.0-rc1-00048-gea1013c15392 \#157 VOLUNTARY
Hardware name: IBM,9080-HEX POWER10 (architected) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060\_012) hv:phyp pSeries
Call Trace:
 dump\_stack\_lvl+0x88/0xc4 (unreliable)
 print\_report+0x214/0x63c
 kasan\_report\_invalid\_free+0xe4/0x110
 check\_slab\_allocation+0x100/0x150
 kmem\_cache\_free+0x128/0x6e0
 kasan\_remove\_zero\_shadow+0x9c4/0xa20
 memunmap\_pages+0x2b8/0x5c0
 devm\_action\_release+0x54/0x70
 release\_nodes+0xc8/0x1a0
 devres\_release\_all+0xe0/0x140
 device\_unbind\_cleanup+0x30/0x120
 device\_release\_driver\_internal+0x3e4/0x450
 unbind\_store+0xfc/0x110
 drv\_attr\_store+0x78/0xb0
 sysfs\_kf\_write+0x114/0x140
 kernfs\_fop\_write\_iter+0x264/0x3f0
 vfs\_write+0x3bc/0x7d0
 ksys\_write+0xa4/0x190
 system\_call\_exception+0x190/0x480
 system\_call\_vectored\_common+0x15c/0x2ec
---- interrupt: 3000 at 0x7fff93b3d3f4
NIP:  00007fff93b3d3f4 LR: 00007fff93b3d3f4 CTR: 0000000000000000
REGS: c0000003f1b07e80 TRAP: 3000   Not tainted  (6.19.0-rc1-00048-gea1013c15392)
MSR:  800000000280f033 \<SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE\>  CR: 48888208  XER: 00000000
\<...\>
NIP \[00007fff93b3d3f4\] 0x7fff93b3d3f4
LR \[00007fff93b3d3f4\] 0x7fff93b3d3f4
---- interrupt: 3000

 The buggy address belongs to the object at c0000003c38e0000
  which belongs to the cache pgtable-2^9 of size 4096
 The buggy address is located 0 bytes inside of
  4096-byte region \[c0000003c38e0000, c0000003c38e1000)

 The buggy address belongs to the physical page:
 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c38c
 head: order:2 mapcount:0 entire\_mapcount:0 nr\_pages\_mapped:0 pincount:0
 memcg:c0000003bfd63e01
 flags: 0x63ffff800000040(head\|node=6\|zone=0\|lastcpupid=0x7ffff)
 page\_type: f5(slab)
 raw: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000
 raw: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01
 head: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000
 head: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01
 head: 063ffff800000002 c00c000000f0e301 00000000ffffffff 00000000ffffffff
 head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
 page dumped because: kasan: bad access detected

\[  138.953636\] \[   T2164\] Memory state around the buggy address:
\[  138.953643\] \[   T2164\]  c0000003c38dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[  138.953652\] \[   T2164\]  c0000003c38dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[  138.953661\] \[   T2164\] \>c0000003c38e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[  138.953669\] \[   T2164\]                    ^
\[  138.953675\] \[   T2164\]  c0000003c38e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[  138.953684\] \[   T2164\]  c0000003c38e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
\[  138.953692\] \[   T2164\] ==================================================================
\[  138.953701\] \[   T2164\] Disabling lock debugging due to kernel taint

## Affected and fixed versions

- Linux: \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 3298bdf5a878ded06351eb293856fa84e050029e; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 2277246ea265cdca64ce6fdea4b26cd6ff0ec4db; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< cec74b2ab7dff866b1d77eaa545b9e8fd14a1f87; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< a05f77cb227c39c5069aea6f12762a29d1e6c103; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< f6204f7ff6aff62ce6242a76982c5ba3a9ded707; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 85d98614e089a67dc6faa8ca766fe10a639f82b4; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< b38237a2ea9c6c19836eee2c57037e1f9f103576; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b (cvelist)
- Linux: 4.19 (cvelist)

## Mitigation

- Upgrade Linux to 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31686. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31686.md
Affected: Linux >= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, < 7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c; >= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, < 3298bdf5a878ded06351eb293856fa84e050029e; >= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, < 2277246ea265cdca64ce6fdea4b26cd6ff0ec4db; >= 0207df4fa1a869281ddbf72…
Fixed in: Linux 7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c, Linux 3298bdf5a878ded06351eb293856fa84e050029e, Linux 2277246ea265cdca64ce6fdea4b26cd6ff0ec4db, Linux 85d98614e089a67dc6faa8ca766fe10a639f82b4, Linux 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b

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-2026-31686 being exploited?

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

### How serious is CVE-2026-31686?

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

### Which versions are affected by CVE-2026-31686?

Linux \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 3298bdf5a878ded06351eb293856fa84e050029e; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 2277246ea265cdca64ce6fdea4b26cd6ff0ec4db; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< cec74b2ab7dff866b1d77eaa545b9e8fd14a1f87; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< a05f77cb227c39c5069aea6f12762a29d1e6c103; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< f6204f7ff6aff62ce6242a76982c5ba3a9ded707; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 85d98614e089a67dc6faa8ca766fe10a639f82b4; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< b38237a2ea9c6c19836eee2c57037e1f9f103576; \>= 0207df4fa1a869281ddbf72db6203dbf036b3e1a, \< 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b; Linux 4.19.

### Is there a fix for CVE-2026-31686?

Yes. Fixed in Linux 7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c, Linux 3298bdf5a878ded06351eb293856fa84e050029e, Linux 2277246ea265cdca64ce6fdea4b26cd6ff0ec4db, Linux 85d98614e089a67dc6faa8ca766fe10a639f82b4, Linux 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b. Upgrade Linux to 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b or later.

### How do I check if I'm affected by CVE-2026-31686?

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/cec74b2ab7dff866b1d77eaa545b9e8fd14a1f87>
- patch: <https://git.kernel.org/stable/c/a05f77cb227c39c5069aea6f12762a29d1e6c103>
- patch: <https://git.kernel.org/stable/c/f6204f7ff6aff62ce6242a76982c5ba3a9ded707>
- patch: <https://git.kernel.org/stable/c/85d98614e089a67dc6faa8ca766fe10a639f82b4>
- patch: <https://git.kernel.org/stable/c/b38237a2ea9c6c19836eee2c57037e1f9f103576>
- patch: <https://git.kernel.org/stable/c/51d8c78be0c27ddb91bc2c0263941d8b30a47d3b>
- other: <https://git.kernel.org/stable/c/7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c>
- other: <https://git.kernel.org/stable/c/3298bdf5a878ded06351eb293856fa84e050029e>
- other: <https://git.kernel.org/stable/c/2277246ea265cdca64ce6fdea4b26cd6ff0ec4db>

## 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-2026-31686>

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