{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50215","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-10-21T19:36:19.971Z","datePublished":"2024-11-09T10:14:27.043Z","dateUpdated":"2026-08-05T11:42:33.611Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:42:33.611Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-auth: assign dh_key to NULL after kfree_sensitive\n\nctrl->dh_key might be used across multiple calls to nvmet_setup_dhgroup()\nfor the same controller. So it's better to nullify it after release on\nerror path in order to avoid double free later in nvmet_destroy_auth().\n\nFound by Linux Verification Center (linuxtesting.org) with Svace."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - `nvmet_setup_dhgroup()` executes on behalf of remote NVMe-oF fabric commands — the admin Connect command (`nvmet_execute_admin_connect()`) and the AUTH_Send DH-HMAC-CHAP NEGOTIATE restart — delivered by nvmet-tcp on TCP/4420 (or RDMA/FC) from an arbitrary remote initiator. No local access to the target is needed to drive the vulnerable function.\nAC:H - Two preconditions lie entirely outside the attacker's control: `ctrl->dh_gid` must diverge from `host->dhchap_dhgroup_id` (the negotiate loop can only re-assign `dh_gid` to its existing value, so this requires an administrator changing `dhchap_dhgroup` via configfs between two setups), and `crypto_kpp_set_secret()` must fail, which happens only on a small GFP_KERNEL/MPI allocation failure or default-RNG failure that the kernel does not produce without OOM-killing first.\nPR:N - The code path is the authentication setup itself and runs before DH-HMAC-CHAP completes (`sq->authenticated == false`); the only credential involved is the host NQN, a non-secret identifier the attacker chooses in the Connect payload. No prior authentication or account on the target is required.\nUI:N - No victim action participates in the attack — the attacker alone issues Connect and AUTH_Send commands and later disconnects to drive `nvmet_ctrl_free()` → `nvmet_destroy_auth()`. The DH-group configfs setting is pre-existing system configuration, not user interaction.\nS:U - The double free corrupts kernel slab state within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - A double free of the 256–1024 byte `ctrl->dh_key` in a general-purpose kmalloc cache lets the same slab object be handed out twice; with the heap grooming the remote peer already has on the target (`kmalloc(tl, GFP_KERNEL)` with attacker-chosen `tl` in `nvmet_execute_auth_send()`), this yields a UAF-style read primitive over adjacent/overlapping kernel objects, including the DH private key material itself.\nI:H - The same aliased-allocation primitive gives an attacker-controlled write into an object another kernel subsystem believes it owns, corrupting SLUB freelist metadata and enabling control-flow hijacking in the classic double-free exploitation pattern.\nA:H - Even unexploited, the second `kfree_sensitive()` on the dangling pointer trips SLUB double-free detection (BUG/panic with `slub_debug` or `panic_on_oops`) or corrupts the freelist into a later fatal oops, taking down the storage target."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/auth.c"],"versions":[{"version":"7a277c37d3522e9b2777d762bbbcecafae2b1f8d","lessThan":"c94e965f766321641ec38e4eece9ce8884543244","status":"affected","versionType":"git"},{"version":"7a277c37d3522e9b2777d762bbbcecafae2b1f8d","lessThan":"c60af16e1d6cc2237d58336546d6adfc067b6b8f","status":"affected","versionType":"git"},{"version":"7a277c37d3522e9b2777d762bbbcecafae2b1f8d","lessThan":"e61bd51e44409495d75847e9230736593e4c8710","status":"affected","versionType":"git"},{"version":"7a277c37d3522e9b2777d762bbbcecafae2b1f8d","lessThan":"d2f551b1f72b4c508ab9298419f6feadc3b5d791","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/auth.c"],"versions":[{"version":"6.0","status":"affected"},{"version":"0","lessThan":"6.0","status":"unaffected","versionType":"semver"},{"version":"6.1.116","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.60","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.11.7","lessThanOrEqual":"6.11.*","status":"unaffected","versionType":"semver"},{"version":"6.12","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.1.116"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.6.60"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.11.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.12"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/c94e965f766321641ec38e4eece9ce8884543244"},{"url":"https://git.kernel.org/stable/c/c60af16e1d6cc2237d58336546d6adfc067b6b8f"},{"url":"https://git.kernel.org/stable/c/e61bd51e44409495d75847e9230736593e4c8710"},{"url":"https://git.kernel.org/stable/c/d2f551b1f72b4c508ab9298419f6feadc3b5d791"}],"title":"nvmet-auth: assign dh_key to NULL after kfree_sensitive","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-50215","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-10-01T20:17:09.200980Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-415","description":"CWE-415 Double Free"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-10-01T20:27:05.214Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T22:27:06.690Z"}}]}}