{"api_version":"1","generated_at":"2026-12-03T05:54:42+00:00","cve":"CVE-2026-142895","urls":{"html":"https://cve.report/CVE-2026-142895","api":"https://cve.report/api/cve/CVE-2026-142895.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-142895","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-142895"},"summary":{"title":"maple_tree: fix maple_range_64 crashes in RCU mode","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmaple_tree: fix maple_range_64 crashes in RCU mode\n\nPatch series \"maple_tree: fix maple_range_64 crashes in RCU mode\", v3.\n\nThe patch series fixes two RCU destroy path issues on maple_range_64\nnodes.  Both arising from the fact that a maple_range_64 node repurposes\nthe last slot to hold metadata when the node is not full.  Patch 1\naddresses the issues, and patch 2 adds a test used to catch them.\n\nCurrently there is no in-tree user of maple_range_64 nodes in RCU mode. \nAll in-tree users of MT_FLAGS_USE_RCU also set MT_FLAGS_ALLOC_RANGE which\nmakes the internal nodes maple_arange_64.\n\nBelow is the minimal reproducer used during debugging:\n\nstatic DEFINE_MTREE(tree);\nstatic int __init maple_fix_init(void)\n{\n        unsigned long i, j;\n\n        for (i = 10; i < 4000; i++) {\n                mt_init_flags(&tree, MT_FLAGS_USE_RCU);\n\n                for (j = 0; j < i; j++) {\n                        mtree_insert_range(&tree, j * 10, j * 10 + 9,\n                                        xa_mk_value(j), GFP_KERNEL);\n                }\n\n                mtree_destroy(&tree);\n                rcu_barrier();\n        }\n        return 0;\n}\n\nThe splat for the first issue addressed by the first patch is shown below.\nmt_clear_meta() runs after the slots have been rewritten with raw\npointers by mte_dead_leaves(), so it cannot recognize a valid last pointer\nbecause the type information is stripped.  On my 64-bit LE machine, it\nclears bytes 248 and 249 of the maple_range_64 which are the two least\nsignificant bytes of the last pointer.  The lowest byte is already zero,\nsince nodes are 256-byte aligned, but zeroing byte 249 corrupts the\npointer.\n\nKASAN catches it as a double-free, because that corrupted pointer happens\nto land on a node that was freed previously.  The splat appears at 226\ninsertions in the reproducer.  This is when the tree has a full root node\non a 64-bit build.\n\n  ==================================================================\n  BUG: KASAN: double-free in mt_free_walk+0x138/0x3a0\n  Free of addr ffff0000f3d40000 by task swapper/2/0\n  [...]\n  Call trace:\n   [...]\n   kmem_cache_free_bulk+0x5b8/0xc18\n   mt_free_walk+0x138/0x3a0\n   rcu_core+0x5d0/0x1638\n   rcu_core_si+0x18/0x30\n   [...]\n\n  Allocated by task 1218:\n   [...]\n   kmem_cache_alloc_from_sheaf_noprof+0xa8/0x2f0\n   dst_setup+0x210/0x630\n   mas_wr_split+0x568/0x26e0\n   mas_wr_store_entry+0x98c/0x1de0\n   mas_insert.isra.0+0x3d0/0x5d8\n   mtree_insert_range+0xec/0x1c8\n   maple_fix_init+0x94/0xff8 [maple_fix_obj]\n   [...]\n\n  Freed by task 0:\n   [...]\n   __kasan_slab_free+0x88/0xb8\n   __rcu_free_sheaf_prepare+0x94/0x360\n   rcu_free_sheaf+0x30/0x138\n   rcu_core+0x5d0/0x1638\n   rcu_core_si+0x18/0x30\n   [...]\n\n  The buggy address belongs to the object at ffff0000f3d40000\n   which belongs to the cache maple_node of size 256\n  The buggy address is located 0 bytes inside of\n   256-byte region [ffff0000f3d40000, ffff0000f3d40100)\n\n  [...]\n  Memory state around the buggy address:\n   ffff0000f3d3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n   ffff0000f3d3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n  >ffff0000f3d40000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb\n                     ^\n   ffff0000f3d40080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb\n   ffff0000f3d40100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n  ==================================================================\n\nThe second issue fixed in the first patch is in the mt_free_walk().\nmt_free_walk() descends by checking if the corresponding slot[offset]\nentry is non-zero. In a maple_range_64 node that has\nMAPLE_RANGE64_SLOTS-1 valid pointers to child nodes, all slots will be\nnon-zero, since the last slot holds the metadata. Thus, mte_dead_walk()\ndereferences the metadata as if it were a node and hits the\nnull-ptr-deref as shown in the splat below.\n\nAfter fixing the first issue, the reproducer reaches this case at 316\n---truncated---","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 04:18:28","updated_at":"2026-12-03 04:18:28"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/baed735a956f2a7badb5436bef6810303034f920","name":"https://git.kernel.org/stable/c/baed735a956f2a7badb5436bef6810303034f920","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2ef14d46311a598b1473717708fef505401ec8ff","name":"https://git.kernel.org/stable/c/2ef14d46311a598b1473717708fef505401ec8ff","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/644bd517701ddff603a263414f8fbc44d81bd179","name":"https://git.kernel.org/stable/c/644bd517701ddff603a263414f8fbc44d81bd179","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/927794f131debefd81a1dbcb872008ebe345aeb2","name":"https://git.kernel.org/stable/c/927794f131debefd81a1dbcb872008ebe345aeb2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-142895","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142895","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa 644bd517701ddff603a263414f8fbc44d81bd179 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa 927794f131debefd81a1dbcb872008ebe345aeb2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa 2ef14d46311a598b1473717708fef505401ec8ff git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa baed735a956f2a7badb5436bef6810303034f920 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["lib/maple_tree.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"644bd517701ddff603a263414f8fbc44d81bd179","status":"affected","version":"54a611b605901c7d5d05b6b8f5d04a6ceb0962aa","versionType":"git"},{"lessThan":"927794f131debefd81a1dbcb872008ebe345aeb2","status":"affected","version":"54a611b605901c7d5d05b6b8f5d04a6ceb0962aa","versionType":"git"},{"lessThan":"2ef14d46311a598b1473717708fef505401ec8ff","status":"affected","version":"54a611b605901c7d5d05b6b8f5d04a6ceb0962aa","versionType":"git"},{"lessThan":"baed735a956f2a7badb5436bef6810303034f920","status":"affected","version":"54a611b605901c7d5d05b6b8f5d04a6ceb0962aa","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["lib/maple_tree.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.1"},{"lessThan":"6.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmaple_tree: fix maple_range_64 crashes in RCU mode\n\nPatch series \"maple_tree: fix maple_range_64 crashes in RCU mode\", v3.\n\nThe patch series fixes two RCU destroy path issues on maple_range_64\nnodes.  Both arising from the fact that a maple_range_64 node repurposes\nthe last slot to hold metadata when the node is not full.  Patch 1\naddresses the issues, and patch 2 adds a test used to catch them.\n\nCurrently there is no in-tree user of maple_range_64 nodes in RCU mode. \nAll in-tree users of MT_FLAGS_USE_RCU also set MT_FLAGS_ALLOC_RANGE which\nmakes the internal nodes maple_arange_64.\n\nBelow is the minimal reproducer used during debugging:\n\nstatic DEFINE_MTREE(tree);\nstatic int __init maple_fix_init(void)\n{\n        unsigned long i, j;\n\n        for (i = 10; i < 4000; i++) {\n                mt_init_flags(&tree, MT_FLAGS_USE_RCU);\n\n                for (j = 0; j < i; j++) {\n                        mtree_insert_range(&tree, j * 10, j * 10 + 9,\n                                        xa_mk_value(j), GFP_KERNEL);\n                }\n\n                mtree_destroy(&tree);\n                rcu_barrier();\n        }\n        return 0;\n}\n\nThe splat for the first issue addressed by the first patch is shown below.\nmt_clear_meta() runs after the slots have been rewritten with raw\npointers by mte_dead_leaves(), so it cannot recognize a valid last pointer\nbecause the type information is stripped.  On my 64-bit LE machine, it\nclears bytes 248 and 249 of the maple_range_64 which are the two least\nsignificant bytes of the last pointer.  The lowest byte is already zero,\nsince nodes are 256-byte aligned, but zeroing byte 249 corrupts the\npointer.\n\nKASAN catches it as a double-free, because that corrupted pointer happens\nto land on a node that was freed previously.  The splat appears at 226\ninsertions in the reproducer.  This is when the tree has a full root node\non a 64-bit build.\n\n  ==================================================================\n  BUG: KASAN: double-free in mt_free_walk+0x138/0x3a0\n  Free of addr ffff0000f3d40000 by task swapper/2/0\n  [...]\n  Call trace:\n   [...]\n   kmem_cache_free_bulk+0x5b8/0xc18\n   mt_free_walk+0x138/0x3a0\n   rcu_core+0x5d0/0x1638\n   rcu_core_si+0x18/0x30\n   [...]\n\n  Allocated by task 1218:\n   [...]\n   kmem_cache_alloc_from_sheaf_noprof+0xa8/0x2f0\n   dst_setup+0x210/0x630\n   mas_wr_split+0x568/0x26e0\n   mas_wr_store_entry+0x98c/0x1de0\n   mas_insert.isra.0+0x3d0/0x5d8\n   mtree_insert_range+0xec/0x1c8\n   maple_fix_init+0x94/0xff8 [maple_fix_obj]\n   [...]\n\n  Freed by task 0:\n   [...]\n   __kasan_slab_free+0x88/0xb8\n   __rcu_free_sheaf_prepare+0x94/0x360\n   rcu_free_sheaf+0x30/0x138\n   rcu_core+0x5d0/0x1638\n   rcu_core_si+0x18/0x30\n   [...]\n\n  The buggy address belongs to the object at ffff0000f3d40000\n   which belongs to the cache maple_node of size 256\n  The buggy address is located 0 bytes inside of\n   256-byte region [ffff0000f3d40000, ffff0000f3d40100)\n\n  [...]\n  Memory state around the buggy address:\n   ffff0000f3d3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n   ffff0000f3d3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n  >ffff0000f3d40000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb\n                     ^\n   ffff0000f3d40080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb\n   ffff0000f3d40100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n  ==================================================================\n\nThe second issue fixed in the first patch is in the mt_free_walk().\nmt_free_walk() descends by checking if the corresponding slot[offset]\nentry is non-zero. In a maple_range_64 node that has\nMAPLE_RANGE64_SLOTS-1 valid pointers to child nodes, all slots will be\nnon-zero, since the last slot holds the metadata. Thus, mte_dead_walk()\ndereferences the metadata as if it were a node and hits the\nnull-ptr-deref as shown in the splat below.\n\nAfter fixing the first issue, the reproducer reaches this case at 316\n---truncated---"}],"providerMetadata":{"dateUpdated":"2026-12-03T03:25:45.799Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/644bd517701ddff603a263414f8fbc44d81bd179"},{"url":"https://git.kernel.org/stable/c/927794f131debefd81a1dbcb872008ebe345aeb2"},{"url":"https://git.kernel.org/stable/c/2ef14d46311a598b1473717708fef505401ec8ff"},{"url":"https://git.kernel.org/stable/c/baed735a956f2a7badb5436bef6810303034f920"}],"title":"maple_tree: fix maple_range_64 crashes in RCU mode","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-142895","datePublished":"2026-12-03T03:25:45.799Z","dateReserved":"2026-12-03T03:10:28.335Z","dateUpdated":"2026-12-03T03:25:45.799Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 04:18:28","lastModifiedDate":"2026-12-03 04:18:28","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"142895","Ordinal":"1","Title":"maple_tree: fix maple_range_64 crashes in RCU mode","CVE":"CVE-2026-142895","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"142895","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmaple_tree: fix maple_range_64 crashes in RCU mode\n\nPatch series \"maple_tree: fix maple_range_64 crashes in RCU mode\", v3.\n\nThe patch series fixes two RCU destroy path issues on maple_range_64\nnodes.  Both arising from the fact that a maple_range_64 node repurposes\nthe last slot to hold metadata when the node is not full.  Patch 1\naddresses the issues, and patch 2 adds a test used to catch them.\n\nCurrently there is no in-tree user of maple_range_64 nodes in RCU mode. \nAll in-tree users of MT_FLAGS_USE_RCU also set MT_FLAGS_ALLOC_RANGE which\nmakes the internal nodes maple_arange_64.\n\nBelow is the minimal reproducer used during debugging:\n\nstatic DEFINE_MTREE(tree);\nstatic int __init maple_fix_init(void)\n{\n        unsigned long i, j;\n\n        for (i = 10; i < 4000; i++) {\n                mt_init_flags(&tree, MT_FLAGS_USE_RCU);\n\n                for (j = 0; j < i; j++) {\n                        mtree_insert_range(&tree, j * 10, j * 10 + 9,\n                                        xa_mk_value(j), GFP_KERNEL);\n                }\n\n                mtree_destroy(&tree);\n                rcu_barrier();\n        }\n        return 0;\n}\n\nThe splat for the first issue addressed by the first patch is shown below.\nmt_clear_meta() runs after the slots have been rewritten with raw\npointers by mte_dead_leaves(), so it cannot recognize a valid last pointer\nbecause the type information is stripped.  On my 64-bit LE machine, it\nclears bytes 248 and 249 of the maple_range_64 which are the two least\nsignificant bytes of the last pointer.  The lowest byte is already zero,\nsince nodes are 256-byte aligned, but zeroing byte 249 corrupts the\npointer.\n\nKASAN catches it as a double-free, because that corrupted pointer happens\nto land on a node that was freed previously.  The splat appears at 226\ninsertions in the reproducer.  This is when the tree has a full root node\non a 64-bit build.\n\n  ==================================================================\n  BUG: KASAN: double-free in mt_free_walk+0x138/0x3a0\n  Free of addr ffff0000f3d40000 by task swapper/2/0\n  [...]\n  Call trace:\n   [...]\n   kmem_cache_free_bulk+0x5b8/0xc18\n   mt_free_walk+0x138/0x3a0\n   rcu_core+0x5d0/0x1638\n   rcu_core_si+0x18/0x30\n   [...]\n\n  Allocated by task 1218:\n   [...]\n   kmem_cache_alloc_from_sheaf_noprof+0xa8/0x2f0\n   dst_setup+0x210/0x630\n   mas_wr_split+0x568/0x26e0\n   mas_wr_store_entry+0x98c/0x1de0\n   mas_insert.isra.0+0x3d0/0x5d8\n   mtree_insert_range+0xec/0x1c8\n   maple_fix_init+0x94/0xff8 [maple_fix_obj]\n   [...]\n\n  Freed by task 0:\n   [...]\n   __kasan_slab_free+0x88/0xb8\n   __rcu_free_sheaf_prepare+0x94/0x360\n   rcu_free_sheaf+0x30/0x138\n   rcu_core+0x5d0/0x1638\n   rcu_core_si+0x18/0x30\n   [...]\n\n  The buggy address belongs to the object at ffff0000f3d40000\n   which belongs to the cache maple_node of size 256\n  The buggy address is located 0 bytes inside of\n   256-byte region [ffff0000f3d40000, ffff0000f3d40100)\n\n  [...]\n  Memory state around the buggy address:\n   ffff0000f3d3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n   ffff0000f3d3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n  >ffff0000f3d40000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb\n                     ^\n   ffff0000f3d40080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb\n   ffff0000f3d40100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n  ==================================================================\n\nThe second issue fixed in the first patch is in the mt_free_walk().\nmt_free_walk() descends by checking if the corresponding slot[offset]\nentry is non-zero. In a maple_range_64 node that has\nMAPLE_RANGE64_SLOTS-1 valid pointers to child nodes, all slots will be\nnon-zero, since the last slot holds the metadata. Thus, mte_dead_walk()\ndereferences the metadata as if it were a node and hits the\nnull-ptr-deref as shown in the splat below.\n\nAfter fixing the first issue, the reproducer reaches this case at 316\n---truncated---","Type":"Description","Title":"maple_tree: fix maple_range_64 crashes in RCU mode"}]}}}