Subject: CVE-2021-47495: usbnet: sanity check for maxpacket

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

usbnet: sanity check for maxpacket

maxpacket of 0 makes no sense and oopses as we need to divide
by it. Give up.

V2: fixed typo in log and stylistic issues

The Linux kernel CVE team has assigned CVE-2021-47495 to this issue.

Affected and fixed versions
===========================

	Fixed in 4.4.291 with commit b9eba0a4a527
	Fixed in 4.9.289 with commit 524f333e9813
	Fixed in 4.14.254 with commit 74b3b27cf9fe
	Fixed in 4.19.215 with commit 002d82227c0a
	Fixed in 5.4.157 with commit 492140e45d2b
	Fixed in 5.10.77 with commit 693ecbe8f799
	Fixed in 5.14.16 with commit 7e8b6a4f18ed
	Fixed in 5.15 with commit 397430b50a36

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2021-47495
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	drivers/net/usb/usbnet.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/b9eba0a4a527e04d712f0e0401e5391ef124b33e
	https://git.kernel.org/stable/c/524f333e98138d909a0a0c574a9ff6737dce2767
	https://git.kernel.org/stable/c/74b3b27cf9fecce00cd8918b7882fd81191d0aa4
	https://git.kernel.org/stable/c/002d82227c0abe29118cf80f7e2f396b22d448ed
	https://git.kernel.org/stable/c/492140e45d2bf27c1014243f8616a9b612144e20
	https://git.kernel.org/stable/c/693ecbe8f799405f8775719deedb1f76265d375a
	https://git.kernel.org/stable/c/7e8b6a4f18edee070213cb6a77118e8a412253c5
	https://git.kernel.org/stable/c/397430b50a363d8b7bdda00522123f82df6adc5e