android_kernel_oneplus_msm8998/drivers/scsi/qla2xxx
Dan Carpenter d8663aa277 scsi: qla2xxx: Fix an integer overflow in sysfs code
commit e6f77540c067b48dee10f1e33678415bfcc89017 upstream.

The value of "size" comes from the user.  When we add "start + size" it
could lead to an integer overflow bug.

It means we vmalloc() a lot more memory than we had intended.  I believe
that on 64 bit systems vmalloc() can succeed even if we ask it to
allocate huge 4GB buffers.  So we would get memory corruption and likely
a crash when we call ha->isp_ops->write_optrom() and ->read_optrom().

Only root can trigger this bug.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=194061

Fixes: b7cc176c9e ("[SCSI] qla2xxx: Allow region-based flash-part accesses.")
Reported-by: shqking <shqking@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-27 11:00:16 +02:00
..
Kconfig qla2xxx: Update tcm_qla2xxx module description to 24xx+ 2015-08-02 22:41:14 -07:00
Makefile
qla_attr.c scsi: qla2xxx: Fix an integer overflow in sysfs code 2017-09-27 11:00:16 +02:00
qla_bsg.c qla2xxx: Remove set-but-not-used variables 2015-08-26 10:34:49 -07:00
qla_bsg.h
qla_dbg.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
qla_dbg.h
qla_def.h SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
qla_devtbl.h
qla_dfs.c scsi: print single-character strings with seq_putc 2015-02-02 09:57:46 -08:00
qla_fw.h
qla_gbl.h
qla_gs.c qla2xxx: Remove __constant_ prefix 2015-08-26 10:40:32 -07:00
qla_init.c qla2xxx: Fix stale pointer access. 2016-03-03 15:07:27 -08:00
qla_inline.h
qla_iocb.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
qla_isr.c qla2xxx: Fix erroneous invalid handle message 2017-07-05 14:37:16 +02:00
qla_mbx.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
qla_mid.c qla2xxx: Fix stale pointer access. 2016-03-03 15:07:27 -08:00
qla_mr.c qla2xxx: Fix sparse annotations 2015-08-26 10:42:25 -07:00
qla_mr.h
qla_nx.c qla2xxx: Fix rwlock recursion 2015-11-17 18:21:22 -05:00
qla_nx.h
qla_nx2.c qla2xxx: Replace two macros with an inline function 2015-08-26 10:35:35 -07:00
qla_nx2.h qla2xxx: Replace two macros with an inline function 2015-08-26 10:35:35 -07:00
qla_os.c scsi: qla2xxx: don't disable a not previously enabled PCI device 2017-06-14 13:16:25 +02:00
qla_settings.h
qla_sup.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
qla_target.c qla2xxx: Fix erroneous invalid handle message 2017-07-05 14:37:16 +02:00
qla_target.h qla2xxx: terminate exchange when command is aborted by LIO 2015-07-24 14:19:42 -07:00
qla_tmpl.c qla2xxx: Fix stale pointer access. 2016-03-03 15:07:27 -08:00
qla_tmpl.h
qla_version.h qla2xxx: Update driver version to 8.07.00.26-k 2015-08-26 17:51:01 -07:00
tcm_qla2xxx.c qla2xxx: Fix regression introduced by target configFS changes 2015-11-28 19:52:10 -08:00
tcm_qla2xxx.h target: move transport ID handling to the core 2015-05-30 22:42:30 -07:00