CVE-2026-143409: sh: intc: Sort the prio and sense lists after filling them
In the Linux kernel, the following vulnerability has been resolved:
sh: intc: Sort the prio and sense lists after filling them
registerintccontroller() sorts d->prio and d->sense right after allocating them, with hw->nrprioregs and hw->nrsenseregs as the element count. The lists hold hw->nrvectors entries and are only filled later, by intcregisterirq().
On SH7785, sh7785-irq0123 and sh7785-irq4567 have four vectors but the SoC's eleven priority registers, so sort() swaps 88 bytes in a 32 byte kmalloc object at boot. slubdebug=FZPU reports "Right Redzone overwritten" in kmalloc-32, and v6.5 and v6.6 panic in kmemcacheallocnode() while registering sh7785-irq0123.
Found with a custom QEMU model of the SH7785LCR. On it, v6.4 sh7785lcrdefconfig boots with SLAB, the defconfig default before v6.5, and hangs before the console is up when built with SLUB.
Sort the lists once all vectors are registered, with the number of entries that were added.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In SH7785 interrupt-controller registration, sort d->prio and d->sense only after all vectors have been registered; use hw->nr_prio_regs and hw->nr_sense_regs as the respective element counts.
Event History
Frequently Asked Questions
Which systems are realistically affected?
The issue is demonstrated on the SH7785/SH7785LCR interrupt-controller configurations, including the sh7785-irq0123 and sh7785-irq4567 controllers. It occurs during kernel boot while their interrupt vectors are registered.
What is the practical impact?
The premature sort can write beyond a 32-byte kmalloc allocation, corrupting the right redzone. Reported outcomes include a panic during interrupt-controller registration on v6.5 and v6.6, or a boot hang before the console is available when using SLUB on a v6.4 SH7785LCR defconfig build.
Does the allocator configuration affect the observed behavior?
Yes. The SH7785LCR defconfig used SLAB by default before v6.5 and was reported to boot with SLAB, while builds using SLUB could hang before console initialization. SLUB debug options reported a right-redzone overwrite.
What should be done if the kernel cannot be updated immediately?
The provided data identifies SLAB as booting in the reported v6.4 SH7785LCR test case, whereas SLUB exposed a boot hang. This is only an observed behavior in that configuration; the resolution is to use a kernel containing the fix that sorts the lists after all vectors have been registered.