AZL-117929: CVE-2026-143012 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
dm-raid: bound arrayposition before indexing faileddevices
superinitvalidation() reads role = le32tocpu(sb2->arrayposition) out of an on-disk dmraidsuperblock and then uses it as a bit index into the faileddevices bitmap via testbit(role, (void )faileddevices). faileddevices is a uint64t[DISKSARRAYELEMS] (DISKSARRAYELEMS == 4, i.e. 256 bits) living on the stack. The only guard is role < 0, so any on-disk arrayposition >= 256 makes testbit() read past the end of the stack array (arrayposition == 256 reads faileddevices[4], 8 bytes past the object). For a raid1 set the role != raiddisk reorder branch falls through to the same testbit().
A crafted dm-raid superblock therefore causes a stack out-of-bounds read during table load. Reachable by anyone able to issue a dmsetup create with attacker-controlled metadata (CAPSYSADMIN in the target namespace); the crash fires in the constructor / analysesuperblocks path, before any mdrun or array sizing.
BUG: KASAN: stack-out-of-bounds in supervalidate+0x1cd0/0x3390 Read of size 8 at addr ffff888007b17828 by task poc/152 Call Trace: dumpstacklvl+0x64/0x80 printreport+0xd0/0x630 kasanreport+0xe5/0x120 kasancheckrange+0x105/0x1b0 supervalidate+0x1cd0/0x3390 (superinitvalidation, inlined) raidctr+0x2c4b/0xa0f0 dmtableaddtarget+0x66f/0xf80 tableload+0x2ee/0x780 ctlioctl+0x362/0x9f0 dmctlioctl+0x9/0x10 x64sysioctl+0x134/0x1c0 dosyscall64+0xe2/0x4b0 entrySYSCALL64afterhwframe+0x77/0x7f
role is a device position that must refer to an actual member of the array, so reject anything outside [0, rs->raiddisks) instead of only the negative case. rs->raiddisks is always <= the 256-bit capacity of faileddevices, so this both closes the out-of-bounds access and matches the intended semantics.
This bug was discovered by Artiphishell's vTriage pipeline, which generated a crafted raid1 superblock (magic "DmRd", compatfeatures=1, numdevices=2, arrayposition=256, level=1) and a dmsetup-create reproducer that reliably triggers the KASAN report on an unpatched kernel (the precursor DMINFO "raid device #256 now at position #0" is visible in the serial log just before the splat). The fix below was drafted with the Claude coding assistant; a userspace reproducer is available on request.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In dm-raid, reject array_position values outside [0, rs->raid_disks) before indexing failed_devices, rather than checking only for negative values.
Event History
Frequently Asked Questions
Who can trigger this issue?
An attacker needs CAP_SYS_ADMIN in the target namespace and the ability to run dmsetup create with attacker-controlled dm-raid metadata. This is reachable during device-mapper table loading, before the array is started or sized.
What metadata value causes the out-of-bounds access?
A dm-raid superblock array_position value of 256 or greater causes the failed_devices bitmap to be indexed beyond its 256-bit bounds. The same unsafe bitmap test is reachable for RAID1 through the role-reordering path.
How might an affected system present the issue?
The issue can produce a stack out-of-bounds read and crash while creating/loading the dm-raid table, in the constructor or analyse_superblocks path. Kernel diagnostics may identify super_validate and report a KASAN stack-out-of-bounds read.