CVE-2026-142916

Not scored yetLast modified Dec 3, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

powerpc: fix NMI exit ordering: restore soft masks after irqentry_nmi_exit()

When running with CONFIG_PPC_IRQ_SOFT_MASK_DEBUG=y and LOCKDEP=y, an Oops is triggered during NMI exit:

[ 202.258332] Oops: Exception in kernel mode, sig: 4 [#1] NIP [000000000003e178] 0x3e178 LR [c00000000003e174] arch_local_irq_restore+0x2a4/0x328 TRAP: 0700 MSR: 0000000000081000 <ME>

The faulting instruction at NIP is a 'trap' (0fe00000) inside the rfi_flush_fallback trampoline at a userspace-looking low address, reached after a bad rfid caused by an incorrect SRR0 value.

Root cause: DEFINE_INTERRUPT_HANDLER_NMI used to call arch_interrupt_nmi_exit_prepare() *before* irqentry_nmi_exit(), giving this sequence:

arch_interrupt_nmi_enter_prepare() // saves irq_soft_mask, irq_happened irqentry_nmi_enter() // __nmi_enter() -> nmi_count++, in_nmi()=true ____func(regs) // NMI handler body arch_interrupt_nmi_exit_prepare() // RESTORES irq_soft_mask=0 (IRQS_ENABLED) // RESTORES irq_happened with pending bits irqentry_nmi_exit() // instrumentation block runs here... trace_hardirqs_on_prepare() // ...with in_nmi()==true still lockdep_hardirqs_on_prepare() // ...and irq_soft_mask already restored to 0 -> arch_local_irq_restore(0) // mask=0 -> enable path entered WARN_ON_ONCE(in_nmi()) // FIRES: __nmi_exit() hasn't run yet __nmi_exit() // nmi_count-- (too late)

arch_interrupt_nmi_exit_prepare() restores irq_soft_mask to whatever the interrupted thread had (IRQS_ENABLED / 0) and restores irq_happened with any pending deferred-interrupt bits that were present when the NMI fired. This is correct and necessary before rfid back to the interrupted context, but it must not happen until irqentry_nmi_exit() has fully completed.

With irq_soft_mask=0 and pending bits in irq_happened, the trace_hardirqs_on_prepare() call inside irqentry_nmi_exit()'s instrumentation block reaches lockdep_hardirqs_on_prepare() which calls __trace_hardirqs_on_caller(), which eventually calls arch_local_irq_restore(0) (the IRQS_ENABLED / enable path).

arch_local_irq_restore() with mask=0 hits the CONFIG_PPC_IRQ_SOFT_MASK_DEBUG guards at irq_64.c:217:

WARN_ON_ONCE(in_nmi()); // TRUE: __nmi_exit() not yet called

The WARN_ON_ONCE fires a 'trap' instruction (tw 31,0,0 / 0fe00000) in kernel mode with MSR_PR=0, MSR_IR=0 (real-mode). The program check handler (TRAP 0700) takes the sig:4 (SIGILL) path via do_program_check() and calls die(), producing the Oops.

The RESTART_TABLE mechanism in arch_local_irq_restore then causes the bad rfid that lands at the userspace-looking address visible in the NIP.

The bug is invisible with LOCKDEP=n because trace_hardirqs_on_prepare() is a no-op when CONFIG_TRACE_IRQFLAGS is not set (TRACE_IRQFLAGS is selected by PROVE_LOCKING which selects LOCKDEP).

Fix: Move arch_interrupt_nmi_exit_prepare() to after the irqentry_nmi_exit() block, so that:

irqentry_nmi_exit() // __nmi_exit() -> nmi_count--, in_nmi()=false arch_interrupt_nmi_exit_prepare() // now safe to restore soft mask state

The instrumentation inside irqentry_nmi_exit() now executes while in_nmi() is still true (nmi_count not yet decremented), but irq_soft_mask is still IRQS_ALL_DISABLED (NMI-entry value), so arch_local_irq_restore() is never called with mask=0 from that path. After __nmi_exit() returns, arch_interrupt_nmi_exit_prepare() restores the pre-NMI soft mask and irq_happened, which is the correct state for the rfid back to the interrupted context.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-142917In the Linux kernel, the following vulnerability has been resolved: ALSA: hda: Use linked list for jack table So far we've used snd_array CVE-2026-142918In the Linux kernel, the following vulnerability has been resolved: drm/msm/a6xx: fix use-after-free of OPP in a6xx_pm_resume The OPP refeCVE-2026-142919In the Linux kernel, the following vulnerability has been resolved: riscv: dts: spacemit: k3-com260: keep dldo4 enabled dldo4 on the P1 PMCVE-2026-142925.4The Download Manager WordPress plugin before 3.3.66 does not properly escape a package's title before outputting it in the front-end packageCVE-2026-142920In the Linux kernel, the following vulnerability has been resolved: rtc: ftrtc010: use devm clock APIs to fix use-after-disable in remove CVE-2026-142921In the Linux kernel, the following vulnerability has been resolved: powerpc/interrupt: Use early_radix_enabled() in NMI real-mode guard raCVE-2026-142922In the Linux kernel, the following vulnerability has been resolved: sysctl: unregister tables before freeing bitmap The table registered fCVE-2026-142923In the Linux kernel, the following vulnerability has been resolved: NFS: use TCP for MOUNT when xprtsec= selects TLS An NFSv2 or NFSv3 texCVE-2026-142924In the Linux kernel, the following vulnerability has been resolved: RDMA/siw: Fix qp use-after-free in siw_get_base_qp() The reference takCVE-2026-142925In the Linux kernel, the following vulnerability has been resolved: RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation During VM live miCVE-2026-142926In the Linux kernel, the following vulnerability has been resolved: md/raid5: give the io_unit slab caches per-array names Both raid5 log CVE-2026-142927In the Linux kernel, the following vulnerability has been resolved: ACPI: glue: Carry out companion lookup under bus_type_sem When acpi_de
CVE-2026-142916: Unscored | Vulnix