nvme-tcp: fix host memory disclosure on R2T for a read command
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3f2304f8c6d6ed97849057bd16fee99e434ca796 · < 3b3d27670c0c890ba7cf1bc3614cab61bde6d25c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvme-tcp: fix host memory disclosure on R2T for a read command
nvme_tcp_handle_r2t() does not check the direction of the request the R2T refers to. A malicious controller can send an R2T for a READ and the host will answer it: nvme_tcp_setup_h2c_data_pdu() builds the H2CData header and nvme_tcp_try_send_data() sends the request's data buffer. That buffer is the READ destination, so its contents go to the controller.
The command then completes normally and nothing is logged.
Against a test controller that answers every READ with an R2T, a 4096 byte buffered read returned all 4096 bytes, split over two R2Ts. The pages contained stale kernel data, including an array of struct page pointers.
Reject an R2T for a request that is not a write.
From the CVE record · Linux
The Linux kernel’s nvme-tcp handler does not check whether an R2T refers to a write request. A malicious controller can send an R2T for a READ, causing the host to send the READ destination buffer’s contents, which may include stale kernel data, to the controller. The command completes normally without a log message.
Engineers running Linux hosts that use nvme-tcp should check their kernel; affected versions are not specified.