In the Linux kernel, the following vulnerability has been resolved:
nvme-tcp: check the data direction of a C2HData PDU
nvme_tcp_handle_c2h_data() finds the request by command id and checks
that it has a payload, but it does not check that the command asked for
data to be read. A controller that answers a write command with C2HData
therefore reaches nvme_tcp_recv_data(), where _copy_to_iter() hits
WARN_ON_ONCE(i->data_source) and returns 0. The receive path turns that
into -EFAULT and resets the controller.
No data is copied, so this is not memory corruption. What a controller
gets is a kernel warning it can raise at will, which is fatal on a host
booted with panic_on_warn.
The send path already knows the direction - it consults rq_data_dir()
when it builds a command - and nvme_tcp_handle_r2t() checks the length
and the offset of the request it names. The C2HData path does not check
the direction at all.
Reject a C2HData PDU whose command is not a read. Rejecting it fails
the command and resets the controller, as the neighbouring check in this
function does; what goes away is the warning.
[ 6.885580] ------------[ cut here ]------------
[ 6.886457] WARNING: lib/iov_iter.c:193 at _copy_to_iter+0x289/0x1330, CPU#0: kworker/0:1H/71
[ 6.888137] CPU: 0 UID: 0 PID: 71 Comm: kworker/0:1H Not tainted 7.2.0-rc5-NVMETCP-gf5098b6bae76 #1 PREEMPT(lazy)
[ 6.891165] Workqueue: nvme_tcp_wq nvme_tcp_io_work
[ 6.891875] RIP: 0010:_copy_to_iter+0x289/0x1330
[ 6.903739] Call Trace:
[ 6.904085] <TASK>
[ 6.909254] __skb_datagram_iter+0x433/0x820
[ 6.911026] skb_copy_datagram_iter+0x37/0x120
[ 6.911622] nvme_tcp_recv_skb+0xa07/0x4320
[ 6.913378] __tcp_read_sock+0x1ab/0x810
[ 6.915788] nvme_tcp_try_recv+0x152/0x1e0
[ 6.918222] nvme_tcp_io_work+0x1e4/0x6c0
[ 6.926906] </TASK>
[ 6.927226] ---[ end trace 0000000000000000 ]---
[ 6.927878] nvme nvme0: queue 1 failed to copy request 0x71 data
[ 6.928709] nvme nvme0: receive failed: -14
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
CVSS Score: 8.2
AV:N - The nvme-tcp host receive path (nvme_tcp_data_ready -> nvme_tcp_try_recv -> nvme_tcp_recv_skb -> nvme_tcp_handle_c2h_data) parses C2HData PDUs from a remote NVMe/TCP target over routable TCP (typically port 4420); a malicious or compromised target, or an on-path injector into the default-unencrypted stream, triggers the bug from the network.
AC:L - A malicious controller that replies to any in-flight write-direction command with a well-formed C2HData PDU always hits WARN_ON_ONCE(i->data_source) in _copy_to_iter; writes occur from writeback, discards, and init-time Set Features. No race, special memory layout, or rare config beyond CONFIG_NVME_TCP is required.
PR:N - NVMe/TCP authentication (TLS and DH-HMAC-CHAP) is optional and off by default, so the connected fabric peer needs no credentials or privileges on the victim host; it simply answers I/O the host is already sending.
UI:N - No victim action is required at exploit time; once the host is connected (including nvmf-autoconnect at boot), ordinary writeback, journal I/O, and controller-init Set Features with a data buffer issue write-direction commands that the malicious target answers with C2HData.
S:U - The WARN splat, NVMe controller reset, and any panic_on_warn crash remain inside the host kernel. This is not a VM escape, IOMMU bypass, or sandbox boundary crossing.
C:L - WARN_ON_ONCE in _copy_to_iter calls __warn()/dump_stack(), disclosing kernel text addresses in dmesg. No data is copied (the write iterator is ITER_SOURCE and copy_to_iter returns 0), so there is no use-after-free or arbitrary kernel read.
I:N - The receive path turns the failed copy into -EFAULT and resets the controller; _copy_to_iter returns 0 without writing, so there is no memory corruption, write primitive, or control-flow hijack.
A:H - The reporter reproduced WARNING in _copy_to_iter from nvme_tcp_io_work, which panics hosts with panic_on_warn or warn_limit. Independently, every C2HData-for-write returns -EFAULT and runs nvme_tcp_error_recovery(), so a malicious target can repeatedly take down NVMe-oF storage.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
Low |
| Privileges Required |
None |
Integrity Impact |
None |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The nvme-tcp host receive path (nvme_tcp_data_ready -> nvme_tcp_try_recv -> nvme_tcp_recv_skb -> nvme_tcp_handle_c2h_data) parses C2HData PDUs from a remote NVMe/TCP target over routable TCP (typically port 4420); a malicious or compromised target, or an on-path injector into the default-unencrypted stream, triggers the bug from the network.
AC:L - A malicious controller that replies to any in-flight write-direction command with a well-formed C2HData PDU always hits WARN_ON_ONCE(i->data_source) in _copy_to_iter; writes occur from writeback, discards, and init-time Set Features. No race, special memory layout, or rare config beyond CONFIG_NVME_TCP is required.
PR:N - NVMe/TCP authentication (TLS and DH-HMAC-CHAP) is optional and off by default, so the connected fabric peer needs no credentials or privileges on the victim host; it simply answers I/O the host is already sending.
UI:N - No victim action is required at exploit time; once the host is connected (including nvmf-autoconnect at boot), ordinary writeback, journal I/O, and controller-init Set Features with a data buffer issue write-direction commands that the malicious target answers with C2HData.
S:U - The WARN splat, NVMe controller reset, and any panic_on_warn crash remain inside the host kernel. This is not a VM escape, IOMMU bypass, or sandbox boundary crossing.
C:L - WARN_ON_ONCE in _copy_to_iter calls __warn()/dump_stack(), disclosing kernel text addresses in dmesg. No data is copied (the write iterator is ITER_SOURCE and copy_to_iter returns 0), so there is no use-after-free or arbitrary kernel read.
I:N - The receive path turns the failed copy into -EFAULT and resets the controller; _copy_to_iter returns 0 without writing, so there is no memory corruption, write primitive, or control-flow hijack.
A:H - The reporter reproduced WARNING in _copy_to_iter from nvme_tcp_io_work, which panics hosts with panic_on_warn or warn_limit. Independently, every C2HData-for-write returns -EFAULT and runs nvme_tcp_error_recovery(), so a malicious target can repeatedly take down NVMe-oF storage.
CVSS 3.1