OpenCloudOS-Kernel/include/target/iscsi
Bart Van Assche 0ca650c13b scsi: target/iscsi: Handle too large immediate data buffers correctly
Since target_alloc_sgl() and iscsit_allocate_iovecs() allocate buffer space
for se_cmd.data_length bytes and since that number can be smaller than the
iSCSI Expected Data Transfer Length (EDTL), ensure that the iSCSI target
driver does not attempt to receive more bytes than what fits in the receive
buffer. Always receive the full immediate data buffer such that the iSCSI
target driver does not attempt to parse immediate data as an iSCSI PDU.

Note: the current code base only calls iscsit_get_dataout() if the size of
the immediate data buffer does not exceed the buffer size derived from the
SCSI CDB. See also target_cmd_size_check().

Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 20:20:06 -04:00
..
iscsi_target_core.h scsi: target/iscsi: Handle too large immediate data buffers correctly 2019-04-12 20:20:06 -04:00
iscsi_target_stat.h scsi: target: use ISCSI_IQN_LEN in iscsi_target_stat 2018-10-16 00:38:36 -04:00
iscsi_transport.h scsi: target/iscsi: Rename a function and a function pointer 2019-02-04 21:34:49 -05:00