linux/drivers/net/ethernet/brocade/bna
Kees Cook 4dc69c1c1f bna: ethtool: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-08 14:41:42 -04:00
..
Kconfig
Makefile
bfa_cee.c
bfa_cee.h
bfa_cs.h
bfa_defs.h
bfa_defs_cna.h
bfa_defs_mfg_comm.h
bfa_defs_status.h
bfa_ioc.c
bfa_ioc.h
bfa_ioc_ct.c
bfa_msgq.c
bfa_msgq.h
bfi.h
bfi_cna.h
bfi_enet.h
bfi_reg.h
bna.h
bna_enet.c
bna_hw_defs.h
bna_tx_rx.c
bna_types.h
bnad.c
bnad.h
bnad_debugfs.c
bnad_ethtool.c
cna.h
cna_fwimg.c