linux/drivers/net
Pavel Skripkin a0b96b4a62 drivers: net: fix memory leak in peak_usb_create_dev
syzbot reported memory leak in peak_usb.
The problem was in case of failure after calling
->dev_init()[2] in peak_usb_create_dev()[1]. The data
allocated int dev_init() wasn't freed, so simple
->dev_free() call fix this problem.

backtrace:
    [<0000000079d6542a>] kmalloc include/linux/slab.h:552 [inline]
    [<0000000079d6542a>] kzalloc include/linux/slab.h:682 [inline]
    [<0000000079d6542a>] pcan_usb_fd_init+0x156/0x210 drivers/net/can/usb/peak_usb/pcan_usb_fd.c:868   [2]
    [<00000000c09f9057>] peak_usb_create_dev drivers/net/can/usb/peak_usb/pcan_usb_core.c:851 [inline] [1]
    [<00000000c09f9057>] peak_usb_probe+0x389/0x490 drivers/net/can/usb/peak_usb/pcan_usb_core.c:949

Reported-by: syzbot+91adee8d9ebb9193d22d@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-04-01 15:55:15 -07:00
..
appletalk
arcnet net: arcnet: com20020 fix error handling 2021-03-14 14:17:48 -07:00
bonding Revert "net: bonding: fix error return code of bond_neigh_init()" 2021-03-12 12:15:03 -08:00
caif TTY/Serial driver changes for 5.12-rc1 2021-02-20 21:28:04 -08:00
can drivers: net: fix memory leak in peak_usb_create_dev 2021-04-01 15:55:15 -07:00
dsa net: dsa: lantiq_gswip: Let GSWIP automatically set the xMII clock 2021-03-25 16:53:38 -07:00
ethernet net/mlx5e: Guarantee room for XSK wakeup NOP on async ICOSQ 2021-03-31 13:12:24 -07:00
fddi
fjes
hamradio module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
hippi
hyperv hv_netvsc: Fix validation in netvsc_linkstatus_callback() 2021-03-01 15:30:52 -08:00
ieee802154 drivers: net: fix memory leak in atusb_probe 2021-04-01 15:46:45 -07:00
ipa net: ipa: fix init header command validation 2021-03-20 18:53:41 -07:00
ipvlan
mdio net: mdio: Remove of_phy_attach() 2021-02-17 13:17:49 -08:00
mhi net: mhi: Add mbim proto 2021-02-10 15:11:51 -08:00
netdevsim netdevsim: init u64 stats for 32bit hardware 2021-03-04 14:36:26 -08:00
pcs
phy net: phy: broadcom: Only advertise EEE for supported modes 2021-03-30 17:39:23 -07:00
plip
ppp TTY/Serial driver changes for 5.12-rc1 2021-02-20 21:28:04 -08:00
slip
team
usb r8152: limit the RX buffer size of RTL8153A for USB 2.0 2021-03-19 11:55:09 -07:00
vmxnet3
wan drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit 2021-03-28 18:08:43 -07:00
wireguard wireguard: queueing: get rid of per-peer ring buffers 2021-02-23 15:59:34 -08:00
wireless module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
xen-netback Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2021-03-09 17:15:56 -08:00
bareudp.c
dummy.c
eql.c
geneve.c geneve: do not modify the shared tunnel info when PMTU triggers an ICMP reply 2021-03-25 17:27:30 -07:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-02-23 11:29:52 -08:00
ifb.c
Kconfig crypto: mips/poly1305 - enable for all MIPS processors 2021-03-08 11:52:17 +01:00
LICENSE.SRC
loopback.c Revert "net-loopback: set lo dev initial state to UP" 2021-02-11 13:10:44 -08:00
macsec.c
macvlan.c
macvtap.c
Makefile net: mhi: Add dedicated folder 2021-02-10 15:11:51 -08:00
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c net: fix dev_ifsioc_locked() race condition 2021-02-11 18:14:19 -08:00
thunderbolt.c
tun.c net: fix dev_ifsioc_locked() race condition 2021-02-11 18:14:19 -08:00
veth.c veth: Store queue_mapping independently of XDP prog presence 2021-03-06 00:04:52 +01:00
virtio_net.c virtio: features, fixes 2021-02-25 12:21:08 -08:00
vrf.c
vsockmon.c
vxlan.c vxlan: do not modify the shared tunnel info when PMTU triggers an ICMP reply 2021-03-25 17:27:30 -07:00
xen-netfront.c