linux_dsm_epyc7002/drivers/net/ethernet/brocade
Kees Cook 9e4eb1ce47 bna: 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:41 -04:00
..
bna bna: Avoid reading past end of buffer 2017-05-08 14:41:41 -04:00
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile bna: QLogic BR-series Adapters Driver Rebranding 2015-02-21 22:05:22 -05:00