]> git.baikalelectronics.ru Git - kernel.git/commit
net: usb: smsc75xx: Limit packet length to skb->len
authorSzymon Heidrich <szymon.heidrich@gmail.com>
Mon, 13 Mar 2023 22:00:45 +0000 (23:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:28:06 +0000 (13:28 +0100)
commitc3b1dd85ab92a0c0f6ed9a3b8a50bdb8f0f31300
treef81aba0affb284a84efe894acefe90bb906e99a4
parent2156b262b6a84ce6117114c1570b6661dcdd9e37
net: usb: smsc75xx: Limit packet length to skb->len

[ Upstream commit d8b228318935044dafe3a5bc07ee71a1f1424b8d ]

Packet length retrieved from skb data may be larger than
the actual socket buffer length (up to 9026 bytes). In such
case the cloned skb passed up the network stack will leak
kernel memory contents.

Fixes: 1f4fa502fc00 ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver")
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/smsc75xx.c