In the Linux kernel, the following vulnerability has been resolved:
riscv: Fix vector state restore in rt_sigreturn()
The RISC-V Vector specification states in "Appendix D: Calling Convention for Vector State" [1] that "Executing a system call causes all caller-saved vector registers (v0-v31, vl, vtype) and vstart to become unspecified.". In the RISC-V kernel this is called "discarding the vstate".
Returning from a signal handler via the rt_sigreturn() syscall, vector discard is also performed. However, this is not an issue since the vector state should be restored from the sigcontext, and therefore not care about the vector discard.
The "live state" is the actual vector register in the running context, and the "vstate" is the vector state of the task. A dirty live state, means that the vstate and live state are not in synch.
When vectorized user_from_copy() was introduced, an bug sneaked in at the restoration code, related to the discard of the live state.
An example when this go wrong:
1. A userland application is executing vector code 2. The application receives a signal, and the signal handler is entered. 3. The application returns from the signal handler, using the rt_sigreturn() syscall. 4. The live vector state is discarded upon entering the rt_sigreturn(), and the live state is marked as "dirty", indicating that the live state need to be synchronized with the current vstate. 5. rt_sigreturn() restores the vstate, except the Vector registers, from the sigcontext 6. rt_sigreturn() restores the Vector registers, from the sigcontext, and now the vectorized user_from_copy() is used. The dirty live state from the discard is saved to the vstate, making the vstate corrupt. 7. rt_sigreturn() returns to the application, which crashes due to corrupted vstate.
Note that the vectorized user_from_copy() is invoked depending on the value of CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD. Default is 768, which means that vlen has to be larger than 128b for this bug to trigger.
The fix is simply to mark the live state as non-dirty/clean prior performing the vstate restore.
CVSS Details
- CVSS 3.1 Base Score: 5.5
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Debian | — | Upgrade linux | Jul 27, 2026 | Jul 27, 2026 |
| Ubuntu | — | Upgrade linux-image-6.8.0-1006-gkeUpgrade linux-image-6.8.0-1007-intelUpgrade linux-image-6.8.0-1007-raspiUpgrade linux-image-6.8.0-1008-ibmUpgrade linux-image-6.8.0-1008-oemUpgrade linux-image-6.8.0-1008-oracleUpgrade linux-image-6.8.0-1008-oracle-64kUpgrade linux-image-6.8.0-1009-nvidiaUpgrade linux-image-6.8.0-1009-nvidia-64kUpgrade linux-image-6.8.0-1010-azureUpgrade linux-image-6.8.0-1010-azure-fdeUpgrade linux-image-6.8.0-1010-gcpUpgrade linux-image-6.8.0-1011-awsUpgrade linux-image-6.8.0-38-genericUpgrade linux-image-6.8.0-38-generic-64kUpgrade linux-image-6.8.0-38-lowlatencyUpgrade linux-image-6.8.0-38-lowlatency-64kUpgrade linux-image-awsUpgrade linux-image-azureUpgrade linux-image-azure-fdeUpgrade linux-image-gcpUpgrade linux-image-genericUpgrade linux-image-generic-64kUpgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-generic-hwe-24.04Upgrade linux-image-generic-lpaeUpgrade linux-image-gkeUpgrade linux-image-ibmUpgrade linux-image-ibm-classicUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-intelUpgrade linux-image-kvmUpgrade linux-image-lowlatencyUpgrade linux-image-lowlatency-64kUpgrade linux-image-nvidiaUpgrade linux-image-nvidia-64kUpgrade linux-image-oem-24.04Upgrade linux-image-oem-24.04aUpgrade linux-image-oracleUpgrade linux-image-oracle-64kUpgrade linux-image-raspiUpgrade linux-image-virtualUpgrade linux-image-virtual-hwe-24.04 | Jul 12, 2024 | May 19, 2024 |
Prioritize with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub