android_kernel_oneplus_msm8998/drivers/target
Dmitry Monakhov 365b680fe4 tcm_fileio: Prevent information leak for short reads
[ Upstream commit f11b55d13563e9428c88c873f4f03a6bef11ec0a ]

If we failed to read data from backing file (probably because some one
truncate file under us), we must zerofill cmd's data, otherwise it will
be returned as is. Most likely cmd's data are unitialized pages from
page cache. This result in information leak.

(Change BUG_ON into -EINVAL se_cmd failure - nab)

testcase: e11a1b7b90
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 10:58:45 +01:00
..
iscsi iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref 2018-01-17 09:35:31 +01:00
loopback
sbp
tcm_fc
Kconfig
Makefile
target_core_alua.c target: fix race during implicit transition work flushes 2017-12-20 10:04:57 +01:00
target_core_alua.h
target_core_configfs.c
target_core_device.c target: Fix NULL dereference during LUN lookup + active I/O shutdown 2017-03-15 09:57:14 +08:00
target_core_fabric_configfs.c target: Avoid mappedlun symlink creation during lun shutdown 2017-08-11 09:08:49 -07:00
target_core_fabric_lib.c
target_core_file.c tcm_fileio: Prevent information leak for short reads 2018-03-24 10:58:45 +01:00
target_core_file.h
target_core_hba.c
target_core_iblock.c target: Fix max_unmap_lba_count calc overflow 2016-08-20 18:09:26 +02:00
target_core_iblock.h
target_core_internal.h target: Fix kref->refcount underflow in transport_cmd_finish_abort 2017-06-29 12:48:51 +02:00
target_core_pr.c target:fix condition return in core_pr_dump_initiator_port() 2017-12-20 10:04:58 +01:00
target_core_pr.h
target_core_pscsi.c target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export 2017-03-26 12:13:19 +02:00
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c target: Fix compare_and_write_callback handling for non GOOD status 2017-05-20 14:26:58 +02:00
target_core_spc.c
target_core_stat.c
target_core_tmr.c target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:35:31 +01:00
target_core_tpg.c target: Fix node_acl demo-mode + uncached dynamic shutdown regression 2017-11-18 11:11:07 +01:00
target_core_transport.c target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:35:31 +01:00
target_core_ua.c
target_core_ua.h
target_core_user.c target/user: Fix cast from pointer to phys_addr_t 2018-02-25 11:03:46 +01:00
target_core_xcopy.c target: Use correct SCSI status during EXTENDED_COPY exception 2017-02-14 15:22:51 -08:00
target_core_xcopy.h