linux/drivers/scsi/csiostor
Kees Cook 42c335f7e6 scsi: csiostor: Avoid content leaks and casts
When copying attributes, the len argument was padded out and the
resulting memcpy() would copy beyond the end of the source buffer.
Avoid this, and use size_t for val_len to avoid all the casts.
Similarly, avoid source buffer casts and use void *.

Additionally enforces val_len can be represented by u16 and that the DMA
buffer was not overflowed. Fixes the size of mfa, which is not
FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN (but it will be padded up to 4). This
was noticed by the future CONFIG_FORTIFY_SOURCE checks.

Cc: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-12 20:48:05 -04:00
..
csio_attr.c cxgb4: Cleanup macros so they follow the same style and look consistent, part 2 2014-11-10 12:57:10 -05:00
csio_defs.h
csio_hw_chip.h scsi: csiostor: add support for Chelsio T6 adapters 2017-06-12 20:48:04 -04:00
csio_hw_t5.c scsi: csiostor: add support for Chelsio T6 adapters 2017-06-12 20:48:04 -04:00
csio_hw.c scsi: csiostor: add support for Chelsio T6 adapters 2017-06-12 20:48:04 -04:00
csio_hw.h scsi: csiostor: switch to pci_alloc_irq_vectors 2017-04-06 12:57:03 -04:00
csio_init.c scsi: csiostor: add support for Chelsio T6 adapters 2017-06-12 20:48:04 -04:00
csio_init.h
csio_isr.c scsi: csiostor: switch to pci_alloc_irq_vectors 2017-04-06 12:57:03 -04:00
csio_lnode.c scsi: csiostor: Avoid content leaks and casts 2017-06-12 20:48:05 -04:00
csio_lnode.h
csio_mb.c csiostor:Use firmware version from cxgb4/t4fw_version.h 2015-02-04 14:00:30 -08:00
csio_mb.h RDMA/cxgb4/csiostor: Cleansup FW related macros/register defines for PF/VF and LDST 2014-11-22 16:57:47 -05:00
csio_rnode.c
csio_rnode.h
csio_scsi.c scsi: remove eh_timed_out methods in the transport template 2017-02-06 19:10:03 -05:00
csio_scsi.h
csio_wr.c scsi: csiostor: add support for Chelsio T6 adapters 2017-06-12 20:48:04 -04:00
csio_wr.h cxgb4: Cleanup macros so they follow the same style and look consistent, part 2 2014-11-10 12:57:10 -05:00
Kconfig scsi: use 'depends' instead of 'select' for SCSI_FC_ATTRS 2014-09-16 16:55:55 -04:00
Makefile csiostor:Removed file csio_hw_t4.c 2015-01-19 15:30:02 -05:00
t4fw_api_stor.h