]> www.infradead.org Git - users/dwmw2/linux.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 11:13:18 +0000 (13:13 +0200)
commit3ef1d54a72ca18055a5357a73246632c4dc8070c
tree38e40555bdbe60ef28d4d35743b83459d2f2dddc
parentb5e57553acde4758ceb17d986129d62d5cbb8472
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