Szymon Heidrich ecf7cf8efb net: usb: sr9700: Handle negative len
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: e9da0b56fe27 ("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>
2023-01-17 11:50:42 +01:00
..
2022-12-30 10:47:25 -08:00
2022-12-13 15:22:14 -08:00
2022-12-19 12:33:32 -06:00
2023-01-12 17:02:20 -06:00
2022-12-16 03:49:24 -08:00
2023-01-12 17:02:20 -06:00
2022-12-12 16:39:38 -08:00
2022-12-19 07:13:33 -06:00
2023-01-12 05:56:06 -06:00
2022-12-08 13:03:47 -08:00
2022-12-19 08:54:17 -06:00
2022-12-21 09:37:14 -08:00
2022-12-16 03:49:24 -08:00
2023-01-12 17:02:20 -06:00
2022-12-13 15:47:48 -08:00
2022-12-13 13:09:38 -08:00
2022-12-11 21:25:58 +01:00
2022-12-16 03:49:24 -08:00
2023-01-12 17:02:20 -06:00
2022-12-19 08:34:39 -06:00
2022-12-13 15:22:14 -08:00
2022-12-21 09:19:24 -08:00
2022-12-23 12:00:24 -08:00
2022-12-13 13:41:26 -08:00
2023-01-17 11:50:42 +01:00
2023-01-06 13:12:42 -08:00
2023-01-12 17:02:20 -06:00
2022-12-19 08:40:58 -06:00
2022-12-13 15:47:48 -08:00
2022-12-21 09:41:28 -08:00
2022-12-21 09:19:24 -08:00
2023-01-06 13:12:42 -08:00
2023-01-12 17:02:20 -06:00
2022-12-19 16:07:59 -06:00
2022-12-19 08:47:33 -06:00
2022-12-14 08:58:51 -08:00
2022-12-12 10:17:08 -08:00
2023-01-12 17:02:20 -06:00
2023-01-12 17:02:20 -06:00
2022-12-16 03:54:54 -08:00
2023-01-12 17:02:20 -06:00
2022-12-16 03:49:24 -08:00
2022-12-17 08:34:01 -06:00
2023-01-12 17:02:20 -06:00