CVE-2026-64082

riscv: Fix register corruption from uninitialized cregs on error

Published Jul 19, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

riscv: Fix register corruption from uninitialized cregs on error

compat_riscv_gpr_set() calls cregs_to_regs() unconditionally, even when
user_regset_copyin() fails. Since cregs is an uninitialized stack
variable, a copyin failure causes uninitialized stack data to be written
into the target task's pt_regs, corrupting its register state and
potentially leaking kernel stack contents.

compat_restore_sigcontext() has the same issue: it calls cregs_to_regs()
even when __copy_from_user() fails, leading to the same corruption of
the signal-returning task's register state on error.

Only call cregs_to_regs() when the user copy succeeds.

Analysis

AI-generated

Technical impact

The vulnerability arises in the Linux kernel for RISC‑V when the compat_riscv_gpr_set and compat_restore_sigcontext functions call cregs_to_regs unconditionally, even if the preceding copy from user space fails. Because cregs is an uninitialized stack variable, a failure writes stale or garbage data into a task's pt_regs register state. This corrupts the target process's registers and may leak portions of the kernel stack, exposing sensitive information or destabilizing a process. This issue represents CWE‑824: Use of Uninitialized Variable and CWE‑908.

Affected Systems

All Linux kernels that include RISC‑V support and have not yet received the patch are vulnerable. This applies to all distributions that ship the affected kernel revision, regardless of vendor or distribution version, until a patched kernel is deployed.

Risk and Exploitability

The CVSS score of 7.8 classifies the issue as high severity, while the EPSS score of less than 1% indicates a low probability of widespread exploitation at this time. The flaw is not listed in the CISA KEV catalog, and no public exploits are known. Exploitation would likely require local execution or the ability to trigger the compatibility interfaces that invoke the faulty copy operations, which normally suggests a local user threat. In the absence of confirmed exploitation, the immediate risk remains moderate, but the potential for confidential data leakage or process instability persists if the flaw is leveraged. The vulnerability is identified as CWE‑824: Use of Uninitialized Variable and CWE‑908.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that addresses the uninitialized variable usage (CWE‑824) and includes the RISC‑V register corruption fix;
  • If upgrading immediately is not possible, disable or unload the RISC‑V compatibility modules to prevent the vulnerable code paths from executing;
  • Limit local user privileges so that only trusted processes can invoke the compatibility interfaces that rely on cregs_to_regs, thereby mitigating the potential impact of the CWE‑824 flaw.

Generated by OpenCVE AI on September 3, 2026 at 22:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4777-1 linux security update
Debian DLA Debian DLA DLA-4817-1 linux-6.12 security update
Debian DSA Debian DSA DSA-6528-1 linux security update
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8781-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-9022-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9023-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9024-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9026-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9039-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-9040-1 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9183-1 Linux kernel (FIPS) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-908
CPEs cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Linux kernel
Vendors & Products Linux kernel
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: riscv: Fix register corruption from uninitialized cregs on error compat_riscv_gpr_set() calls cregs_to_regs() unconditionally, even when user_regset_copyin() fails. Since cregs is an uninitialized stack variable, a copyin failure causes uninitialized stack data to be written into the target task's pt_regs, corrupting its register state and potentially leaking kernel stack contents. compat_restore_sigcontext() has the same issue: it calls cregs_to_regs() even when __copy_from_user() fails, leading to the same corruption of the signal-returning task's register state on error. Only call cregs_to_regs() when the user copy succeeds.
Title riscv: Fix register corruption from uninitialized cregs on error
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-824

    Access of Uninitialized Pointer

  • CWE-908

    Use of Uninitialized Resource

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Sep 2, 2026, 12:49 PM
Reserved
Jul 19, 2026, 7:54 AM
Status
Analyzed
Published
Jul 19, 2026, 4:17 PM
Modified
Sep 3, 2026, 8:03 PM
Severity
Public date
Jul 19, 2026, 12:00 AM