]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Sep 2019 11:27:11 +0000 (13:27 +0200)
commit5c96f59fff114a7fcc1b5b000c6abf5528c963b4
treeedbf7f8852963bf643f54508afe877c5cec46857
parentf595b936e907c2cbb7af5624dbb1b5b4e7d70d5b
usbnet: sanity checking of packet sizes and device mtu

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>
drivers/net/usb/usbnet.c