]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: amd-xgbe: Fix skb data length underflow
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Thu, 27 Jan 2022 09:20:03 +0000 (14:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Feb 2022 11:39:57 +0000 (12:39 +0100)
commite8f73f620fee5f52653ed2da360121e4446575c5
tree2207914f2e34a65c526422953e17ce6617b6e0f5
parentdc2c6fdbfc1af540eb0e8a81bf330a747846931f
net: amd-xgbe: Fix skb data length underflow

commit 5aac9108a180fc06e28d4e7fb00247ce603b72ee upstream.

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.

Fixes: 622c36f143fc ("amd-xgbe: Fix jumbo MTU processing on newer hardware")
Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20220127092003.2812745-1-Shyam-sundar.S-k@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c