ax88172a: fix information leak on short answers
authorOliver Neukum <oneukum@suse.com>
Thu, 14 Nov 2019 10:16:01 +0000 (11:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 16:59:26 +0000 (17:59 +0100)
commit63a44739bc53dbd44529b7e9ca641d88f151c7cb
treee12682f4c0b6f0812029f0c0e3861001285b614d
parenteda6c45adcf79f6a82a150e9a094f254689ef368
ax88172a: fix information leak on short answers

[ Upstream commit a9a51bd727d141a67b589f375fe69d0e54c4fe22 ]

If a malicious device gives a short MAC it can elicit up to
5 bytes of leaked memory out of the driver. We need to check for
ETH_ALEN instead.

Reported-by: syzbot+a8d4acdad35e6bbca308@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/ax88172a.c