CVE-2026-139059

Not scored yetLast modified Nov 30, 2026

Description

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

microblaze: preserve the MSR carry flags across signals

setup_sigcontext() and restore_sigcontext() copy r0-r31, pc, ear, esr and fsr to and from the signal frame but never touch MSR. The interrupted MSR is therefore dropped from the signal context entirely: the handler's ucontext does not expose it, a handler cannot adjust the resumed arithmetic flags through uc_mcontext.regs.msr, and -- because restore_sigcontext() leaves regs->msr as whatever the rt_sigreturn trap left in it -- the interrupted context resumes with the carry produced by the syscall entry path (_user_exception does "addi r14, r14, 4", which writes carry), not with its own.

Other architectures round-trip the user-visible flags through the signal frame (arm's cpsr, csky's carry, x86's eflags), so a handler can both read and adjust the resumed flags; purely privileged status registers such as riscv's sstatus are left out. MicroBlaze should do the same for the user-writable bits.

Concretely, MSR[C] (carry) is lost across signal delivery. Code that keeps a live carry across a point where a signal can be delivered -- for example an lwx/swx compare-and-swap retry loop, between the swx and the carry test -- resumes with the handler's carry and mis-evaluates the result; the same failure class as the rt_sigreturn r3/r4 clobber, reached through a different register. Demonstrated under qemu-system-microblazeel (machine petalogix-s3adsp1800): a handler that sets MSR_C in uc_mcontext.regs.msr has no effect before this change (0 of 132 in-window signals propagated) and takes effect after (130 of 132).

Save MSR in setup_sigcontext() so the handler's ucontext exposes it. The signal frame is user-writable, so restore_sigcontext() must not restore it verbatim: MicroBlaze packs the user-writable carry (MSR_C, MSR_CC) and the privileged control bits (MSR_UM, MSR_VM, MSR_IE, MSR_EE, ...) into the one register, and a verbatim restore would let userspace alter privileged return state -- rtbd derives the resumed mode from MSR_UMS/MSR_VMS. Restore only MSR_C | MSR_CC from the frame and keep the rest from the current regs->msr. This mirrors x86's restore_sigcontext(), which masks the restored EFLAGS to FIX_EFLAGS for the same reason; arches whose status register is purely privileged (e.g. riscv sstatus) simply do not restore it at all.

Comment on the exposed MSR reworded: it is not read-only, restore_sigcontext() applies MSR_C|MSR_CC from the frame. Author's Signed-off-by kept; he agreed to comment and changelog cleanups.

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
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139066.5Out of bounds read in Codecs in Google Chrome prior to 150.0.7871.47 allowed a remote attacker to obtain potentially sensitive information fCVE-2026-139060In the Linux kernel, the following vulnerability has been resolved: microblaze: don't clobber r3/r4 restored by rt_sigreturn ret_from_trapCVE-2026-139061In the Linux kernel, the following vulnerability has been resolved: udf: validate the device specification EA before using it udf_get_exteCVE-2026-139062In the Linux kernel, the following vulnerability has been resolved: soc: qcom: geni-se: Fix write to read-only firmware buffer geni_find_pCVE-2026-139063In the Linux kernel, the following vulnerability has been resolved: remoteproc: elf_loader: Bound the section header table The rproc_elf_sCVE-2026-139064In the Linux kernel, the following vulnerability has been resolved: ipc/mqueue: release notification resources during inode eviction mqueuCVE-2026-1390657.8In the Linux kernel, the following vulnerability has been resolved: udf: Make sure there's enough space for LVID implementation use field CVE-2026-139066In the Linux kernel, the following vulnerability has been resolved: media: imx-jpeg: finish the job on device_run() error paths mxc_jpeg_dCVE-2026-139067In the Linux kernel, the following vulnerability has been resolved: media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled CVE-2026-139068In the Linux kernel, the following vulnerability has been resolved: media: meson-ir-tx: Ensure rc_free_device() is called on unbind Make rCVE-2026-139069In the Linux kernel, the following vulnerability has been resolved: media: sunxi-cir: Ensure no more interrupts can occur before free OnlyCVE-2026-139074.2Inappropriate implementation in iOSWeb in Google Chrome on iOS prior to 150.0.7871.47 allowed a remote attacker who convinced a user to enga
CVE-2026-139059: Unscored | Vulnix