2026-12-02
Apple RAID kernel extension
Tested on macOS 27.2.1
Fixed in macOS 27.3 Beta
In Apple's kernel RAID driver, a crafted disk image can supply a volume index larger than the fixed 1024-entry array, leading to an unchecked out-of-bounds pointer write that panics the system.
AppleLVMGroup is a class that manages a logical volume group's member volumes, parsed from on-disk metadata when a disk image or device is attached.
The bug is that AppleLVMGroup::startSet copies an image-supplied volumeCount into arLogicalVolumeCount but allocates arLogicalVolumes for only 1024 pointers.
Apple's published AppleLVMGroup source shows the same count assignment and fixed allocation.
initializeVolumes stores a newly built AppleLVMVolume* at an image-supplied TOC index without checking that index against the array capacity.
poc_write.py creates the raw disk image.
python3 poc_write.py lvg_write.img.hdiutil attach -nomount -readonly -imagekey diskimage-class=CRawDiskImage lvg_write.img. The host panics and reboots./Library/Logs/DiagnosticReports/.Expected: The kernel rejects an on-disk index outside the 1024-entry array.
Actual: The image causes a write data abort at index 2048, well past the 1024-entry array: with the array base in x8, the fault address lands at far − x8 = 0x4000 (2048 × 8 bytes).
(far: Fault Address Register: the virtual address the CPU was trying to write when it faulted)
An unprivileged user can cause a kernel out-of-bounds store and forced reboot by attaching the image.
The capture demonstrates an out-of-bounds write fault and denial of service.
The panic is a write data abort (esr: 0x0000000096000047). The array base is in x8 and the fault address far lands one TOC slot past it, at far − x8 = 0x4000 (2048 × 8 bytes):
(esr: Exception Syndrome Register: details on why the CPU raised an exception)
x8: 0xfffffe2eb1842000 (arLogicalVolumes base)
far: 0xfffffe2eb1846000 (far − x8 = 0x4000)
esr: 0x0000000096000047 (write data abort)