{"id":"CVE-2026-99017","state":"PUBLISHED","title":"riscv: errata: select RISCV_ALTERNATIVE_EARLY for THEAD GHOSTWRITE","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: errata: select RISCV_ALTERNATIVE_EARLY for THEAD GHOSTWRITE\n\nerrata_probe_ghostwrite() only marks the CPU as vulnerable when it is\ncalled at the RISCV_ALTERNATIVES_EARLY_BOOT stage, and the mitigation\nin ghostwrite_enable_mitigation() only takes effect if the vulnerable\nstate was recorded before the boot alternatives are patched.\n\nThe early boot stage is only executed when CONFIG_RISCV_ALTERNATIVE_EARLY\nis enabled, which currently is only selected by ERRATA_THEAD_MAE. In a\nkernel built with ERRATA_THEAD_GHOSTWRITE=y but ERRATA_THEAD_MAE=n, the\nearly alternatives never run, so ghostwrite_state is never set to\nVULNERABLE: ghostwrite_enable_mitigation() returns false, xtheadvector\nremains enabled, and sysfs reports \"Not affected\" on a vulnerable\nT-Head C9xx CPU.\n\nSelect RISCV_ALTERNATIVE_EARLY from ERRATA_THEAD_GHOSTWRITE so that the\nvulnerability is detected in the early boot stage and the default\nmitigation is applied.","publishedAt":"2026-10-23T12:20:53.518Z","updatedAt":"2026-10-24T14:10:04.808Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4bf97069239bcfca9840936313c7ac35a6e04488","status":"affected","lessThan":"fa465a7819ecbe5801b78c088d3cadaf2664b8ca","versionType":"git"},{"version":"4bf97069239bcfca9840936313c7ac35a6e04488","status":"affected","lessThan":"7fee577a2fa78b9a76da015beec1ccf978746ebb","versionType":"git"},{"version":"4bf97069239bcfca9840936313c7ac35a6e04488","status":"affected","lessThan":"298510bbc7c3017c0faf481c6ea66f1065b657b4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig.errata"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.11","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig.errata"]}],"references":["https://git.kernel.org/stable/c/fa465a7819ecbe5801b78c088d3cadaf2664b8ca","https://git.kernel.org/stable/c/7fee577a2fa78b9a76da015beec1ccf978746ebb","https://git.kernel.org/stable/c/298510bbc7c3017c0faf481c6ea66f1065b657b4"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99017.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99017","state":"PUBLISHED","datePublished":"2026-10-23T12:20:53.518Z","dateUpdated":"2026-10-24T14:10:04.808Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.386Z"},"containers":{"cna":{"title":"riscv: errata: select RISCV_ALTERNATIVE_EARLY for THEAD GHOSTWRITE","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: errata: select RISCV_ALTERNATIVE_EARLY for THEAD GHOSTWRITE\n\nerrata_probe_ghostwrite() only marks the CPU as vulnerable when it is\ncalled at the RISCV_ALTERNATIVES_EARLY_BOOT stage, and the mitigation\nin ghostwrite_enable_mitigation() only takes effect if the vulnerable\nstate was recorded before the boot alternatives are patched.\n\nThe early boot stage is only executed when CONFIG_RISCV_ALTERNATIVE_EARLY\nis enabled, which currently is only selected by ERRATA_THEAD_MAE. In a\nkernel built with ERRATA_THEAD_GHOSTWRITE=y but ERRATA_THEAD_MAE=n, the\nearly alternatives never run, so ghostwrite_state is never set to\nVULNERABLE: ghostwrite_enable_mitigation() returns false, xtheadvector\nremains enabled, and sysfs reports \"Not affected\" on a vulnerable\nT-Head C9xx CPU.\n\nSelect RISCV_ALTERNATIVE_EARLY from ERRATA_THEAD_GHOSTWRITE so that the\nvulnerability is detected in the early boot stage and the default\nmitigation is applied."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4bf97069239bcfca9840936313c7ac35a6e04488","status":"affected","lessThan":"fa465a7819ecbe5801b78c088d3cadaf2664b8ca","versionType":"git"},{"version":"4bf97069239bcfca9840936313c7ac35a6e04488","status":"affected","lessThan":"7fee577a2fa78b9a76da015beec1ccf978746ebb","versionType":"git"},{"version":"4bf97069239bcfca9840936313c7ac35a6e04488","status":"affected","lessThan":"298510bbc7c3017c0faf481c6ea66f1065b657b4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig.errata"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.11","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig.errata"]}],"references":[{"url":"https://git.kernel.org/stable/c/fa465a7819ecbe5801b78c088d3cadaf2664b8ca"},{"url":"https://git.kernel.org/stable/c/7fee577a2fa78b9a76da015beec1ccf978746ebb"},{"url":"https://git.kernel.org/stable/c/298510bbc7c3017c0faf481c6ea66f1065b657b4"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - A local process executes the GhostWrite vector sequence; its first vector instruction follows handle_exception() through do_trap_insn_illegal() to riscv_v_first_use_handler(), after which the faulty store executes in U-mode. No network protocol carries the causal input.\nAC:H - Exposure requires a vulnerable T-Head C9xx with xtheadvector and the unusual build combination ERRATA_THEAD_GHOSTWRITE=y plus ERRATA_THEAD_MAE=n; both errata options default to y, and an attacker cannot create this kernel configuration.\nPR:L - riscv_v_first_use_handler() and riscv_v_vstate_ctrl_set_current() contain no capability check, so an ordinary local user can enable vector state and execute the sequence; no administrative privilege or user namespace is required.\nUI:N - The attacking process itself enables or first-uses vector state and executes the faulty store; no victim must mount media, open a file, or perform another action.\nS:U - The missed disable_xtheadvector() call lets a user process escalate into the kernel on the same host; this is a local user-to-kernel privilege escalation under the host's existing security authority.\nC:H - Leaving xtheadvector enabled exposes GhostWrite's arbitrary physical-write primitive; overwriting a PTE's page-frame number creates an arbitrary physical-read mapping covering kernel and other-process memory.\nI:H - Because ghostwrite_enable_mitigation() returns false without the early VULNERABLE state, faulty high-order vector stores remain usable for attacker-chosen byte writes to physical memory, including PTEs and kernel or machine-mode code.\nA:H - The same unrestricted physical writes can corrupt kernel text, page tables, or device MMIO, causing an unrecoverable kernel crash or system hang."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-24T14:10:04.808Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"6.18.57"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.2.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}