]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 May 2022 08:02:42 +0000 (11:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 May 2022 06:59:41 +0000 (07:59 +0100)
commit9a1ac7adaf5400dbdf21a246e6b97db8788a7313
tree26e045ee1b365d706f6cc4acc16acd38c0e1cd47
parentda22c11218867f8797ef61a715a128099e0d72d0
net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()

The "fsp->location" variable comes from user via ethtool_get_rxnfc().
Check that it is valid to prevent an out of bounds read.

Fixes: 754bb21bfd99 ("net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c