ax88172a: fix information leak on short answers
Subsystems (3)
PATCH 1/1 ax88172a: fix information leak on short answers
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 [email protected]
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/net/usb/ax88172a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/ax88172a.c +1 -1
@@ -196,7 +196,7 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf)/* Get the MAC address */ ret =asix_read_cmd (dev,AX_CMD_READ_NODE_ID ,0 ,0 ,ETH_ALEN , buf,0 ); -if (ret <0 ) { +if (ret <ETH_ALEN ) {netdev_err (dev->net,"Failed to read MAC address: %d\n" , ret); goto free; }
Signature · 1 line
2.16.4
David Miller
maintainerFrom: Oliver Neukum <[email protected]>
Date: Thu, 14 Nov 2019 11:16:01 +0100
Quoted 6 lines
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_ALENinstead.Reported-by [email protected]Signed-off-by Oliver Neukum <[email protected]>
Applied and queued up for -stable.