In the Linux kernel, the following vulnerability has been resolved:
nvmet-tcp: fix out-of-bounds write when receiving an over-long PDU
nvmet_tcp_try_recv_pdu() reads a PDU header into the fixed 128-byte
queue->pdu union, then computes the remaining payload length as
<pre>
queue->left = hdr->hlen - queue->offset + hdgst;
</pre>
and reads that many more bytes into &queue->pdu + queue->offset, without
ever bounding the result against sizeof(queue->pdu).
A struct nvme_tcp_icreq_pdu is itself 128 bytes, exactly the size of the
union. Once a header digest has been negotiated (hdgst = 4), a second
ICReq passes the hlen == nvmet_tcp_pdu_size() check but yields
queue->left = 128 - 8 + 4 = 124, so bytes 8..132 are written into the
128-byte buffer -- 4 bytes past its end, over queue->hdr_digest and
queue->data_digest. Those bytes are attacker-controlled (an ICReq
carries no digest), and the duplicate ICReq is only rejected later,
after the overflow. A remote unauthenticated host can thus corrupt
kernel memory adjacent to the receive buffer.
Reject any PDU whose declared length would read past the end of
queue->pdu before the second recv.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - The flaw is in nvmet-tcp, an in-kernel NVMe-over-TCP target that accepts remote TCP connections; nvmet_tcp_try_recv_pdu() copies attacker-controlled PDU bytes from the socket, so the overflow is reachable from any network peer that can connect to an exposed NVMe-oF TCP port (typical cloud/storage-server deployment).
AC:L - The attacker enables header digest in the first ICReq (the target copies the initiator's digest flags with no extra configuration), then sends a second 128-byte ICReq; queue->left becomes 124 and four attacker-controlled bytes are written past queue->pdu with no race or condition outside attacker control.
PR:N - The overflow fires on a duplicate ICReq after TCP accept and digest negotiation, before NVMe Connect, host NQN allow-list, or DH-HMAC-CHAP in-band authentication; no Linux credentials or capabilities on the target are required.
UI:N - Exploitation requires only attacker-sent NVMe/TCP PDUs to an already listening target port; no victim user action such as mounting a filesystem or opening a device is needed.
S:U - The out-of-bounds write corrupts fields of the host's nvmet_tcp_queue in kernel memory and does not cross a VM, hypervisor, container, or IOMMU security boundary.
C:H - Attacker-controlled 4-byte overflow into kernel memory adjacent to queue->pdu is memory corruption that, per kernel guidance, can be leveraged for information disclosure (including by clearing hdr_digest so later verify_hdgst is skipped and by controlling the persisted digest-flag bytes).
I:H - This is an attacker-controlled out-of-bounds write past the 128-byte queue->pdu union into adjacent kernel fields (hdr_digest and data_digest); per kernel guidance an OOB write is High integrity impact and can disable PDU digest verification before the duplicate ICReq is rejected.
A:H - After the overflow, nvmet_tcp_done_recv_pdu() returns -EPROTO and nvmet_tcp_socket_error() calls nvmet_ctrl_fatal_error() once a controller exists (e.g. after unauthenticated Discovery Connect), taking down the NVMe target; the kernel memory corruption can also oops, and the trigger is remotely repeatable.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The flaw is in nvmet-tcp, an in-kernel NVMe-over-TCP target that accepts remote TCP connections; nvmet_tcp_try_recv_pdu() copies attacker-controlled PDU bytes from the socket, so the overflow is reachable from any network peer that can connect to an exposed NVMe-oF TCP port (typical cloud/storage-server deployment).
AC:L - The attacker enables header digest in the first ICReq (the target copies the initiator's digest flags with no extra configuration), then sends a second 128-byte ICReq; queue->left becomes 124 and four attacker-controlled bytes are written past queue->pdu with no race or condition outside attacker control.
PR:N - The overflow fires on a duplicate ICReq after TCP accept and digest negotiation, before NVMe Connect, host NQN allow-list, or DH-HMAC-CHAP in-band authentication; no Linux credentials or capabilities on the target are required.
UI:N - Exploitation requires only attacker-sent NVMe/TCP PDUs to an already listening target port; no victim user action such as mounting a filesystem or opening a device is needed.
S:U - The out-of-bounds write corrupts fields of the host's nvmet_tcp_queue in kernel memory and does not cross a VM, hypervisor, container, or IOMMU security boundary.
C:H - Attacker-controlled 4-byte overflow into kernel memory adjacent to queue->pdu is memory corruption that, per kernel guidance, can be leveraged for information disclosure (including by clearing hdr_digest so later verify_hdgst is skipped and by controlling the persisted digest-flag bytes).
I:H - This is an attacker-controlled out-of-bounds write past the 128-byte queue->pdu union into adjacent kernel fields (hdr_digest and data_digest); per kernel guidance an OOB write is High integrity impact and can disable PDU digest verification before the duplicate ICReq is rejected.
A:H - After the overflow, nvmet_tcp_done_recv_pdu() returns -EPROTO and nvmet_tcp_socket_error() calls nvmet_ctrl_fatal_error() once a controller exists (e.g. after unauthenticated Discovery Connect), taking down the NVMe target; the kernel memory corruption can also oops, and the trigger is remotely repeatable.
CVSS 3.1