linux/drivers/net/dsa/b53
Florian Fainelli cd526676de net: dsa: b53: Use strlcpy() for ethtool::get_strings
Our statistics strings are allocated at initialization without being
bound to a specific size, yet, we would copy ETH_GSTRING_LEN bytes using
memcpy() which would create out of bounds accesses, this was flagged by
KASAN. Replace this with strlcpy() to make sure we are bound the source
buffer size and we also always NUL-terminate strings.

Fixes: 967dd82ffc ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-06 11:12:39 -05:00
..
b53_common.c net: dsa: b53: Use strlcpy() for ethtool::get_strings 2018-03-06 11:12:39 -05:00
b53_mdio.c
b53_mmap.c
b53_priv.h net: dsa: remove trans argument from vlan ops 2017-12-02 21:18:55 -05:00
b53_regs.h net: dsa: b53: Define EEE register page 2017-09-19 16:08:53 -07:00
b53_spi.c
b53_srab.c net: dsa: b53: Add compatible strings for the Cygnus-family BCM11360. 2017-05-18 11:01:42 -04:00
Kconfig net: dsa: b53: Support prepended Broadcom tags 2017-11-13 10:34:54 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00