{"id":"CVE-2024-46737","state":"PUBLISHED","title":"nvmet-tcp: fix kernel crash if commands allocation fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-tcp: fix kernel crash if commands allocation fails\n\nIf the commands allocation fails in nvmet_tcp_alloc_cmds()\nthe kernel crashes in nvmet_tcp_release_queue_work() because of\na NULL pointer dereference.\n\n  nvmet: failed to install queue 0 cntlid 1 ret 6\n  Unable to handle kernel NULL pointer dereference at\n         virtual address 0000000000000008\n\nFix the bug by setting queue->nr_cmds to zero in case\nnvmet_tcp_alloc_cmd() fails.","publishedAt":"2024-09-18T07:11:59.300Z","updatedAt":"2026-08-05T11:38:13.852Z","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":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"03e1fd0327fa5e2174567f5fe9290fe21d21b8f4","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"50632b877ce55356f5d276b9add289b1e7ddc683","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"91dad30c5607e62864f888e735d0965567827bdf","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"7957c731fc2b23312f8935812dee5a0b14b04e2d","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"489f2913a63f528cfe3f21722583fb981967ecda","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"6c04d1e3ab22cc5394ef656429638a5947f87244","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"5572a55a6f830ee3f3a994b6b962a5c327d28cb3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.4.284","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.226","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.167","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.110","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.51","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.10","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]}],"references":["https://git.kernel.org/stable/c/03e1fd0327fa5e2174567f5fe9290fe21d21b8f4","https://git.kernel.org/stable/c/50632b877ce55356f5d276b9add289b1e7ddc683","https://git.kernel.org/stable/c/91dad30c5607e62864f888e735d0965567827bdf","https://git.kernel.org/stable/c/7957c731fc2b23312f8935812dee5a0b14b04e2d","https://git.kernel.org/stable/c/489f2913a63f528cfe3f21722583fb981967ecda","https://git.kernel.org/stable/c/6c04d1e3ab22cc5394ef656429638a5947f87244","https://git.kernel.org/stable/c/5572a55a6f830ee3f3a994b6b962a5c327d28cb3","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:47.831Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/46xxx/CVE-2024-46737.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-46737","state":"PUBLISHED","datePublished":"2024-09-18T07:11:59.300Z","dateUpdated":"2026-08-05T11:38:13.852Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-09-11T15:12:18.257Z"},"containers":{"cna":{"title":"nvmet-tcp: fix kernel crash if commands allocation fails","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-tcp: fix kernel crash if commands allocation fails\n\nIf the commands allocation fails in nvmet_tcp_alloc_cmds()\nthe kernel crashes in nvmet_tcp_release_queue_work() because of\na NULL pointer dereference.\n\n  nvmet: failed to install queue 0 cntlid 1 ret 6\n  Unable to handle kernel NULL pointer dereference at\n         virtual address 0000000000000008\n\nFix the bug by setting queue->nr_cmds to zero in case\nnvmet_tcp_alloc_cmd() fails."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"03e1fd0327fa5e2174567f5fe9290fe21d21b8f4","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"50632b877ce55356f5d276b9add289b1e7ddc683","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"91dad30c5607e62864f888e735d0965567827bdf","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"7957c731fc2b23312f8935812dee5a0b14b04e2d","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"489f2913a63f528cfe3f21722583fb981967ecda","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"6c04d1e3ab22cc5394ef656429638a5947f87244","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"5572a55a6f830ee3f3a994b6b962a5c327d28cb3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.4.284","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.226","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.167","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.110","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.51","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.10","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/03e1fd0327fa5e2174567f5fe9290fe21d21b8f4"},{"url":"https://git.kernel.org/stable/c/50632b877ce55356f5d276b9add289b1e7ddc683"},{"url":"https://git.kernel.org/stable/c/91dad30c5607e62864f888e735d0965567827bdf"},{"url":"https://git.kernel.org/stable/c/7957c731fc2b23312f8935812dee5a0b14b04e2d"},{"url":"https://git.kernel.org/stable/c/489f2913a63f528cfe3f21722583fb981967ecda"},{"url":"https://git.kernel.org/stable/c/6c04d1e3ab22cc5394ef656429638a5947f87244"},{"url":"https://git.kernel.org/stable/c/5572a55a6f830ee3f3a994b6b962a5c327d28cb3"}],"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 `nvmet_tcp_install_queue()` in the NVMe-over-TCP target driver, reached directly from an NVMe Fabrics Connect capsule received on the target's listening TCP socket (default port 4420). A remote initiator anywhere on the network triggers it with ordinary NVMe/TCP protocol traffic.\nAC:L - The attacker deterministically forces the allocation failure by setting `sqsize` in the admin Connect command, which since commit 143667ee9a9c is unbounded for qid 0, making `kcalloc(131072, sizeof(struct nvmet_tcp_cmd))` exceed MAX_PAGE_ORDER and return NULL every time; on older branches the same is achieved with parallel max-size connections. No race, no memory-layout condition, and no state outside the attacker's control is involved.\nPR:N - `nvmet_install_queue()` runs inside the admin Connect handler before any DH-HMAC-CHAP authentication exchange, and `nvmet_host_allowed()` returns true unconditionally for the discovery subsystem exposed by every nvmet-tcp port. An entirely unauthenticated remote peer with TCP reachability can drive the path.\nUI:N - The crash is triggered purely by attacker-sent NVMe/TCP capsules followed by closing the connection. No action by any local user or administrator is required.\nS:U - The NULL dereference occurs in a kernel workqueue context and its impact is confined to the kernel on the target host, with no crossing into another security authority such as a hypervisor or IOMMU boundary.\nC:N - The fault is a read of `cmd->req.cmd` at fixed address NULL+0x8 that oopses on the very first loop iteration; a remote TCP peer has no means to map the zero page, so no kernel data is read back or disclosed to the attacker.\nI:N - Execution stops at the faulting read before reaching the later `nvmet_tcp_free_cmd_buffers()` stores, and the dereferenced address is a fixed unmapped low address rather than attacker-controlled memory, so nothing is modified or corrupted.\nA:H - The result is a kernel NULL pointer dereference oops in the `nvmet_tcp_wq` kworker — a full panic on systems with `panic_on_oops` — repeatable at will by an unauthenticated remote attacker, and each attempt additionally leaks the queue allocation, socket file reference and IDA index."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:38:13.852Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.4.284"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.10.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.15.167"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.1.110"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.6.51"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.10.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.11"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-09-29T14:52:30.516681Z","id":"CVE-2024-46737","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-29T14:52:46.426Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"url":"https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T22:17:20.599Z"}}]}}}