scsi: iscsi: Verify lengths on passthrough PDUs
authorChris Leech <cleech@redhat.com>
Wed, 24 Feb 2021 05:39:01 +0000 (21:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:34:14 +0000 (12:34 +0100)
commitf40bbcb68131f1c17ed22a1e8a471776b4e57bd3
treebe4ee2b312e51b45f16b57ae68aa8974e0f2ccdf
parent76d92bf293c36a52ea5552919ac645ef2edee55d
scsi: iscsi: Verify lengths on passthrough PDUs

commit f9dbdf97a5bd92b1a49cee3d591b55b11fd7a6d5 upstream.

Open-iSCSI sends passthrough PDUs over netlink, but the kernel should be
verifying that the provided PDU header and data lengths fall within the
netlink message to prevent accessing beyond that in memory.

Cc: stable@vger.kernel.org
Reported-by: Adam Nichols <adam@grimm-co.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_transport_iscsi.c