In the Linux kernel, the following vulnerability has been resolved:
nvmet-tcp: reject unsolicited H2CData PDUs
nvmet_tcp_handle_h2c_data_pdu() accepts an H2CData PDU after only checking
that its TTAG is a valid in-range command index and that the command's
data buffers are mapped. It never checks that the target has actually
solicited that data by sending an R2T for the command.
A remote host can abuse this. It submits a write command that takes the
R2T path and, before the target transmits the R2T, sends an H2CData PDU
for that command's tag. The data completes the command early, and when
the command then fails synchronously (e.g. a length mismatch caught by
nvmet_check_transfer_len()), it is completed a second time. Each
completion calls nvmet_tcp_queue_response(), so the same command is added
to queue->resp_list twice while it is still linked; the second llist_add()
makes the node point to itself (lentry->next == lentry).
nvmet_tcp_process_resp_list() then walks that self-referential node and
adds the command to resp_send_list twice. With CONFIG_DEBUG_LIST this
trips the "list_add double add" check (kernel BUG); without it the loop
never terminates and the nvmet_tcp workqueue wedges (soft-lockup). It is
remotely triggerable and needs no authentication on an allow_any_host
subsystem.
Track whether an R2T has been transmitted for a command and reject an
H2CData PDU that arrives before it. The flag is cleared on command reuse
(nvmet_tcp_get_cmd() zeroes cmd->flags) and stays set across the multiple
H2CData PDUs of a single solicited transfer.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS Score: 7.5
AV:N - nvmet-tcp is an in-kernel NVMe-over-TCP target; after kernel_accept() the receive worker parses CapsuleCmd and H2CData PDUs from a listening TCP portal (typically 4420), so a remote initiator on a cloud or storage node can reach the bug over the network.
AC:L - The attacker sends a write/Connect CapsuleCmd that queues an R2T, then an H2CData PDU for that tag in the same TCP burst; nvmet_tcp_io_work() receives before it sends, so both PDUs are handled before R2T is transmitted, with no condition outside attacker control.
PR:N - On the unconnected queue after ICReq, Connect with a non-inline SGL takes the R2T path, H2CData is bound to queue->connect while nr_cmds is 0, and nvmet_check_transfer_len() runs before host-NQN allow-list or DH-HMAC-CHAP, so no credentials or Linux privileges are required.
UI:N - Exploitation uses only attacker-sent NVMe/TCP PDUs against an already listening target; no victim action such as mounting a device or opening a file is required.
S:U - The corrupted resp_list, workqueue hang, and optional list_add BUG occur inside the target host kernel's NVMe/TCP worker and do not cross a VM, IOMMU, or other security authority.
C:N - Double llist_add makes the command node self-referential and then livelocks or hits DEBUG_LIST checks; there is no use-after-free, out-of-bounds read, or other primitive that discloses kernel memory.
I:N - The second llist_add only points the node at itself rather than creating an attacker-controlled write; there is no use-after-free, OOB write, or type confusion that would allow arbitrary kernel modification or code execution.
A:H - nvmet_tcp_process_resp_list() walks the self-loop forever, wedging WQ_MEM_RECLAIM nvmet_tcp_wq in a soft lockup; CONFIG_DEBUG_LIST/BUG_ON_DATA_CORRUPTION can BUG on list_add double add, and cancel_work_sync() during teardown deadlocks as well.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
None |
| Privileges Required |
None |
Integrity Impact |
None |
| User Interaction |
None |
Availability Impact |
High |
AV:N - nvmet-tcp is an in-kernel NVMe-over-TCP target; after kernel_accept() the receive worker parses CapsuleCmd and H2CData PDUs from a listening TCP portal (typically 4420), so a remote initiator on a cloud or storage node can reach the bug over the network.
AC:L - The attacker sends a write/Connect CapsuleCmd that queues an R2T, then an H2CData PDU for that tag in the same TCP burst; nvmet_tcp_io_work() receives before it sends, so both PDUs are handled before R2T is transmitted, with no condition outside attacker control.
PR:N - On the unconnected queue after ICReq, Connect with a non-inline SGL takes the R2T path, H2CData is bound to queue->connect while nr_cmds is 0, and nvmet_check_transfer_len() runs before host-NQN allow-list or DH-HMAC-CHAP, so no credentials or Linux privileges are required.
UI:N - Exploitation uses only attacker-sent NVMe/TCP PDUs against an already listening target; no victim action such as mounting a device or opening a file is required.
S:U - The corrupted resp_list, workqueue hang, and optional list_add BUG occur inside the target host kernel's NVMe/TCP worker and do not cross a VM, IOMMU, or other security authority.
C:N - Double llist_add makes the command node self-referential and then livelocks or hits DEBUG_LIST checks; there is no use-after-free, out-of-bounds read, or other primitive that discloses kernel memory.
I:N - The second llist_add only points the node at itself rather than creating an attacker-controlled write; there is no use-after-free, OOB write, or type confusion that would allow arbitrary kernel modification or code execution.
A:H - nvmet_tcp_process_resp_list() walks the self-loop forever, wedging WQ_MEM_RECLAIM nvmet_tcp_wq in a soft lockup; CONFIG_DEBUG_LIST/BUG_ON_DATA_CORRUPTION can BUG on list_add double add, and cancel_work_sync() during teardown deadlocks as well.
CVSS 3.1