Live › vulnerability › CVE-2026-99018
Go to dashboardOn RISC-V kernels built with shadow call stack, a user task can set its tp register to match its task_struct address so the kernel skips reloading the shadow call stack pointer. The kernel then runs with an attacker-controlled gp, giving an unprivileged arbitrary kernel write and control-flow hijack.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-23 21:57 UTC. All times on this page are UTC.
Systems running a RISC-V Linux kernel built with CONFIG_SHADOW_CALL_STACK, where any local unprivileged user can run code. The sources do not say which kernel versions are affected or whether the default config enables shadow call stack, so the exact exposure is unknown.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| linux-kernel | linux | RISC-V builds with CONFIG_SHADOW_CALL_STACK, from commit d1584d791a29 until 4d0697f19297; release versions unknown | commit 4d0697f19297 |
=y means exposedriscv: entry: gate shadow call stack reload on sstatus.SPP, not tp)Each row is the first time that source carried this signal. The analyst’s rows are its own findings.
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 (¤t) 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.
This page as .md · .json · in your agent: get_signal("CVE-2026-99018")
NVD data is provided by NIST and is public domain · EPSS scores by FIRST, used with attribution. Posts quoted belong to their authors.