]> git.itanic.dy.fi Git - linux-stable/commit
net: ethernet: mtk_eth_soc: check max allowed hash in mtk_ppe_check_skb
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 5 Sep 2022 12:41:28 +0000 (14:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 08:47:17 +0000 (10:47 +0200)
commite484616810f83f70f58e5ad0d5e708332cb1708f
treee401ce10a4587aa6b6f206a1744d7887114880bc
parent0378b06e612e51d94312def1fc5fbd357d7d83f7
net: ethernet: mtk_eth_soc: check max allowed hash in mtk_ppe_check_skb

[ Upstream commit f27b405ef43319a3ceefc2123245201a63ed4e00 ]

Even if max hash configured in hw in mtk_ppe_hash_entry is
MTK_PPE_ENTRIES - 1, check theoretical OOB accesses in
mtk_ppe_check_skb routine

Fixes: c4f033d9e03e9 ("net: ethernet: mtk_eth_soc: rework hardware flow table management")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mediatek/mtk_ppe.h