linux-stable/drivers/net/usb
Pavel Skripkin 46a8b29c63 net: usb: fix memory leak in smsc75xx_bind
Syzbot reported memory leak in smsc75xx_bind().
The problem was is non-freed memory in case of
errors after memory allocation.

backtrace:
  [<ffffffff84245b62>] kmalloc include/linux/slab.h:556 [inline]
  [<ffffffff84245b62>] kzalloc include/linux/slab.h:686 [inline]
  [<ffffffff84245b62>] smsc75xx_bind+0x7a/0x334 drivers/net/usb/smsc75xx.c:1460
  [<ffffffff82b5b2e6>] usbnet_probe+0x3b6/0xc30 drivers/net/usb/usbnet.c:1728

Fixes: d0cad87170 ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver")
Cc: stable@kernel.vger.org
Reported-and-tested-by: syzbot+b558506ba8165425fee2@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-24 14:26:25 -07:00
..
aqc111.c net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias 2020-11-12 14:58:27 -08:00
aqc111.h
asix.h
asix_common.c
asix_devices.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
ax88172a.c net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias 2020-11-12 14:58:27 -08:00
ax88179_178a.c net: usb: ax88179_178a: initialize local variables before use 2021-04-01 16:09:37 -07:00
catc.c
cdc-phonet.c net: cdc-phonet: fix data-interface release on probe failure 2021-03-18 19:45:37 -07:00
cdc_eem.c net: cdc_eem: fix URL to CDC EEM 1.0 spec 2021-05-14 15:17:18 -07:00
cdc_ether.c net: cdc_ether: record speed in status method 2021-04-06 16:22:37 -07:00
cdc_mbim.c net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias 2020-11-12 14:58:27 -08:00
cdc_ncm.c net: cdc_ncm: record speed in status method 2021-04-06 16:22:36 -07:00
cdc_subset.c
ch9200.c
cx82310_eth.c cx82310_eth: fix error return code in cx82310_bind() 2020-11-16 15:23:44 -08:00
dm9601.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
gl620a.c
hso.c net: hso: fix control-request directions 2021-05-24 13:16:58 -07:00
huawei_cdc_ncm.c
int51x1.c net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias 2020-11-12 14:58:27 -08:00
ipheth.c usbnet: ipheth: fix connectivity with iOS 14 2020-11-21 14:01:34 -08:00
kalmia.c
kaweth.c
Kconfig nt: usb: USB_RTL8153_ECM should not default to y 2021-01-14 10:51:06 -08:00
lan78xx.c net: lan78xx: advertise tx software timestamping support 2021-05-18 13:38:48 -07:00
lan78xx.h
lg-vl600.c
Makefile r8153_ecm: avoid to be prior to r8152 driver 2020-11-19 08:23:46 -08:00
mcs7830.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
net1080.c
pegasus.c net: usb: pegasus: use new tasklet API 2021-02-02 15:51:18 -08:00
pegasus.h
plusb.c
qmi_wwan.c net: usb: qmi_wwan: allow qmimux add/del with master up 2021-03-04 14:20:21 -08:00
r8152.c r8152: check the informaton of the device 2021-05-24 13:15:29 -07:00
r8153_ecm.c r8153_ecm: Add Lenovo Powered USB-C Hub as a fallback of r8152 2021-01-12 20:00:51 -08:00
rndis_host.c rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request 2021-01-11 17:54:40 -08:00
rtl8150.c net: usb: rtl8150: use new tasklet API 2021-02-02 15:51:18 -08:00
sierra_net.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
smsc75xx.c net: usb: fix memory leak in smsc75xx_bind 2021-05-24 14:26:25 -07:00
smsc75xx.h
smsc95xx.c net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias 2020-11-12 14:58:27 -08:00
smsc95xx.h
sr9700.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
sr9700.h
sr9800.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
sr9800.h
usbnet.c usbnet: add method for reporting speed without MII 2021-04-06 16:22:36 -07:00
zaurus.c