Re: [PATCH] nvmet-fc: bound the FCP command data length before allocating buffers

From: Yehyeong Lee

Date: Fri Nov 20 2026 - 10:02:00 EST


On Tue, Oct 13, 2026 at 07:40:38PM +0900, Yehyeong Lee wrote:
> nvmet_fc_handle_fcp_rqst() takes the data length straight from the FCP
> command IU (cmdiu->data_len, a 32-bit value from the wire) into
> fod->req.transfer_len and calls nvmet_fc_alloc_tgt_pgs(), which hands it to
> sgl_alloc() with no upper bound. nvmet_req_init() only parses the command
> and clears transfer_len; nvmet_check_transfer_len(), the only other place
> the length is checked, runs later from req->execute(), after the allocation

This is superseded by v2:
https://lore.kernel.org/all/20261013153316.3178656-1-yhlee@xxxxxxxxxxxxxxxxxx/

Best regards,
Yehyeong Lee