{"id":"CVE-2023-53817","state":"PUBLISHED","title":"crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()\n\nDuring NVMeTCP Authentication a controller can trigger a kernel\noops by specifying the 8192 bit Diffie Hellman group and passing\na correctly sized, but zeroed Diffie Hellamn value.\nmpi_cmp_ui() was detecting this if the second parameter was 0,\nbut 1 is passed from dh_is_pubkey_valid(). This causes the null\npointer u->d to be dereferenced towards the end of mpi_cmp_ui()","publishedAt":"2025-12-09T00:01:15.411Z","updatedAt":"2026-08-05T09:16:11.527Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"fde791e8a96a64ea7b0ad2440e43586447a209c6","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"ae63e84ffda74267bf7277c38415ba38389229a0","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"61f5453e9706e99713825594e0c8f9031485fb5f","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"0fc7147c694394f8a8cbc19570c6bc918cac0906","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"67589d247909043e94d2dd5fb590958e0f99d58d","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"d3ad023a39f1127dcfd331c562673355dc078650","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"12ac013ad7ff0df066451e825801d805095b3776","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"9e47a758b70167c9301d2b44d2569f86c7796f2d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/crypto/mpi/mpi-cmp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.7","versionType":"semver"},{"version":"4.14.326","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.295","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.257","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.197","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.133","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.55","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.5","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6","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/mpi-cmp.c"]}],"references":["https://git.kernel.org/stable/c/fde791e8a96a64ea7b0ad2440e43586447a209c6","https://git.kernel.org/stable/c/ae63e84ffda74267bf7277c38415ba38389229a0","https://git.kernel.org/stable/c/61f5453e9706e99713825594e0c8f9031485fb5f","https://git.kernel.org/stable/c/0fc7147c694394f8a8cbc19570c6bc918cac0906","https://git.kernel.org/stable/c/67589d247909043e94d2dd5fb590958e0f99d58d","https://git.kernel.org/stable/c/d3ad023a39f1127dcfd331c562673355dc078650","https://git.kernel.org/stable/c/12ac013ad7ff0df066451e825801d805095b3776","https://git.kernel.org/stable/c/9e47a758b70167c9301d2b44d2569f86c7796f2d"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/53xxx/CVE-2023-53817.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53817","state":"PUBLISHED","datePublished":"2025-12-09T00:01:15.411Z","dateUpdated":"2026-08-05T09:16:11.527Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-08T23:58:35.277Z"},"containers":{"cna":{"title":"crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()\n\nDuring NVMeTCP Authentication a controller can trigger a kernel\noops by specifying the 8192 bit Diffie Hellman group and passing\na correctly sized, but zeroed Diffie Hellamn value.\nmpi_cmp_ui() was detecting this if the second parameter was 0,\nbut 1 is passed from dh_is_pubkey_valid(). This causes the null\npointer u->d to be dereferenced towards the end of mpi_cmp_ui()"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"fde791e8a96a64ea7b0ad2440e43586447a209c6","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"ae63e84ffda74267bf7277c38415ba38389229a0","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"61f5453e9706e99713825594e0c8f9031485fb5f","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"0fc7147c694394f8a8cbc19570c6bc918cac0906","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"67589d247909043e94d2dd5fb590958e0f99d58d","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"d3ad023a39f1127dcfd331c562673355dc078650","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"12ac013ad7ff0df066451e825801d805095b3776","versionType":"git"},{"version":"12f008b6dc5ff1c822fdb2198d20e3dbdc92f3f5","status":"affected","lessThan":"9e47a758b70167c9301d2b44d2569f86c7796f2d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/crypto/mpi/mpi-cmp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.7","versionType":"semver"},{"version":"4.14.326","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.295","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.257","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.197","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.133","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.55","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.5","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6","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/mpi-cmp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/fde791e8a96a64ea7b0ad2440e43586447a209c6"},{"url":"https://git.kernel.org/stable/c/ae63e84ffda74267bf7277c38415ba38389229a0"},{"url":"https://git.kernel.org/stable/c/61f5453e9706e99713825594e0c8f9031485fb5f"},{"url":"https://git.kernel.org/stable/c/0fc7147c694394f8a8cbc19570c6bc918cac0906"},{"url":"https://git.kernel.org/stable/c/67589d247909043e94d2dd5fb590958e0f99d58d"},{"url":"https://git.kernel.org/stable/c/d3ad023a39f1127dcfd331c562673355dc078650"},{"url":"https://git.kernel.org/stable/c/12ac013ad7ff0df066451e825801d805095b3776"},{"url":"https://git.kernel.org/stable/c/9e47a758b70167c9301d2b44d2569f86c7796f2d"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is reached from NVMe-over-Fabrics (NVMe/TCP) DH-HMAC-CHAP authentication data received from a remote peer — either a malicious/MITM controller sending a Challenge to a host, or a remote initiator sending a Reply to an nvmet-tcp target on TCP/4420. The attacker-controlled bytes travel over the network with no locality requirement.\nAC:L - Triggering is fully deterministic: the attacker simply advertises a non-NULL DH group (e.g. ffdhe8192) and supplies a correctly sized but all-zero DH value, which makes mpi_read_raw_from_sgl() produce an MPI with nlimbs==0 and d==NULL. No race, no memory-layout dependency, and NVMe/TCP in-band authentication is a normal shipped configuration.\nPR:N - On the target side nvmet_auth_reply() computes the DH shared secret from the peer's DH value before the DH-HMAC-CHAP response HMAC is verified, so this is a pre-authentication code path; on the host side an impersonating/MITM controller needs no credentials to send the Challenge.\nUI:N - An nvmet-tcp target listens passively and the attacker drives the whole DH-HMAC-CHAP exchange; no local user action is required to trigger the oops.\nS:U - The NULL dereference crashes the kernel that is processing the authentication message; the impact stays within that kernel's own security authority with no boundary crossing.\nC:N - The fault is a read of address 0 (u->d[0]) that immediately oopses; no attacker-influenced memory is read back or returned to the peer, so no information is disclosed.\nI:N - The bug is a NULL pointer read, not a write or type confusion; nothing is corrupted and there is no primitive for modifying kernel memory or hijacking control flow.\nA:H - Dereferencing the NULL u->d produces a kernel oops in the NVMe auth work handler, killing the connection/worker and panicking the box under panic_on_oops, and it can be re-triggered on every new authentication attempt."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:16:11.527Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"4.14.326"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"4.19.295"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.4.257"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.10.197"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.15.133"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"6.1.55"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"6.5.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"6.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}