linux_dsm_epyc7002/drivers/scsi/qedf
Kees Cook cd22874fec scsi: qedf: Avoid reading past end of buffer
Using memcpy() from a string that is shorter than the length copied
means the destination buffer is being filled with arbitrary data from
the kernel rodata segment. Instead, use strncpy() which will fill the
trailing bytes with zeros.

This was found with the future CONFIG_FORTIFY_SOURCE feature.

Cc: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-05-08 22:07:48 -04:00
..
drv_fcoe_fw_funcs.c
drv_fcoe_fw_funcs.h
drv_scsi_fw_funcs.c
drv_scsi_fw_funcs.h
Kconfig
Makefile
qedf_attr.c
qedf_dbg.c
qedf_dbg.h
qedf_debugfs.c
qedf_els.c scsi: qedf: properly update arguments position in function call 2017-05-08 21:48:31 -04:00
qedf_fip.c
qedf_hsi.h
qedf_io.c
qedf_main.c scsi: qedf: Avoid reading past end of buffer 2017-05-08 22:07:48 -04:00
qedf_version.h
qedf.h scsi: qedf: Cleanup the type of io_log->op 2017-05-08 21:51:39 -04:00