Subject: CVE-2022-48743: net: amd-xgbe: Fix skb data length underflow

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

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

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

net: amd-xgbe: Fix skb data length underflow

There will be BUG_ON() triggered in include/linux/skbuff.h leading to
intermittent kernel panic, when the skb length underflow is detected.

Fix this by dropping the packet if such length underflows are seen
because of inconsistencies in the hardware descriptors.

The Linux kernel CVE team has assigned CVE-2022-48743 to this issue.

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

	Issue introduced in 4.9.19 with commit fafc9555d87a and fixed in 4.9.300 with commit 9924c80bd484
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 4.14.265 with commit 617f9934bb37
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 4.19.228 with commit 34aeb4da20f9
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 5.4.177 with commit 9892742f035f
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 5.10.97 with commit 4d3fcfe84648
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 5.15.20 with commit db6fd92316a2
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 5.16.6 with commit e8f73f620fee
	Issue introduced in 4.11 with commit 622c36f143fc and fixed in 5.17 with commit 5aac9108a180
	Issue introduced in 4.4.58 with commit ae43f9360a21
	Issue introduced in 4.10.7 with commit ae9d577f3dbb

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-2022-48743
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/ethernet/amd/xgbe/xgbe-drv.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/9924c80bd484340191e586110ca22bff23a49f2e
	https://git.kernel.org/stable/c/617f9934bb37993b9813832516f318ba874bcb7d
	https://git.kernel.org/stable/c/34aeb4da20f93ac80a6291a2dbe7b9c6460e9b26
	https://git.kernel.org/stable/c/9892742f035f7aa7dcd2bb0750effa486db89576
	https://git.kernel.org/stable/c/4d3fcfe8464838b3920bc2b939d888e0b792934e
	https://git.kernel.org/stable/c/db6fd92316a254be2097556f01bccecf560e53ce
	https://git.kernel.org/stable/c/e8f73f620fee5f52653ed2da360121e4446575c5
	https://git.kernel.org/stable/c/5aac9108a180fc06e28d4e7fb00247ce603b72ee