Skip to contentSkip to conversation

asix: silence log message from oversize packet

PATCH In review Stephen Hemminger 2 participants 4 messages Dec 18, 2015 – Dec 19, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 asix: silence log message from oversize packet

Since it is possible for an external system to send oversize packets at anytime, it is best for driver not to print a message and spam the log (potential external DoS).

drivers/net/usb/asix_common.c +1 -1
@@ -118,7 +118,7 @@ int asix_rx_fixup_internal(struct usbnet
 				return 0;
 			}
 			if (size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) {
-				netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
+				netdev_dbg(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
 					   size);
 				return 0;
 			}
#2 lore raw
Quoted 7 lines · On Fri, 18 Dec 2015 16:08:53 -0500 (EST) David Miller <[email protected]>…

From: Stephen Hemminger <[email protected]>
Date: Thu, 17 Dec 2015 17:51:16 -0800

Quoted 4 lines

Since it is possible for an external system to send oversize packets at anytime, it is best for driver not to print a message and spam the log (potential external DoS).

Quoted 5 lines
Quoted 3 lines

Seems reasonable, applied, thanks Stephen.

It doesn't fix the bug that is generating the oversize packet, that still needs to be root caused.

maintainer
#3 lore raw

From: Stephen Hemminger <[email protected]>
Date: Fri, 18 Dec 2015 16:15:03 -0800

Quoted 10 lines
Quoted 7 lines · On Fri, 18 Dec 2015 16:08:53 -0500 (EST) David Miller <[email protected]>…

From: Stephen Hemminger <[email protected]>
Date: Thu, 17 Dec 2015 17:51:16 -0800

Quoted 4 lines

Since it is possible for an external system to send oversize packets at anytime, it is best for driver not to print a message and spam the log (potential external DoS).

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Seems reasonable, applied, thanks Stephen.

It doesn't fix the bug that is generating the oversize packet, that still needs to be root caused.

Remote systems can do this easily. It's not a bug in the driver.

Say you decrease the MTU to 500 or whatever, nothing in the hardware prevents reception of > 500 byte frames.

It's only a software limit.