CVE-2026-139775: microblaze: prevent ptrace writes to MSR and pt_mode
In the Linux kernel, the following vulnerability has been resolved:
microblaze: prevent ptrace writes to MSR and ptmode
archptrace() accepts PTRACEPOKEUSR for every aligned offset below PTSIZE. This includes the saved machine status register and ptmode, which are kernel-owned execution state rather than general registers.
On return from an exception, rtbd copies MSRUMS to the live MSRUM bit. An unprivileged same-UID tracer can therefore clear MSRUMS in its tracee's saved register frame and make the tracee resume in supervisor mode. ptmode also controls whether later entry paths classify the frame as kernel or user state.
Reject PTRACEPOKEUSR writes to both fields while retaining read access.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
For MicroBlaze, reject PTRACE_POKEUSR writes to both MSR and pt_mode while retaining read access.
Event History
Frequently Asked Questions
Who can exploit this issue?
An unprivileged tracer that is permitted to ptrace a same-UID process can exploit it. The issue is specific to the MicroBlaze architecture's ptrace register-write handling.
What access does an attacker need?
The attacker needs ptrace access to a target tracee and must be able to issue PTRACE_POKEUSR requests. The vulnerable behavior allows writes to saved MSR and pt_mode fields in the tracee's saved register frame.
What is the impact of a successful exploit?
A tracer can clear the saved MSR_UMS bit so that the tracee resumes in supervisor mode after returning from an exception. Altering pt_mode can also cause later entry paths to classify the saved frame as kernel rather than user state.
What does the fix change?
The fix rejects PTRACE_POKEUSR writes to the MSR and pt_mode fields. Read access to those fields remains available.