SCSI: libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 3 Sep 2014 05:00:39 +0000 (00:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:54:12 +0000 (14:54 -0700)
commitfe3ed8722e7f850cee43dfa18dd2aebd8857ed38
tree9fb78d0e504cc21d8546632522729cc4adafa793
parentff7510205896efaf9c5f58d656b2ce2e2b5c1135
SCSI: libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu

commit db9bfd64b14a3a8f1868d2164518fdeab1b26ad1 upstream.

This patches fixes a potential buffer overrun in __iscsi_conn_send_pdu.
This function is used by iscsi drivers and userspace to send iscsi PDUs/
commands. For login commands, we have a set buffer size. For all other
commands we do not support data buffers.

This was reported by Dan Carpenter here:
http://www.spinics.net/lists/linux-scsi/msg66838.html

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/libiscsi.c