linux/drivers/net/usb
Linyu Yuan 05b2b9f7d2 net: cdc_eem: fix tx fixup skb leak
[ Upstream commit c3b26fdf1b ]

when usbnet transmit a skb, eem fixup it in eem_tx_fixup(),
if skb_copy_expand() failed, it return NULL,
usbnet_start_xmit() will have no chance to free original skb.

fix it by free orginal skb in eem_tx_fixup() first,
then check skb clone status, if failed, return NULL to usbnet.

Fixes: 9f722c0978 ("usbnet: CDC EEM support (v5)")
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-23 14:42:47 +02:00
..
aqc111.c
aqc111.h
asix_common.c
asix_devices.c
asix.h
ax88172a.c
ax88179_178a.c net: usb: ax88179_178a: initialize local variables before use 2021-05-07 11:04:31 +02:00
catc.c
cdc_eem.c net: cdc_eem: fix tx fixup skb leak 2021-06-23 14:42:47 +02:00
cdc_ether.c r8152: Add Lenovo Powered USB-C Travel Hub 2021-01-19 18:27:22 +01:00
cdc_mbim.c
cdc_ncm.c net: cdc_ncm: switch to eth%d interface naming 2021-06-23 14:42:45 +02:00
cdc_subset.c
cdc-phonet.c net: cdc-phonet: fix data-interface release on probe failure 2021-03-30 14:32:02 +02:00
ch9200.c
cx82310_eth.c
dm9601.c
gl620a.c
hso.c net: hso: bail out on interrupt URB allocation failure 2021-06-03 09:00:51 +02:00
huawei_cdc_ncm.c
int51x1.c
ipheth.c
kalmia.c
kaweth.c
Kconfig
lan78xx.c
lan78xx.h
lg-vl600.c
Makefile
mcs7830.c
net1080.c
pegasus.c
pegasus.h
plusb.c
qmi_wwan.c net: usb: qmi_wwan: allow qmimux add/del with master up 2021-03-17 17:06:15 +01:00
r8152.c r8152: limit the RX buffer size of RTL8153A for USB 2.0 2021-03-30 14:32:02 +02:00
rndis_host.c rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request 2021-01-23 16:04:01 +01:00
rtl8150.c
sierra_net.c
smsc75xx.c net: usb: fix possible use-after-free in smsc75xx_bind 2021-06-23 14:42:46 +02:00
smsc75xx.h
smsc95xx.c
smsc95xx.h
sr9700.c
sr9700.h
sr9800.c
sr9800.h
usbnet.c
zaurus.c