]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usbnet: sanity checking of packet sizes and device mtu
authorOliver Neukum <oneukum@suse.com>
Thu, 19 Sep 2019 08:23:08 +0000 (10:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 10:30:14 +0000 (12:30 +0200)
commit55416208602b20a5079a75dbef901feb8f1e9c69
tree8aa9d0c8d904ef369bfc87fb9e24e54785ec6fdf
parent96f23cb83539bb569a02b5524a62c18c7b8c40e2
usbnet: sanity checking of packet sizes and device mtu

[ Upstream commit 280ceaed79f18db930c0cc8bb21f6493490bf29c ]

After a reset packet sizes and device mtu can change and need
to be reevaluated to calculate queue sizes.
Malicious devices can set this to zero and we divide by it.
Introduce sanity checking.

Reported-and-tested-by: syzbot+6102c120be558c885f04@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/usbnet.c