{"id":"CVE-2026-143012","state":"PUBLISHED","title":"dm-raid: bound array_position before indexing failed_devices","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndm-raid: bound array_position before indexing failed_devices\n\nsuper_init_validation() reads role = le32_to_cpu(sb2->array_position)\nout of an on-disk dm_raid_superblock and then uses it as a bit index into\nthe failed_devices bitmap via test_bit(role, (void *)failed_devices).\nfailed_devices is a uint64_t[DISKS_ARRAY_ELEMS] (DISKS_ARRAY_ELEMS == 4,\ni.e. 256 bits) living on the stack. The only guard is role < 0, so any\non-disk array_position >= 256 makes test_bit() read past the end of the\nstack array (array_position == 256 reads failed_devices[4], 8 bytes past\nthe object). For a raid1 set the role != raid_disk reorder branch falls\nthrough to the same test_bit().\n\nA crafted dm-raid superblock therefore causes a stack out-of-bounds read\nduring table load. Reachable by anyone able to issue a dmsetup create\nwith attacker-controlled metadata (CAP_SYS_ADMIN in the target\nnamespace); the crash fires in the constructor / analyse_superblocks\npath, before any md_run or array sizing.\n\n  BUG: KASAN: stack-out-of-bounds in super_validate+0x1cd0/0x3390\n  Read of size 8 at addr ffff888007b17828 by task poc/152\n  Call Trace:\n   dump_stack_lvl+0x64/0x80\n   print_report+0xd0/0x630\n   kasan_report+0xe5/0x120\n   kasan_check_range+0x105/0x1b0\n   super_validate+0x1cd0/0x3390        (super_init_validation, inlined)\n   raid_ctr+0x2c4b/0xa0f0\n   dm_table_add_target+0x66f/0xf80\n   table_load+0x2ee/0x780\n   ctl_ioctl+0x362/0x9f0\n   dm_ctl_ioctl+0x9/0x10\n   __x64_sys_ioctl+0x134/0x1c0\n   do_syscall_64+0xe2/0x4b0\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nrole is a device position that must refer to an actual member of the\narray, so reject anything outside [0, rs->raid_disks) instead of only the\nnegative case. rs->raid_disks is always <= the 256-bit capacity of\nfailed_devices, so this both closes the out-of-bounds access and matches\nthe intended semantics.\n\nThis bug was discovered by Artiphishell's vTriage pipeline, which\ngenerated a crafted raid1 superblock (magic \"DmRd\", compat_features=1,\nnum_devices=2, array_position=256, level=1) and a dmsetup-create\nreproducer that reliably triggers the KASAN report on an unpatched kernel\n(the precursor DMINFO \"raid device #256 now at position #0\" is visible in\nthe serial log just before the splat). The fix below was drafted with the\nClaude coding assistant; a userspace reproducer is available on request.","publishedAt":"2026-12-03T09:17:46.804Z","updatedAt":"2026-12-03T09:17:46.804Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"df0cc3d675ce42a61f087281e8ed99e8ae7fbdda","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"5d9908dcbe0e1ed3e2807488fe703b83fdf11552","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"3feb0cd0bb23a75d9ff5e727bbf7cf3841311444","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ba1f45e8624e62e32603c65bcf3eb31f77f5d9e0","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"727686c4e145b41594f064f0ed712ee778d9f892","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"11b5cd14c0eecae458cecbe53d21a3dbc10190f5","versionType":"git"},{"version":"0","status":"affected","lessThan":"5.10.276","versionType":"semver"},{"version":"0","status":"affected","lessThan":"5.15.227","versionType":"semver"},{"version":"0","status":"affected","lessThan":"6.12.120","versionType":"semver"},{"version":"0","status":"affected","lessThan":"6.18.66","versionType":"semver"},{"version":"0","status":"affected","lessThan":"7.3.7","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-raid.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10.276","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-raid.c"]}],"references":["https://git.kernel.org/stable/c/df0cc3d675ce42a61f087281e8ed99e8ae7fbdda","https://git.kernel.org/stable/c/5d9908dcbe0e1ed3e2807488fe703b83fdf11552","https://git.kernel.org/stable/c/3feb0cd0bb23a75d9ff5e727bbf7cf3841311444","https://git.kernel.org/stable/c/ba1f45e8624e62e32603c65bcf3eb31f77f5d9e0","https://git.kernel.org/stable/c/727686c4e145b41594f064f0ed712ee778d9f892","https://git.kernel.org/stable/c/11b5cd14c0eecae458cecbe53d21a3dbc10190f5"],"weaknesses":[],"ingestedAt":"2026-12-03T09:26:06.073Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143012.json","commit":"9fd484e43f2e14021809e195d28c1172759faad0","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143012","state":"PUBLISHED","datePublished":"2026-12-03T09:17:46.804Z","dateUpdated":"2026-12-03T09:17:46.804Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.343Z"},"containers":{"cna":{"title":"dm-raid: bound array_position before indexing failed_devices","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndm-raid: bound array_position before indexing failed_devices\n\nsuper_init_validation() reads role = le32_to_cpu(sb2->array_position)\nout of an on-disk dm_raid_superblock and then uses it as a bit index into\nthe failed_devices bitmap via test_bit(role, (void *)failed_devices).\nfailed_devices is a uint64_t[DISKS_ARRAY_ELEMS] (DISKS_ARRAY_ELEMS == 4,\ni.e. 256 bits) living on the stack. The only guard is role < 0, so any\non-disk array_position >= 256 makes test_bit() read past the end of the\nstack array (array_position == 256 reads failed_devices[4], 8 bytes past\nthe object). For a raid1 set the role != raid_disk reorder branch falls\nthrough to the same test_bit().\n\nA crafted dm-raid superblock therefore causes a stack out-of-bounds read\nduring table load. Reachable by anyone able to issue a dmsetup create\nwith attacker-controlled metadata (CAP_SYS_ADMIN in the target\nnamespace); the crash fires in the constructor / analyse_superblocks\npath, before any md_run or array sizing.\n\n  BUG: KASAN: stack-out-of-bounds in super_validate+0x1cd0/0x3390\n  Read of size 8 at addr ffff888007b17828 by task poc/152\n  Call Trace:\n   dump_stack_lvl+0x64/0x80\n   print_report+0xd0/0x630\n   kasan_report+0xe5/0x120\n   kasan_check_range+0x105/0x1b0\n   super_validate+0x1cd0/0x3390        (super_init_validation, inlined)\n   raid_ctr+0x2c4b/0xa0f0\n   dm_table_add_target+0x66f/0xf80\n   table_load+0x2ee/0x780\n   ctl_ioctl+0x362/0x9f0\n   dm_ctl_ioctl+0x9/0x10\n   __x64_sys_ioctl+0x134/0x1c0\n   do_syscall_64+0xe2/0x4b0\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nrole is a device position that must refer to an actual member of the\narray, so reject anything outside [0, rs->raid_disks) instead of only the\nnegative case. rs->raid_disks is always <= the 256-bit capacity of\nfailed_devices, so this both closes the out-of-bounds access and matches\nthe intended semantics.\n\nThis bug was discovered by Artiphishell's vTriage pipeline, which\ngenerated a crafted raid1 superblock (magic \"DmRd\", compat_features=1,\nnum_devices=2, array_position=256, level=1) and a dmsetup-create\nreproducer that reliably triggers the KASAN report on an unpatched kernel\n(the precursor DMINFO \"raid device #256 now at position #0\" is visible in\nthe serial log just before the splat). The fix below was drafted with the\nClaude coding assistant; a userspace reproducer is available on request."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"df0cc3d675ce42a61f087281e8ed99e8ae7fbdda","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"5d9908dcbe0e1ed3e2807488fe703b83fdf11552","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"3feb0cd0bb23a75d9ff5e727bbf7cf3841311444","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ba1f45e8624e62e32603c65bcf3eb31f77f5d9e0","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"727686c4e145b41594f064f0ed712ee778d9f892","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"11b5cd14c0eecae458cecbe53d21a3dbc10190f5","versionType":"git"},{"version":"0","status":"affected","lessThan":"5.10.276","versionType":"semver"},{"version":"0","status":"affected","lessThan":"5.15.227","versionType":"semver"},{"version":"0","status":"affected","lessThan":"6.12.120","versionType":"semver"},{"version":"0","status":"affected","lessThan":"6.18.66","versionType":"semver"},{"version":"0","status":"affected","lessThan":"7.3.7","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-raid.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10.276","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/md/dm-raid.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/df0cc3d675ce42a61f087281e8ed99e8ae7fbdda"},{"url":"https://git.kernel.org/stable/c/5d9908dcbe0e1ed3e2807488fe703b83fdf11552"},{"url":"https://git.kernel.org/stable/c/3feb0cd0bb23a75d9ff5e727bbf7cf3841311444"},{"url":"https://git.kernel.org/stable/c/ba1f45e8624e62e32603c65bcf3eb31f77f5d9e0"},{"url":"https://git.kernel.org/stable/c/727686c4e145b41594f064f0ed712ee778d9f892"},{"url":"https://git.kernel.org/stable/c/11b5cd14c0eecae458cecbe53d21a3dbc10190f5"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:17:46.804Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.276"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}