{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-52616",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-52616"
  ],
  "published": "2024-03-18T10:15:21Z",
  "summary": "crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init\n\nWhen the mpi_ec_ctx structure is initialized, some fields are not\ncleared, causing a crash when referencing the field when the\nstructure was released. Initially, this issue was ignored because\nmemory for mpi_ec_ctx is allocated with the __GFP_ZERO flag.\nFor example, this error will be triggered when calculating the\nZa value for SM2 separately.",
  "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.79",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-52616"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0c3687822259a7628c85cd21a3445cbe3c367165"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2bb86817b33c9d704e127f92b838035a72c315b6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/bb44477d4506e52785693a39f03cdc6a2c5e8598"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7ebf812b7019fd2d4d5a7ca45ef4bf3a6f4bda0a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7abdfd45a650c714d5ebab564bb1b988f14d9b49"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ba3c5574203034781ac4231acf117da917efcd2a"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - Triggered locally when an unprivileged process adds an SM2 X.509 cert via add_key/keyctl, which calls x509_get_sig_params \u2192 sm2_compute_z_digest \u2192 mpi_ec_init/deinit; no network-facing parser reaches this path.\nAC:L - The attacker solely controls the trigger by submitting an SM2 certificate; sm2_compute_z_digest allocates mpi_ec_ctx with kmalloc (non-zeroed), so garbage non-NULL d/two_inv_p values are freed reliably without depending on victim state.\nPR:L - Any unprivileged local user can add an asymmetric SM2 certificate to their own session/user keyring and exercise the vulnerable Za digest path; no CAP_SYS_ADMIN or init-namespace root is required.\nUI:N - Exploitation needs no victim action beyond the attacker\u2019s own add_key/keyctl syscall; certificate parsing and Za computation run entirely in-kernel on that request.\nS:U - Impact is confined to the host kernel\u2019s privilege boundary (crash or local privilege escalation); it does not cross VM, IOMMU, or other distinct security authorities.\nC:H - mpi_ec_deinit frees uninitialized d and two_inv_p pointers from a non-zeroed kmalloc object; with heap spraying of that cache this yields an arbitrary-free primitive that can expose kernel memory.\nI:H - The same attacker-shaped uninitialized free through mpi_free provides a classic arbitrary-free write/control-flow hijack primitive, enabling integrity compromise beyond a pure crash.\nA:H - Freeing or dereferencing garbage MPI pointers in mpi_ec_deinit causes a kernel oops/panic, producing a full denial of service."
    }
  }
}
