{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-46737",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-46737"
  ],
  "published": "2024-09-18T07:17:19Z",
  "summary": "nvmet-tcp: fix kernel crash if commands allocation fails",
  "details": "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.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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.110",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-46737"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/03e1fd0327fa5e2174567f5fe9290fe21d21b8f4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/50632b877ce55356f5d276b9add289b1e7ddc683"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/91dad30c5607e62864f888e735d0965567827bdf"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7957c731fc2b23312f8935812dee5a0b14b04e2d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/489f2913a63f528cfe3f21722583fb981967ecda"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6c04d1e3ab22cc5394ef656429638a5947f87244"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5572a55a6f830ee3f3a994b6b962a5c327d28cb3"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.5,
      "cvss_v3_severity": "High",
      "scenario": "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 \u2014 a full panic on systems with `panic_on_oops` \u2014 repeatable at will by an unauthenticated remote attacker, and each attempt additionally leaks the queue allocation, socket file reference and IDA index."
    }
  }
}
