Skip to content
Heist/ feed
Back to feed
HighFix available

riscv: Fix register corruption from uninitialized cregs on error

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.187, 6.12.108, 6.18.49, 6.6.156, 7.0.11
CVEs
CVE-2026-64082
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 06:52 UTC · Revision 1

Source evidence

riscv: Fix register corruption from uninitialized cregs on error

core-osv · Original source

Published 19 Jul 2026, 15:39 UTC

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.

osv:CVE-2026-64082

Kernel

Fixed versions: 6.1.187, 6.6.156, 6.12.108, 6.18.49, 7.0.11

Complete source record
{
  "id": "4ef24d31718f39a65e5951fbf44a39fc9524b33f87535fb2d5f5d9c0b0e70c8a",
  "url": "https://osv.dev/vulnerability/CVE-2026-64082",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "riscv: Fix register corruption from uninitialized cregs on error",
    "summary": "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.",
    "evidence": "osv:CVE-2026-64082",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.187",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.156",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.108",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.49",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.0.11",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-64082",
      "aliases": [
        "CVE-2026-64082"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "7383ee05314be58f8f9f018ee0ac53bef3808aea"
                },
                {
                  "fixed": "f2d88b0d7aebfa4643fc58bbae57210c6daff9c6"
                },
                {
                  "fixed": "66dedb6028c3df6c6a3372dd935b823917e150d5"
                },
                {
                  "fixed": "2a7d1daf2674fe7d5b1cc99a4e3b5f0f72d5958f"
                },
                {
                  "fixed": "0599aa23734c48de9bce36d043a9ec90c23945a1"
                },
                {
                  "fixed": "9e020156833f1ad0d425a1e3d85b65639f1c1c50"
                },
                {
                  "fixed": "6ebcbb53fc9bc30843054ed99fd60b8e542628f4"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64082.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.19.0"
                },
                {
                  "fixed": "6.1.187"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.156"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.108"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.49"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.0.11"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64082.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:26.883981268Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/0599aa23734c48de9bce36d043a9ec90c23945a1",
        "https://git.kernel.org/stable/c/2a7d1daf2674fe7d5b1cc99a4e3b5f0f72d5958f",
        "https://git.kernel.org/stable/c/66dedb6028c3df6c6a3372dd935b823917e150d5",
        "https://git.kernel.org/stable/c/6ebcbb53fc9bc30843054ed99fd60b8e542628f4",
        "https://git.kernel.org/stable/c/9e020156833f1ad0d425a1e3d85b65639f1c1c50",
        "https://git.kernel.org/stable/c/f2d88b0d7aebfa4643fc58bbae57210c6daff9c6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64082.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-64082",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64082.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-64082",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 493143,
  "published_at": "2026-07-19T15:39:54.074+00:00"
}