CVE-2025-71203: riscv: Sanitize syscall table indexing under speculation
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
riscv: Sanitize syscall table indexing under speculation
The syscall number is a user-controlled value used to index into the syscall table. Use array_index_nospec() to clamp this value after the bounds check to prevent speculative out-of-bounds access and subsequent data leakage via cache side channels.
The Linux kernel CVE team has assigned CVE-2025-71203 to this issue.
Affected and fixed versions
===========================
Fixed in 6.12.70 with commit c45848936ebdb4fcab92f8c39510db83c16d0239 Fixed in 6.18.10 with commit 8b44e753795107a22ba31495686e83f4aca48f36 Fixed in 6.19 with commit 25fd7ee7bf58ac3ec7be3c9f82ceff153451946c
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-71203
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
arch/riscv/kernel/traps.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/c45848936ebdb4fcab92f8c39510db83c16d0239 https://git.kernel.org/stable/c/8b44e753795107a22ba31495686e83f4aca48f36 https://git.kernel.org/stable/c/25fd7ee7bf58ac3ec7be3c9f82ceff153451946c