Home
last modified time | relevance | path

Searched hist:"2 ebf775f0541ae0d474836fa0cf3220e502f8e3e" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/usb/
H A Daqc111.cdiff 2ebf775f0541ae0d474836fa0cf3220e502f8e3e Wed Nov 15 04:08:57 CST 2023 Oliver Neukum <oneukum@suse.com> usb: aqc111: check packet for fixup for true limit

[ Upstream commit ccab434e674ca95d483788b1895a70c21b7f016a ]

If a device sends a packet that is inbetween 0
and sizeof(u64) the value passed to skb_trim()
as length will wrap around ending up as some very
large value.

The driver will then proceed to parse the header
located at that position, which will either oops or
process some random value.

The fix is to check against sizeof(u64) rather than
0, which the driver currently does. The issue exists
since the introduction of the driver.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>