IT SBIT Services
Schneeberger
DEEN
CVE tracker

Linux Kernel: Local privilege escalation in RISC-V exception entry

CVE-2026-99018High 7.8

← All vulnerabilities

Summary

On RISC-V systems, the kernel decides whether to reload the shadow call stack pointer based on the user-writable tp register instead of the hardware privilege bit sstatus.SPP. A local user with a low-privilege account can set tp to a crafted value so that the kernel keeps a user-controlled gp, which can lead to arbitrary kernel writes and control-flow hijacking. The issue only affects RISC-V kernels built with CONFIG_SHADOW_CALL_STACK and requires local access; it cannot be exploited directly over the network.

Affected

  • Linux kernel from 6.7.0 to before 6.12.113 (RISC-V with CONFIG_SHADOW_CALL_STACK)
  • Linux kernel from 6.13.0 to before 6.18.57 (RISC-V with CONFIG_SHADOW_CALL_STACK)
  • Linux kernel from 6.19.0 to before 7.2.11 (RISC-V with CONFIG_SHADOW_CALL_STACK)
  • Other architectures are not affected.

Fixed in

  • Linux kernel 6.12.113, 6.18.57 and 7.2.11 and later stable releases, per OSV
  • Distribution kernel fixes: Unknown.

Workaround

Unknown. No workaround is documented in the sources. Rebuilding the kernel without CONFIG_SHADOW_CALL_STACK would remove the affected code path, but this is untested and changes the kernel build.

Exploitation

  • No evidence of exploitation in the wild found; not listed in CISA KEV.
  • No public proof of concept found; the search was limited.
  • EPSS score 0.00175 (very low).

Our recommendation

  • Check whether any system runs a RISC-V kernel with shadow call stack support.
  • If so, install the distribution kernel update that includes the stable fixes as soon as it is available.
  • Limit local accounts on affected systems, especially on shared hosts, CI runners and edge devices.
  • For all other architectures, no action beyond normal kernel patching is needed.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 22:28.

Original description (NVD)

In the Linux kernel, the following vulnerability has been resolved: riscv: entry: gate shadow call stack reload on sstatus.SPP, not tp Under CONFIG_SHADOW_CALL_STACK, handle_exception() reloads the kernel shadow call stack pointer (gp) only when the trap came from userspace. It made that decision with scs_load_current_if_task_changed, which compares the trap-time tp (read back from sscratch into s5) against the current tp: beq \prev, tp, _skip_scs scs_load_current _skip_scs: tp is a user-writable register. A user task that sets tp to the linear-map address of its own task_struct (&current) before trapping makes the comparison succeed (can achieve by brute force with KASLR enable under our test), so the kernel skips scs_load_current and keeps running with the gp that userspace left in place. Under CONFIG_SHADOW_CALL_STACK gp is the shadow call stack pointer and load_global_pointer is a no-op, so the compiler-emitted "sd ra, -8(gp)" / "ld ra, -8(gp)" in every non-leaf function then write to, and return through, an attacker-controlled address -- an unprivileged kernel arbitrary-write and control-flow-hijack primitive. The poisoned gp is saved to task_struct.scs_sp on return, so the reload is skipped on every subsequent entry as well. Decide "came from userspace" from the hardware sstatus.SPP bit (already in s1 at this point) instead of from tp, mirroring the check that ret_from_exception already uses a few instructions later. SPP is written by hardware on trap entry and cannot be forged from U-mode. Legitimate behaviour is unchanged: user entries (SPP=0) reload the task shadow call stack, nested kernel entries (SPP=1) skip it.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.