+17
−0
Loading
nvmet_tcp_build_pdu_iovec() could walk past cmd->req.sg when a PDU length or offset exceeds sg_cnt and then use bogus sg->length/offset values, leading to _copy_to_iter() GPF/KASAN. Guard sg_idx, remaining entries, and sg->length/offset before building the bvec. Fixes: 872d26a3 ("nvmet-tcp: add NVMe over TCP target driver") Signed-off-by:YunJe Shin <ioerts@kookmin.ac.kr> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Joonkyo Jung <joonkyoj@yonsei.ac.kr> Signed-off-by:
Keith Busch <kbusch@kernel.org>