KernelScan.io

HIGH Introduced in 6.14

riscv Ghostwrite MitigationBypass

CVE-2026-99017

CVSS 7.0 / 10.0 NVD

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: riscv: errata: select RISCV_ALTERNATIVE_EARLY for THEAD GHOSTWRITE errata_probe_ghostwrite() only marks the CPU as vulnerable when it is called at the RISCV_ALTERNATIVES_EARLY_BOOT stage, and the mitigation in ghostwrite_enable_mitigation() only takes effect if the vulnerable state was recorded before the boot alternatives are patched. The early boot stage is only executed when CONFIG_RISCV_ALTERNATIVE_EARLY is enabled, which currently is only selected by ERRATA_THEAD_MAE. In a kernel built with ERRATA_THEAD_GHOSTWRITE=y but ERRATA_THEAD_MAE=n, the early alternatives never run, so ghostwrite_state is never set to VULNERABLE: ghostwrite_enable_mitigation() returns false, xtheadvector remains enabled, and sysfs reports "Not affected" on a vulnerable T-Head C9xx CPU. Select RISCV_ALTERNATIVE_EARLY from ERRATA_THEAD_GHOSTWRITE so that the vulnerability is detected in the early boot stage and the default mitigation is applied.

02

Engine v0.9.0

Risk summary

On T-Head C9xx RISC-V CPUs with the xtheadvector extension, a kernel configuration bug prevents the Ghostwrite speculative-execution mitigation from being activated when ERRATA_THEAD_GHOSTWRITE is enabled but ERRATA_THEAD_MAE is disabled. This leaves the hardware vulnerability unmitigated, allowing any local user to potentially leak sensitive data or escalate privileges via the Ghostwrite CPU bug.

Affectedarch/riscv/Kconfig.errata (riscv errata)

Vulnerability analysis

The Ghostwrite mitigation for T-Head C9xx CPUs relies on the early boot alternatives framework to detect the vulnerable CPU and disable the xtheadvector extension before regular kernel code runs. However, the early alternatives stage is only compiled in when CONFIG_RISCV_ALTERNATIVE_EARLY is selected, which previously happened only for the ERRATA_THEAD_MAE erratum. If a kernel was built with ERRATA_THEAD_GHOSTWRITE=y but ERRATA_THEAD_MAE=n, the detection code never executed, the mitigation was not applied, and the system incorrectly reported itself as not affected. The fix adds a Kconfig 'select' so that enabling the Ghostwrite errata automatically pulls in the early alternatives framework, ensuring the vulnerability is detected and mitigated on every boot. Any local user on affected hardware running a misconfigured kernel can exploit the underlying Ghostwrite hardware vulnerability.

03

BranchIntroducedFixed inPatch commit
6.186.146.18.57fa465a7819ec
7.26.147.2.117fee577a2fa7
mainline6.147.3298510bbc7c3