[PATCH v2 0/2] IB/isert: bound declared PDU lengths by what was received
Yehyeong Lee <[email protected]> Mon, 27 Jul 2026 01:39:29 +0900
| Newsgroups | org.kernel.vger.target-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rdma |
|---|---|
| Message-ID | <[email protected]> |
v1 added a wc->byte_len check to isert_recv_done() only. Leon Romanovsky pointed out that the login path needs the same treatment, and he was right: the declared DataSegmentLength of a login PDU is never compared against what arrived either, and the login code reads it back out of a fixed 8192-byte buffer before authentication - from two different callers, depending on which login PDU it is. I reproduced both under KASAN before writing 2/2; the splats are in its changelog. 1/2 is v1 unchanged apart from one sentence in the changelog, which said the login handler already had a length check. It has one, but not this one - 29e7b925ae6d bounds login_req_len from below, and nothing bounded the declared length from above. v1: https://lore.kernel.org/linux-rdma/[email protected]/ Yehyeong Lee (2): IB/isert: reject PDUs declaring more data than was received IB/isert: reject login PDUs declaring more data than was received drivers/infiniband/ulp/isert/ib_isert.c | 40 ++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) -- 2.43.0