]> 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:33:47 +0000 (13:33 +0100)
commit4773532ba300a85a49c2baa9677aab9b86164d30
tree81e33f2887729767e540d4dd6d77c031d41405e1
parent5158461513da9edeb9d8085b580f7ad3ea22f092
net: usb: smsc75xx: Limit packet length to skb->len

[ Upstream commit 3c2ba0569ebce00c92baf3ebcc035bf8b4c97acb ]

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