{"id":"CVE-2026-31686","aliases":["CVE-2026-31686"],"related":[],"kind":"vulnerability","state":"published","title":"mm/kasan: fix double free for kasan pXds","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/kasan: fix double free for kasan pXds\n\nkasan_free_pxd() assumes the page table is always struct page aligned. \nBut that's not always the case for all architectures.  E.g.  In case of\npowerpc with 64K pagesize, PUD table (of size 4096) comes from slab cache\nnamed pgtable-2^9.  Hence instead of page_to_virt(pxd_page()) let's just\ndirectly pass the start of the pxd table which is passed as the 1st\nargument.\n\nThis fixes the below double free kasan issue seen with PMEM:\n\nradix-mmu: Mapped 0x0000047d10000000-0x0000047f90000000 with 2.00 MiB pages\n==================================================================\nBUG: KASAN: double-free in kasan_remove_zero_shadow+0x9c4/0xa20\nFree of addr c0000003c38e0000 by task ndctl/2164\n\nCPU: 34 UID: 0 PID: 2164 Comm: ndctl Not tainted 6.19.0-rc1-00048-gea1013c15392 #157 VOLUNTARY\nHardware name: IBM,9080-HEX POWER10 (architected) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_012) hv:phyp pSeries\nCall Trace:\n dump_stack_lvl+0x88/0xc4 (unreliable)\n print_report+0x214/0x63c\n kasan_report_invalid_free+0xe4/0x110\n check_slab_allocation+0x100/0x150\n kmem_cache_free+0x128/0x6e0\n kasan_remove_zero_shadow+0x9c4/0xa20\n memunmap_pages+0x2b8/0x5c0\n devm_action_release+0x54/0x70\n release_nodes+0xc8/0x1a0\n devres_release_all+0xe0/0x140\n device_unbind_cleanup+0x30/0x120\n device_release_driver_internal+0x3e4/0x450\n unbind_store+0xfc/0x110\n drv_attr_store+0x78/0xb0\n sysfs_kf_write+0x114/0x140\n kernfs_fop_write_iter+0x264/0x3f0\n vfs_write+0x3bc/0x7d0\n ksys_write+0xa4/0x190\n system_call_exception+0x190/0x480\n system_call_vectored_common+0x15c/0x2ec\n---- interrupt: 3000 at 0x7fff93b3d3f4\nNIP:  00007fff93b3d3f4 LR: 00007fff93b3d3f4 CTR: 0000000000000000\nREGS: c0000003f1b07e80 TRAP: 3000   Not tainted  (6.19.0-rc1-00048-gea1013c15392)\nMSR:  800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 48888208  XER: 00000000\n<...>\nNIP [00007fff93b3d3f4] 0x7fff93b3d3f4\nLR [00007fff93b3d3f4] 0x7fff93b3d3f4\n---- interrupt: 3000\n\n The buggy address belongs to the object at c0000003c38e0000\n  which belongs to the cache pgtable-2^9 of size 4096\n The buggy address is located 0 bytes inside of\n  4096-byte region [c0000003c38e0000, c0000003c38e1000)\n\n The buggy address belongs to the physical page:\n page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c38c\n head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0\n memcg:c0000003bfd63e01\n flags: 0x63ffff800000040(head|node=6|zone=0|lastcpupid=0x7ffff)\n page_type: f5(slab)\n raw: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000\n raw: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01\n head: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000\n head: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01\n head: 063ffff800000002 c00c000000f0e301 00000000ffffffff 00000000ffffffff\n head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004\n page dumped because: kasan: bad access detected\n\n[  138.953636] [   T2164] Memory state around the buggy address:\n[  138.953643] [   T2164]  c0000003c38dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953652] [   T2164]  c0000003c38dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953661] [   T2164] >c0000003c38e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953669] [   T2164]                    ^\n[  138.953675] [   T2164]  c0000003c38e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953684] [   T2164]  c0000003c38e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953692] [   T2164] ==================================================================\n[  138.953701] [   T2164] Disabling lock debugging due to kernel taint","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/kasan: fix double free for kasan pXds\n\nkasan_free_pxd() assumes the page table is always struct page aligned. \nBut that's not always the case for all architectures.  E.g.  In case of\npowerpc with 64K pagesize, PUD table (of size 4096) comes from slab cache\nnamed pgtable-2^9.  Hence instead of page_to_virt(pxd_page()) let's just\ndirectly pass the start of the pxd table which is passed as the 1st\nargument.\n\nThis fixes the below double free kasan issue seen with PMEM:\n\nradix-mmu: Mapped 0x0000047d10000000-0x0000047f90000000 with 2.00 MiB pages\n==================================================================\nBUG: KASAN: double-free in kasan_remove_zero_shadow+0x9c4/0xa20\nFree of addr c0000003c38e0000 by task ndctl/2164\n\nCPU: 34 UID: 0 PID: 2164 Comm: ndctl Not tainted 6.19.0-rc1-00048-gea1013c15392 #157 VOLUNTARY\nHardware name: IBM,9080-HEX POWER10 (architected) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_012) hv:phyp pSeries\nCall Trace:\n dump_stack_lvl+0x88/0xc4 (unreliable)\n print_report+0x214/0x63c\n kasan_report_invalid_free+0xe4/0x110\n check_slab_allocation+0x100/0x150\n kmem_cache_free+0x128/0x6e0\n kasan_remove_zero_shadow+0x9c4/0xa20\n memunmap_pages+0x2b8/0x5c0\n devm_action_release+0x54/0x70\n release_nodes+0xc8/0x1a0\n devres_release_all+0xe0/0x140\n device_unbind_cleanup+0x30/0x120\n device_release_driver_internal+0x3e4/0x450\n unbind_store+0xfc/0x110\n drv_attr_store+0x78/0xb0\n sysfs_kf_write+0x114/0x140\n kernfs_fop_write_iter+0x264/0x3f0\n vfs_write+0x3bc/0x7d0\n ksys_write+0xa4/0x190\n system_call_exception+0x190/0x480\n system_call_vectored_common+0x15c/0x2ec\n---- interrupt: 3000 at 0x7fff93b3d3f4\nNIP:  00007fff93b3d3f4 LR: 00007fff93b3d3f4 CTR: 0000000000000000\nREGS: c0000003f1b07e80 TRAP: 3000   Not tainted  (6.19.0-rc1-00048-gea1013c15392)\nMSR:  800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 48888208  XER: 00000000\n<...>\nNIP [00007fff93b3d3f4] 0x7fff93b3d3f4\nLR [00007fff93b3d3f4] 0x7fff93b3d3f4\n---- interrupt: 3000\n\n The buggy address belongs to the object at c0000003c38e0000\n  which belongs to the cache pgtable-2^9 of size 4096\n The buggy address is located 0 bytes inside of\n  4096-byte region [c0000003c38e0000, c0000003c38e1000)\n\n The buggy address belongs to the physical page:\n page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c38c\n head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0\n memcg:c0000003bfd63e01\n flags: 0x63ffff800000040(head|node=6|zone=0|lastcpupid=0x7ffff)\n page_type: f5(slab)\n raw: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000\n raw: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01\n head: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000\n head: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01\n head: 063ffff800000002 c00c000000f0e301 00000000ffffffff 00000000ffffffff\n head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004\n page dumped because: kasan: bad access detected\n\n[  138.953636] [   T2164] Memory state around the buggy address:\n[  138.953643] [   T2164]  c0000003c38dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953652] [   T2164]  c0000003c38dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953661] [   T2164] >c0000003c38e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953669] [   T2164]                    ^\n[  138.953675] [   T2164]  c0000003c38e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953684] [   T2164]  c0000003c38e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953692] [   T2164] ==================================================================\n[  138.953701] [   T2164] Disabling lock debugging due to kernel taint","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmm/kasan: corregir doble liberación para kasan pXds\n\nkasan_free_pxd() asume que la tabla de páginas siempre está alineada con struct page. Pero ese no es siempre el caso para todas las arquitecturas. Por ejemplo, en el caso de powerpc con un tamaño de página de 64K, la tabla PUD (de tamaño 4096) proviene de la caché de losa (slab cache) llamada pgtable-2^9. Por lo tanto, en lugar de page_to_virt(pxd_page()), pasemos directamente el inicio de la tabla pxd que se pasa como el 1er argumento.\n\nEsto corrige el siguiente problema de doble liberación de kasan visto con PMEM:\n\nradix-mmu: Mapeado 0x 0000047d10000000-0x 0000047f90000000 con páginas de 2.00 MiB\n==================================================================\nBUG: KASAN: doble-liberación en kasan_remove_zero_shadow+0x9c4/0xa20\nLiberación de la dirección c0000003c38e0000 por la tarea ndctl/2164\n\nCPU: 34 UID: 0 PID: 2164 Comm: ndctl No contaminado 6.19.0-rc1-00048-gea1013c15392 #157 VOLUNTARIO\nNombre del hardware: IBM,9080-HEX POWER10 (arquitectado) 0x 800200 0x f000006 de:IBM,FW1060.00 (NH1060_012) hv:phyp pSeries\nTraza de Llamada:\n dump_stack_lvl+0x88/0xc4 (no fiable)\n print_report+0x214/0x63c\n kasan_report_invalid_free+0xe4/0x110\n check_slab_allocation+0x100/0x150\n kmem_cache_free+0x128/0x6e0\n kasan_remove_zero_shadow+0x9c4/0xa20\n memunmap_pages+0x2b8/0x5c0\n devm_action_release+0x54/0x70\n release_nodes+0xc8/0x1a0\n devres_release_all+0xe0/0x140\n device_unbind_cleanup+0x30/0x120\n device_release_driver_internal+0x3e4/0x450\n unbind_store+0xfc/0x110\n drv_attr_store+0x78/0xb0\n sysfs_kf_write+0x114/0x140\n kernfs_fop_write_iter+0x264/0x3f0\n vfs_write+0x3bc/0x7d0\n ksys_write+0xa4/0x190\n system_call_exception+0x190/0x480\n system_call_vectored_common+0x15c/0x2ec\n- - - - interrupción: 3000 en 0x 7fff93b3d3f4\nNIP:  00007fff93b3d3f4 LR: 00007fff93b3d3f4 CTR: 0000000000000000\nREGS: c0000003f1b07e80 TRAP: 3000   No contaminado  (6.19.0-rc1-00048-gea1013c15392)\nMSR:  800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 48888208  XER: 00000000\n<...>\nNIP [00007fff93b3d3f4] 0x 7fff93b3d3f4\nLR [00007fff93b3d3f4] 0x 7fff93b3d3f4\n- - - - interrupción: 3000\n\n La dirección errónea pertenece al objeto en c0000003c38e0000\n  que pertenece a la caché pgtable-2^9 de tamaño 4096\n La dirección errónea se encuentra a 0 bytes dentro de\n  la región de 4096 bytes [c0000003c38e0000, c0000003c38e1000)\n\n La dirección errónea pertenece a la página física:\npágina: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x 3c38c\ncabecera: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0\nmemcg:c0000003bfd63e01\nflags: 0x 63ffff800000040(head|node=6|zone=0|lastcpupid=0x 7ffff)\npage_type: f5(slab)\nraw: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000\nraw: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01\nhead: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000\nhead: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01\nhead: 063ffff800000002 c00c000000f0e301 00000000ffffffff 00000000ffffffff\nhead: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004\npágina volcada porque: kasan: acceso incorrecto detectado\n\n[  138.953636] [   T2164] Estado de la memoria alrededor de la dirección errónea:\n[  138.953643] [   T2164]  c0000003c38dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953652] [   T2164]  c0000003c38dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953661] [   T2164] >c0000003c38e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953669] [   T2164]                    ^\n[  138.953675] [   T2164]  c0000003c38e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953684] [   T2164]  c0000003c38e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[  138.953692] [   T2164] ==================================================================\n[  138.953701] [   T2164] Deshabilitando la depuración de bloqueos debido a la contaminación del kernel","source":"nvd"}],"published":"2026-04-27T17:30:53.853Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"3298bdf5a878ded06351eb293856fa84e050029e","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"2277246ea265cdca64ce6fdea4b26cd6ff0ec4db","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"cec74b2ab7dff866b1d77eaa545b9e8fd14a1f87","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"a05f77cb227c39c5069aea6f12762a29d1e6c103","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"f6204f7ff6aff62ce6242a76982c5ba3a9ded707","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"85d98614e089a67dc6faa8ca766fe10a639f82b4","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"b38237a2ea9c6c19836eee2c57037e1f9f103576","status":"affected"},{"type":"git","introduced":"0207df4fa1a869281ddbf72db6203dbf036b3e1a","fixed":"51d8c78be0c27ddb91bc2c0263941d8b30a47d3b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.19","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.83","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.24","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.14","lastAffected":"6.19.*","status":"unaffected"},{"type":"semver","introduced":"7.0.1","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.19","fixed":"6.6.136"},{"status":"affected","introduced":"6.7","fixed":"6.12.83"},{"status":"affected","introduced":"6.13","fixed":"6.18.24"},{"status":"affected","introduced":"6.19","fixed":"6.19.14"},{"status":"affected","introduced":"7.0","fixed":"7.0.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7d7b2d5c107a1f6302cf0006d859985e7c3ddd1c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3298bdf5a878ded06351eb293856fa84e050029e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2277246ea265cdca64ce6fdea4b26cd6ff0ec4db","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cec74b2ab7dff866b1d77eaa545b9e8fd14a1f87","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a05f77cb227c39c5069aea6f12762a29d1e6c103","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f6204f7ff6aff62ce6242a76982c5ba3a9ded707","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/85d98614e089a67dc6faa8ca766fe10a639f82b4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b38237a2ea9c6c19836eee2c57037e1f9f103576","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/51d8c78be0c27ddb91bc2c0263941d8b30a47d3b","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:24:18.800Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31686","url":"https://www.cve.org/CVERecord?id=CVE-2026-31686","licence":"CVE Terms of Use","modified":"2026-11-06T15:32:22.952Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31686","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31686","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.683Z","epss":{"score":0.00128,"percentile":0.02617,"date":"2026-12-01T12:00:22.000Z"}}