Szymon Heidrich 7f247f5a2c net: usb: lan78xx: Limit packet length to skb->len
Packet length retrieved from descriptor may be larger than
the actual socket buffer length. In such case the cloned
skb passed up the network stack will leak kernel memory contents.

Additionally prevent integer underflow when size is less than
ETH_FCS_LEN.

Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-03-20 10:15:15 +00:00
..
2022-08-26 10:00:52 +01:00
2021-10-02 14:18:25 +01:00
2022-07-01 13:39:03 +01:00
2022-08-26 10:00:52 +01:00
2023-01-17 11:50:42 +01:00