CVE-2026-46029: mm/slab: return NULL early from kmalloc_nolock() in NMI on UP
In the Linux kernel, the following vulnerability has been resolved:
mm/slab: return NULL early from kmallocnolock() in NMI on UP
On UP kernels (!CONFIGSMP), spintrylock() is a no-op that unconditionally succeeds even when the lock is already held. As a result, kmallocnolock() called from NMI context can re-enter the slab allocator and acquire n->listlock that the interrupted context is already holding, corrupting slab state.
With CONFIGDEBUGSPINLOCK on UP, the following BUG is triggered with the slubkunit test module:
BUG: spinlock trylock failure on UP on CPU#0, kunittrycatch/243 [...] Call Trace: <NMI> dumpstacklvl+0x3f/0x60 dorawspintrylock+0x41/0x50 rawspintrylock+0x24/0x50 getfrompartialnode+0x120/0x4d0 slaballoc+0x8a/0x4c0 kmallocnolocknoprof+0x164/0x310 [...] </NMI>
Fix this by returning NULL early when invoked from NMI on a UP kernel.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernel mm/slubto a version that resolves this vulnerability.Patch return NULL early from kmalloc_nolock() in NMI on UP - Configuration
Ensure the fix is applied for UP kernels where CONFIG_SMP is not enabled by returning NULL early when kmalloc_nolock() is invoked from NMI on an UP kernel.
Linux kernel (CONFIG_SMP) CONFIG_SMP = disabled (!CONFIG_SMP)