mirror_ubuntu-kernels/drivers/net/ethernet/marvell
Hangyu Hua 51fe0a4705 net: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc()
rules is allocated in ethtool_get_rxnfc and the size is determined by
rule_cnt from user space. So rule_cnt needs to be check before using
rules to avoid OOB writing or NULL pointer dereference.

Fixes: 90b509b39a ("net: mvpp2: cls: Add Classification offload support")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Reviewed-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-09-11 08:26:10 +01:00
..
mvpp2 net: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc() 2023-09-11 08:26:10 +01:00
octeon_ep Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-18 12:44:56 -07:00
octeontx2 octeontx2-pf: Fix page pool cache index corruption. 2023-09-10 19:29:15 +01:00
prestera Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-10 14:10:53 -07:00
Kconfig net: ethernet: Add missing depends on MDIO_DEVRES 2023-04-12 20:38:48 -07:00
Makefile octeon_ep: Add driver framework and device initialization 2022-04-13 12:56:32 +01:00
mv643xx_eth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-10 17:43:53 -08:00
mvmdio.c net/marvell: fix Wvoid-pointer-to-enum-cast warning 2023-08-11 09:58:45 +01:00
mvneta_bm.c
mvneta_bm.h
mvneta.c page_pool: split types and declarations from page_pool.h 2023-08-07 13:05:19 -07:00
pxa168_eth.c net: marvell: pxa168_eth: drop of_match_ptr for ID table 2023-03-15 08:02:45 +00:00
skge.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
skge.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00
sky2.c sky2: Remove redundant NULL check for debugfs_create_dir 2023-08-18 15:31:46 -07:00
sky2.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00