{"id":"CVE-2023-52616","state":"PUBLISHED","title":"crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init","description":"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.","publishedAt":"2024-03-18T10:14:46.066Z","updatedAt":"2026-08-05T09:10:44.363Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"0c3687822259a7628c85cd21a3445cbe3c367165","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"2bb86817b33c9d704e127f92b838035a72c315b6","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"bb44477d4506e52785693a39f03cdc6a2c5e8598","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"7ebf812b7019fd2d4d5a7ca45ef4bf3a6f4bda0a","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"7abdfd45a650c714d5ebab564bb1b988f14d9b49","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"ba3c5574203034781ac4231acf117da917efcd2a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/crypto/mpi/ec.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.10.210","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.149","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.79","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.15","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.3","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/crypto/mpi/ec.c"]}],"references":["https://git.kernel.org/stable/c/0c3687822259a7628c85cd21a3445cbe3c367165","https://git.kernel.org/stable/c/2bb86817b33c9d704e127f92b838035a72c315b6","https://git.kernel.org/stable/c/bb44477d4506e52785693a39f03cdc6a2c5e8598","https://git.kernel.org/stable/c/7ebf812b7019fd2d4d5a7ca45ef4bf3a6f4bda0a","https://git.kernel.org/stable/c/7abdfd45a650c714d5ebab564bb1b988f14d9b49","https://git.kernel.org/stable/c/ba3c5574203034781ac4231acf117da917efcd2a","https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52616.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52616","state":"PUBLISHED","datePublished":"2024-03-18T10:14:46.066Z","dateUpdated":"2026-08-05T09:10:44.363Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-06T09:52:12.089Z"},"containers":{"cna":{"title":"crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"0c3687822259a7628c85cd21a3445cbe3c367165","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"2bb86817b33c9d704e127f92b838035a72c315b6","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"bb44477d4506e52785693a39f03cdc6a2c5e8598","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"7ebf812b7019fd2d4d5a7ca45ef4bf3a6f4bda0a","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"7abdfd45a650c714d5ebab564bb1b988f14d9b49","versionType":"git"},{"version":"d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f","status":"affected","lessThan":"ba3c5574203034781ac4231acf117da917efcd2a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/crypto/mpi/ec.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.10.210","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.149","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.79","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.15","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.3","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/crypto/mpi/ec.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/0c3687822259a7628c85cd21a3445cbe3c367165"},{"url":"https://git.kernel.org/stable/c/2bb86817b33c9d704e127f92b838035a72c315b6"},{"url":"https://git.kernel.org/stable/c/bb44477d4506e52785693a39f03cdc6a2c5e8598"},{"url":"https://git.kernel.org/stable/c/7ebf812b7019fd2d4d5a7ca45ef4bf3a6f4bda0a"},{"url":"https://git.kernel.org/stable/c/7abdfd45a650c714d5ebab564bb1b988f14d9b49"},{"url":"https://git.kernel.org/stable/c/ba3c5574203034781ac4231acf117da917efcd2a"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Triggered locally when an unprivileged process adds an SM2 X.509 cert via add_key/keyctl, which calls x509_get_sig_params → sm2_compute_z_digest → 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’s 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’s 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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:10:44.363Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.10.210"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.15.149"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.1.79"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.6.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/0c3687822259a7628c85cd21a3445cbe3c367165","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2bb86817b33c9d704e127f92b838035a72c315b6","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/bb44477d4506e52785693a39f03cdc6a2c5e8598","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7ebf812b7019fd2d4d5a7ca45ef4bf3a6f4bda0a","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7abdfd45a650c714d5ebab564bb1b988f14d9b49","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ba3c5574203034781ac4231acf117da917efcd2a","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:03:21.368Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-52616","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:55:16.184973Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:19.775Z"}}]}}}