mirror-linux/drivers/net/usb
Szymon Heidrich 8327104c28 net: usb: sr9700: Handle negative len
[ Upstream commit ecf7cf8efb ]

Packet len computed as difference of length word extracted from
skb data and four may result in a negative value. In such case
processing of the buffer should be interrupted rather than
setting sr_skb->len to an unexpectedly large value (due to cast
from signed to unsigned integer) and passing sr_skb to
usbnet_skb_return.

Fixes: e9da0b56fe ("sr9700: sanity check for packet length")
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Link: https://lore.kernel.org/r/20230114182326.30479-1-szymon.heidrich@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:34:19 +01:00
..
Kconfig
Makefile
aqc111.c
aqc111.h
asix.h
asix_common.c
asix_devices.c
ax88172a.c
ax88179_178a.c
catc.c
cdc-phonet.c
cdc_eem.c
cdc_ether.c
cdc_mbim.c
cdc_ncm.c net/cdc_ncm: Fix multicast RX support for CDC NCM devices with ZLP 2022-11-23 13:46:42 +00:00
cdc_subset.c
ch9200.c
cx82310_eth.c
dm9601.c
gl620a.c
hso.c
huawei_cdc_ncm.c
int51x1.c
ipheth.c
kalmia.c
kaweth.c
lan78xx.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
lan78xx.h
lg-vl600.c
mcs7830.c
net1080.c
pegasus.c
pegasus.h
plusb.c
qmi_wwan.c net: usb: qmi_wwan: add u-blox 0x1342 composition 2022-11-23 12:47:54 +00:00
r8152.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
r8153_ecm.c
rndis_host.c usb: rndis_host: Secure rndis_query check against int overflow 2023-01-12 12:02:29 +01:00
rtl8150.c
sierra_net.c
smsc75xx.c
smsc75xx.h
smsc95xx.c net: usb: smsc95xx: fix external PHY reset 2022-11-17 10:38:37 +01:00
smsc95xx.h
sr9700.c net: usb: sr9700: Handle negative len 2023-02-01 08:34:19 +01:00
sr9700.h
sr9800.c
sr9800.h
usbnet.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
zaurus.c