mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
cd22874fec
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> |
||
---|---|---|
.. | ||
drv_fcoe_fw_funcs.c | ||
drv_fcoe_fw_funcs.h | ||
drv_scsi_fw_funcs.c | ||
drv_scsi_fw_funcs.h | ||
Kconfig | ||
Makefile | ||
qedf.h | ||
qedf_attr.c | ||
qedf_dbg.c | ||
qedf_dbg.h | ||
qedf_debugfs.c | ||
qedf_els.c | ||
qedf_fip.c | ||
qedf_hsi.h | ||
qedf_io.c | ||
qedf_main.c | ||
qedf_version.h |