alistair23-linux/drivers/target
Nicholas Bellinger 6b20fa9aaf target: Fix REPORT TARGET PORT GROUPS handling with small allocation length
This patch fixes a bug with the handling of REPORT TARGET PORT GROUPS
containing a smaller allocation length than the payload requires causing
memory writes beyond the end of the buffer.  This patch checks for the
minimum 4 byte length for the response payload length, and also checks
upon each loop of T10_ALUA(su_dev)->tg_pt_gps_list to ensure the Target
port group and Target port descriptor list is able to fit into the
remaining allocation length.

If the response payload exceeds the allocation length length, then rd_len
is still increments to indicate to the initiator that the payload has
been truncated.

Reported-by: Roland Dreier <roland@purestorage.com>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
2011-10-24 03:21:19 +00:00
..
iscsi target: Cleanup unused target_core_base.h bits 2011-10-24 03:21:03 +00:00
loopback loopback: Prevent uninitialized use of tl_tpg in tcm_loop_queuecommand 2011-10-24 03:21:01 +00:00
tcm_fc target: Have core_tmr_alloc_req() take an explicit GFP_xxx flag 2011-10-24 03:20:53 +00:00
Kconfig iscsi-target: Add iSCSI fabric support for target v4.1 2011-07-26 09:16:43 +00:00
Makefile target: remove the ->transport_split_cdb callback in se_cmd 2011-10-24 03:21:15 +00:00
target_core_alua.c target: Fix REPORT TARGET PORT GROUPS handling with small allocation length 2011-10-24 03:21:19 +00:00
target_core_alua.h
target_core_cdb.c target: remove the ->transport_split_cdb callback in se_cmd 2011-10-24 03:21:15 +00:00
target_core_configfs.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_device.c target: Convert acl_node_lock to be IRQ-disabling 2011-08-22 19:28:36 +00:00
target_core_fabric_configfs.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_fabric_lib.c target: remove custom hex2bin() implementation 2011-07-22 09:37:49 +00:00
target_core_file.c target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_file.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_hba.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_hba.h
target_core_iblock.c target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_iblock.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_pr.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_pr.h target: Core cleanups from AGrover (round 1) 2011-07-22 09:37:43 +00:00
target_core_pscsi.c target: replace ->get_cdb with a target_get_task_cdb helper 2011-10-24 03:21:13 +00:00
target_core_pscsi.h target: cleanup pscsi request submission 2011-10-24 03:20:44 +00:00
target_core_rd.c target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_rd.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_stat.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_stat.h [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_tmr.c target: Remove unnecessary se_task members 2011-10-24 03:21:08 +00:00
target_core_tpg.c target: Convert acl_node_lock to be IRQ-disabling 2011-08-22 19:28:36 +00:00
target_core_transport.c target: remove the ->transport_split_cdb callback in se_cmd 2011-10-24 03:21:15 +00:00
target_core_ua.c target: Remove unneeded version.h includes 2011-10-11 04:10:19 +00:00
target_core_ua.h