{"id":"CVE-2026-46029","state":"PUBLISHED","title":"mm/slab: return NULL early from kmalloc_nolock() in NMI on UP","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/slab: return NULL early from kmalloc_nolock() in NMI on UP\n\nOn UP kernels (!CONFIG_SMP), spin_trylock() is a no-op that\nunconditionally succeeds even when the lock is already held. As a\nresult, kmalloc_nolock() called from NMI context can re-enter the slab\nallocator and acquire n->list_lock that the interrupted context is\nalready holding, corrupting slab state.\n\nWith CONFIG_DEBUG_SPINLOCK on UP, the following BUG is triggered with\nthe slub_kunit test module:\n\n  BUG: spinlock trylock failure on UP on CPU#0, kunit_try_catch/243\n  [...]\n  Call Trace:\n   <NMI>\n   dump_stack_lvl+0x3f/0x60\n   do_raw_spin_trylock+0x41/0x50\n   _raw_spin_trylock+0x24/0x50\n   get_from_partial_node+0x120/0x4d0\n   ___slab_alloc+0x8a/0x4c0\n   kmalloc_nolock_noprof+0x164/0x310\n   [...]\n   </NMI>\n\nFix this by returning NULL early when invoked from NMI on a UP kernel.","publishedAt":"2026-05-27T12:56:38.376Z","updatedAt":"2026-08-05T12:29:13.390Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"af92793e52c3a99b828ed4bdd277fd3e11c18d08","status":"affected","lessThan":"a8d95d274be241ad21f6523bf2d6ba0d7d7e46b7","versionType":"git"},{"version":"af92793e52c3a99b828ed4bdd277fd3e11c18d08","status":"affected","lessThan":"d66553204a15bdb257d9ef8aca1e12f5fbb910b2","versionType":"git"},{"version":"af92793e52c3a99b828ed4bdd277fd3e11c18d08","status":"affected","lessThan":"5b31044e649e3e54c2caef135c09b371c2fbcd08","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.27","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.4","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]}],"references":["https://git.kernel.org/stable/c/a8d95d274be241ad21f6523bf2d6ba0d7d7e46b7","https://git.kernel.org/stable/c/d66553204a15bdb257d9ef8aca1e12f5fbb910b2","https://git.kernel.org/stable/c/5b31044e649e3e54c2caef135c09b371c2fbcd08"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/46xxx/CVE-2026-46029.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46029","state":"PUBLISHED","datePublished":"2026-05-27T12:56:38.376Z","dateUpdated":"2026-08-05T12:29:13.390Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.093Z"},"containers":{"cna":{"title":"mm/slab: return NULL early from kmalloc_nolock() in NMI on UP","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/slab: return NULL early from kmalloc_nolock() in NMI on UP\n\nOn UP kernels (!CONFIG_SMP), spin_trylock() is a no-op that\nunconditionally succeeds even when the lock is already held. As a\nresult, kmalloc_nolock() called from NMI context can re-enter the slab\nallocator and acquire n->list_lock that the interrupted context is\nalready holding, corrupting slab state.\n\nWith CONFIG_DEBUG_SPINLOCK on UP, the following BUG is triggered with\nthe slub_kunit test module:\n\n  BUG: spinlock trylock failure on UP on CPU#0, kunit_try_catch/243\n  [...]\n  Call Trace:\n   <NMI>\n   dump_stack_lvl+0x3f/0x60\n   do_raw_spin_trylock+0x41/0x50\n   _raw_spin_trylock+0x24/0x50\n   get_from_partial_node+0x120/0x4d0\n   ___slab_alloc+0x8a/0x4c0\n   kmalloc_nolock_noprof+0x164/0x310\n   [...]\n   </NMI>\n\nFix this by returning NULL early when invoked from NMI on a UP kernel."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"af92793e52c3a99b828ed4bdd277fd3e11c18d08","status":"affected","lessThan":"a8d95d274be241ad21f6523bf2d6ba0d7d7e46b7","versionType":"git"},{"version":"af92793e52c3a99b828ed4bdd277fd3e11c18d08","status":"affected","lessThan":"d66553204a15bdb257d9ef8aca1e12f5fbb910b2","versionType":"git"},{"version":"af92793e52c3a99b828ed4bdd277fd3e11c18d08","status":"affected","lessThan":"5b31044e649e3e54c2caef135c09b371c2fbcd08","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.27","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.4","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a8d95d274be241ad21f6523bf2d6ba0d7d7e46b7"},{"url":"https://git.kernel.org/stable/c/d66553204a15bdb257d9ef8aca1e12f5fbb910b2"},{"url":"https://git.kernel.org/stable/c/5b31044e649e3e54c2caef135c09b371c2fbcd08"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The only callers reaching NMI-context kmalloc_nolock() are local BPF programs (perf events) or in-kernel module code; there is no remote/network path to this allocator routine.\nAC:H - The bug only manifests on rare non-default uniprocessor (!CONFIG_SMP) kernels, and additionally requires the NMI to fire during the narrow window in which the interrupted context holds n->list_lock — both conditions are beyond the attacker's control.\nPR:L - Running code in NMI context that calls kmalloc_nolock() requires attaching a BPF program to a hardware perf event (CAP_BPF/CAP_PERFMON), which are sub-root capabilities delegable to confined tracing/profiling service accounts rather than full root.\nUI:N - Triggering the NMI-context allocation requires no action from any other user or victim.\nS:U - The slab-state corruption stays within the kernel's own security authority; no cross-boundary (VM/IOMMU) escape is involved.\nC:H - Re-entrant slab list/freelist corruption is a powerful primitive that can produce overlapping allocations and be leveraged for kernel memory disclosure.\nI:H - Corruption of SLUB partial-list/freelist metadata is a well-known basis for arbitrary-write primitives and control-flow hijacking.\nA:H - The corrupted slab state (or the DEBUG_SPINLOCK BUG) leads to kernel oops/panic, a full availability loss."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:29:13.390Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.27"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.0.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}