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.
Published: 2026-07-19
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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 the cregs structure 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.

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.

Generated by OpenCVE AI on July 30, 2026 at 20:41 UTC.

Remediation

No vendor fix or workaround currently provided.

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 July 30, 2026 at 20:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
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
History

Tue, 21 Jul 2026 11:30:00 +0000

Type Values Removed Values Added
First Time appeared Linux kernel
Vendors & Products Linux kernel

Tue, 21 Jul 2026 00:15:00 +0000


Mon, 20 Jul 2026 14:45:00 +0000

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'}


Sun, 19 Jul 2026 16:15:00 +0000

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

Subscriptions

Linux Kernel Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:39:01.862Z

Reserved: 2026-07-19T07:54:57.031Z

Link: CVE-2026-64082

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity :

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-64082 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T20:45:17Z

Weaknesses
  • CWE-824

    Access of Uninitialized Pointer