lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1102700056.29198.1536169142144@email.1und1.de>
Date:   Wed, 5 Sep 2018 19:39:02 +0200 (CEST)
From:   Stefan Wahren <stefan.wahren@...e.com>
To:     raghuramchary.jallipalli@...rochip.com,
        unglinuxdriver@...rochip.com
Cc:     davem@...emloft.net, netdev@...r.kernel.org
Subject: smsc95xx: Invalid max MTU

Hi,

recently there was a user who reports that his Raspberry Pi 3B didn't work as expected [1].

The problem is that the smsc95xx driver accepts to high MTU values ( > 9000) from userspace like dhcp-client, but according to the LAN9500 databook the chip seems only capable to handle MTU sizes <= 1500.

It looks like that smsc95xx slipped through the cracks during the creation of commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers"). Unfortunately i don't have all the chips listed in this driver.

So my questions would be the following patch correct:

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 06b4d29..420a0e4 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1318,6 +1318,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
 	dev->net->ethtool_ops = &smsc95xx_ethtool_ops;
 	dev->net->flags |= IFF_MULTICAST;
 	dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD_CSUM;
+	dev->net->max_mtu = ETH_DATA_LEN;
 	dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
 
 	pdata->dev = dev;

[1] - https://github.com/raspberrypi/linux/issues/2660

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ