{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-64082",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-64082"
  ],
  "published": "2026-07-19T15:41:06Z",
  "summary": "riscv: Fix register corruption from uninitialized cregs on error",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: Fix register corruption from uninitialized cregs on error\n\ncompat_riscv_gpr_set() calls cregs_to_regs() unconditionally, even when\nuser_regset_copyin() fails. Since cregs is an uninitialized stack\nvariable, a copyin failure causes uninitialized stack data to be written\ninto the target task's pt_regs, corrupting its register state and\npotentially leaking kernel stack contents.\n\ncompat_restore_sigcontext() has the same issue: it calls cregs_to_regs()\neven when __copy_from_user() fails, leading to the same corruption of\nthe signal-returning task's register state on error.\n\nOnly call cregs_to_regs() when the user copy succeeds.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.187",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-64082"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f2d88b0d7aebfa4643fc58bbae57210c6daff9c6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/66dedb6028c3df6c6a3372dd935b823917e150d5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2a7d1daf2674fe7d5b1cc99a4e3b5f0f72d5958f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0599aa23734c48de9bce36d043a9ec90c23945a1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9e020156833f1ad0d425a1e3d85b65639f1c1c50"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6ebcbb53fc9bc30843054ed99fd60b8e542628f4"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-09-02T13:01:47Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The bug is only reachable through local kernel interfaces\u2014compat_rt_sigreturn and ptrace(PTRACE_SETREGSET)\u2014with no network, adjacent-radio, or physical-device code path involved.\nAC:L - An attacker can reliably force the user copy to fail by racing munmap/mprotect against sigreturn or ptrace SETREGSET after access_ok, controlling both sides of the TOCTOU window.\nPR:L - The lowest-privilege path is compat_rt_sigreturn, callable by any unprivileged 32-bit compat process on a CONFIG_COMPAT RISC-V system without capabilities or root.\nUI:N - Exploitation requires no victim interaction; a local attacker corrupts their own task\u2019s registers via rt_sigreturn or a tracee they already control as parent/tracer.\nS:U - Impact is confined to kernel register-state corruption and information disclosure within the same OS security boundary, not a VM escape or cross-authority sandbox breakout.\nC:H - On copy failure, uninitialized kernel stack data (up to the full compat_user_regs_struct) is written into pt_regs, leaking kernel memory contents into user-observable registers.\nI:H - The corruption overwrites all general-purpose registers in pt_regs\u2014including program counter, stack pointer, and return address\u2014constituting memory corruption exploitable for control-flow hijacking.\nA:H - Corrupted pt_regs reliably cause faults, SIGSEGV delivery, or erratic kernel/user execution, and the condition is repeatable for persistent denial of service."
    }
  }
}
