CVE & CISA-KEV Catalog

CVE-2024-35873

MEDIUM
5.5
CVSS v3
NVD

Description

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.

How to fix

Remediation Available
linuxDebian
Fixed in:6.8.9-1CVE-2024-35873
Fixed in:6.8.9-1CVE-2024-35873
linuxUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-awsUbuntu
Fixed in:6.8.0-1011.12USN-6893-3
linux-azureUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-gcpUbuntu
Fixed in:6.8.0-1010.11USN-6893-1
linux-gkeUbuntu
Fixed in:6.8.0-1006.9USN-6893-2
linux-ibmUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-6.8.0-1006-gkeUbuntu
Fixed in:6.8.0-1006.9USN-6893-2
linux-image-6.8.0-1007-intelUbuntu
Fixed in:6.8.0-1007.14USN-6893-1
linux-image-6.8.0-1007-raspiUbuntu
Fixed in:6.8.0-1007.7USN-6893-1
linux-image-6.8.0-1008-ibmUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-6.8.0-1008-oemUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-6.8.0-1008-oracleUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-6.8.0-1008-oracle-64kUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-6.8.0-1009-nvidiaUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-6.8.0-1009-nvidia-64kUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-6.8.0-1010-azureUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-6.8.0-1010-azure-fdeUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-6.8.0-1010-gcpUbuntu
Fixed in:6.8.0-1010.11USN-6893-1
linux-image-6.8.0-1011-awsUbuntu
Fixed in:6.8.0-1011.12USN-6893-3
linux-image-6.8.0-38-genericUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-6.8.0-38-generic-64kUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-6.8.0-38-lowlatencyUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-6.8.0-38-lowlatency-64kUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-awsUbuntu
Fixed in:6.8.0-1011.12USN-6893-3
linux-image-azureUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-azure-fdeUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-gcpUbuntu
Fixed in:6.8.0-1010.11USN-6893-1
linux-image-genericUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-64kUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-lpaeUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-gkeUbuntu
Fixed in:6.8.0-1006.9USN-6893-2
linux-image-ibmUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-ibm-classicUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-ibm-lts-24.04Ubuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-intelUbuntu
Fixed in:6.8.0-1007.14USN-6893-1
linux-image-kvmUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-lowlatencyUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-lowlatency-64kUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-nvidiaUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-nvidia-64kUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-oem-24.04Ubuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-oem-24.04aUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-oracleUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-oracle-64kUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-raspiUbuntu
Fixed in:6.8.0-1007.7USN-6893-1
linux-image-virtualUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-intelUbuntu
Fixed in:6.8.0-1007.14USN-6893-1
linux-lowlatencyUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-nvidiaUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-oem-6.8Ubuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-oracleUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-raspiUbuntu
Fixed in:6.8.0-1007.7USN-6893-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

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

Exploit Intelligence

0.20%probability of exploitation in 30 days
10thpercentile

Low risk: more likely to be exploited than 10% of all known CVEs.

References

Embed a live status badge for CVE-2024-35873
CVE-2024-35873 severity badge

Markdown

[![CVE-2024-35873](https://tridentstack.com/cve/badge/CVE-2024-35873.svg)](https://tridentstack.com/cve/CVE-2024-35873)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-35873"><img src="https://tridentstack.com/cve/badge/CVE-2024-35873.svg" alt="CVE-2024-35873"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-09-24.