Skip to main content
Menu
CVEs

Linux kernel wrong results from lost carry flag in MicroBlaze

CVE-2026-139059Published November 30, 2026, updated

Exploited
No known exploitation
Fix
No fix listed
Who is exposed
Not reported

Summary

The Linux kernel's MicroBlaze signal handling drops the MSR carry flag during signal delivery, so interrupted code can resume with a carry value left by the kernel's syscall entry path instead of its own. This can cause code that relies on a live carry, such as atomic compare-and-swap retry loops, to produce wrong results.

Written by a model

Original 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.

What to do

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-139059 (microblaze: preserve the MSR carry flags across signals), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-139059 (entry last updated 2026-11-30):
Affected:
- Linux Linux: version range not reported
- Linux Linux: versions 2.6.30
Fixed versions: none listed yet.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-139059 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-139059 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/99c46dfc82544c0adb2ea7d30c6b39e53880aa2b
- https://git.kernel.org/stable/c/ea2ec2c505099d3a0f3ee8a1d282fe44e211f4c4
- https://git.kernel.org/stable/c/91d2e032ad06f5606c281aada7ff2f1c104f3dff
- https://git.kernel.org/stable/c/54b66ea6322045d049d2f621dd1fd6ab98b1ae63
- https://git.kernel.org/stable/c/d73722aafce9ac78731f96e2d7865f126797b5eb
- https://git.kernel.org/stable/c/1f8722a7053ffe11eff0ee402b7c5150dc808089
- https://git.kernel.org/stable/c/560fb159ad7bb7765686da8d10d568f9f7270e88
- https://git.kernel.org/stable/c/ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-139059
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-139059"}.

Affected versions

cve.now Index

25Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure?/25Unknown. No advisory context yet
  • Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
  • Severity?/10Unknown. No CVSS score or vendor rating
  • No patch5/5No patch listed yet

What would change the score

  • Would score about 80 if added to CISA KEV
  • Would score about 75 if CISA's SSVC rates exploitation active
  • Would score about 47 if advisories confirm default setups are exposed

Timeline

  1. CVE published
  2. First seen by cve.now

Evidence 10

Questions about CVE-2026-139059

Is CVE-2026-139059 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

Which versions are affected by CVE-2026-139059?

Linux: version 2.6.30.

Source: cve.now feed data

No corrections so far. Something wrong on this page? Report an error.