Description
In the Linux kernel, the following vulnerability has been resolved: RDMA/siw: bound Read Response placement to the RREAD length In drivers/infiniband/sw/siw/siw_qp_rx.c, siw_proc_rresp() places each inbound Read Response DDP segment at sge->laddr + wqe->processed and then accumulates wqe->processed, but it never checks the running total against the sink buffer length on continuation segments. siw_check_sge() resolves and validates the sink memory only on the first fragment (the if (!*mem) branch), and siw_rresp_check_ntoh() compares the cumulative length against wqe->bytes only on the final segment (the !frx->more_ddp_segs guard). A connected siw peer that answers an outstanding RREAD with Read Response segments that keep the DDP Last flag clear, carrying more total payload than the RREAD requested, drives wqe->processed past the validated sink buffer; the next siw_rx_data() call writes out of bounds at sge->laddr + wqe->processed. siw runs iWARP over ordinary routable TCP, so the peer is the remote end of an established RDMA connection and needs no local privilege. Bound every segment before placement, exactly as siw_proc_send() and siw_proc_write() already do for their tagged and untagged paths, and terminate the connection with a base-or-bounds DDP error when the Read Response would overrun the sink buffer. This is the second receive-path length fix for this file. A separate change rejects an MPA FPDU length that underflows the per-fragment remainder in the header decode; that guard does not cover this case, because here each individual segment length is self-consistent and only the accumulated placement offset overruns the buffer.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
8b6a361b8c482f22ac99c3273285ff16b23fba91 to < a31b6d18ded3cc32d9ee85a6ff0726d4274887b2affected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < 595e6537ad1a210da32cbb9a7f91aa73090915baaffected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < 3ef7e052cbd05a8b13a51a07b185a39ec93ee1cfaffected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < b2e26c955f8dd7e8d3f16c858db05245ea4fa817affected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < 6bc89f34a4597f9f6d41f7a60c67a3153bfe8851affected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < 423a78ff7928c2601013f73ec6d896f5597d0df5affected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < 75c93cd3c421890f49ea93f0b978b9b7bb10e5e3affected8b6a361b8c482f22ac99c3273285ff16b23fba91 to < 7d29f7e9dbd844cae4d3e559cf78324b9642fd6baffected
Linux Linux
Default version status: affected
5.3affected0 to < 5.3unaffected5.10.261 to ≤ 5.10.*unaffected5.15.212 to ≤ 5.15.*unaffected6.1.178 to ≤ 6.1.*unaffected6.6.145 to ≤ 6.6.*unaffected6.12.96 to ≤ 6.12.*unaffected6.18.39 to ≤ 6.18.*unaffected7.1.4 to ≤ 7.1.*unaffected7.2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/a31b6d18ded3cc32d9ee85a6ff0726d4274887b2 ↗
- https://git.kernel.org/stable/c/595e6537ad1a210da32cbb9a7f91aa73090915ba ↗
- https://git.kernel.org/stable/c/3ef7e052cbd05a8b13a51a07b185a39ec93ee1cf ↗
- https://git.kernel.org/stable/c/b2e26c955f8dd7e8d3f16c858db05245ea4fa817 ↗
- https://git.kernel.org/stable/c/6bc89f34a4597f9f6d41f7a60c67a3153bfe8851 ↗
- https://git.kernel.org/stable/c/423a78ff7928c2601013f73ec6d896f5597d0df5 ↗
- https://git.kernel.org/stable/c/75c93cd3c421890f49ea93f0b978b9b7bb10e5e3 ↗
- https://git.kernel.org/stable/c/7d29f7e9dbd844cae4d3e559cf78324b9642fd6b ↗