sst-linux/drivers/net/ethernet
Tobias Waldekranz b3f48a41a0 net: mvpp2: Prevent parser TCAM memory corruption
[ Upstream commit 96844075226b49af25a69a1d084b648ec2d9b08d ]

Protect the parser TCAM/SRAM memory, and the cached (shadow) SRAM
information, from concurrent modifications.

Both the TCAM and SRAM tables are indirectly accessed by configuring
an index register that selects the row to read or write to. This means
that operations must be atomic in order to, e.g., avoid spreading
writes across multiple rows. Since the shadow SRAM array is used to
find free rows in the hardware table, it must also be protected in
order to avoid TOCTOU errors where multiple cores allocate the same
row.

This issue was detected in a situation where `mvpp2_set_rx_mode()` ran
concurrently on two CPUs. In this particular case the
MVPP2_PE_MAC_UC_PROMISCUOUS entry was corrupted, causing the
classifier unit to drop all incoming unicast - indicated by the
`rx_classifier_drops` counter.

Fixes: 3f518509de ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250401065855.3113635-1-tobias@waldekranz.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:33:40 +02:00
..
3com
8390
actions
adaptec
adi net: ethernet: adi: adin1110: Fix some error handling path in adin1110_read_fifo() 2024-10-17 15:22:20 +02:00
aeroflex net: ethernet: aeroflex: fix potential memory leak in greth_start_xmit_gbit() 2024-11-01 01:55:59 +01:00
agere
alacritech
allwinner
alteon
altera
amazon net: ena: Fix DMA syncing in XDP path when SWIOTLB is on 2024-06-12 11:03:59 +02:00
amd net: ethernet: xgbe: re-add aneg to supported features in PHY quirks 2025-01-23 17:17:13 +01:00
apm
apple
aquantia net: atlantic: fix warning during hot unplug 2025-02-21 13:49:37 +01:00
arc net: arc: rockchip: fix emac mdio node support 2024-11-14 13:15:12 +01:00
asix
atheros ethernet: atheros: fix a memleak in atl1e_setup_ring_resources 2024-01-01 12:38:56 +00:00
broadcom eth: bnxt: do not update checksum in bnxt_xdp_build_skb() 2025-03-28 21:58:49 +01:00
brocade bna: adjust 'name' buf size of bna_tcb and bna_ccb structures 2024-08-03 08:49:09 +02:00
cadence net: cadence: macb: Synchronize stats calculations 2025-03-07 16:56:45 +01:00
calxeda
cavium ptp: convert remaining drivers to adjfine interface 2024-12-14 19:54:21 +01:00
chelsio cxgb4: Avoid removal of uninserted tid 2025-01-17 13:34:39 +01:00
cirrus
cisco enic: Validate length of nl attributes in enic_set_vf_port 2024-06-12 11:03:56 +02:00
cortina net: ethernet: cortina: Restore TSO support 2024-10-17 15:22:28 +02:00
davicom net: davicom: fix UAF in dm9000_drv_remove 2025-02-21 13:49:23 +01:00
dec
dlink
emulex be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink 2025-03-13 12:53:17 +01:00
engleder tsnep: Fix tsnep_request_irq() format-overflow warning 2023-11-28 17:06:56 +00:00
ezchip
faraday net: ftgmac100: Ensure tx descriptor updates are visible 2024-09-30 16:23:47 +02:00
freescale net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs() 2025-03-07 16:56:49 +01:00
fujitsu
fungible
google gve: Fixes for napi_poll when budget is 0 2024-12-14 19:54:53 +01:00
hisilicon net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error 2025-03-13 12:53:18 +01:00
huawei net: hinic: Fix cleanup in create_rxqs/txqs() 2024-12-27 13:52:54 +01:00
i825xx net/sun3_82586: fix potential memory leak in sun3_82586_send_packet() 2024-11-01 01:56:03 +01:00
ibm ibmvnic: Inspect header requirements before using scrq direct 2025-03-13 12:53:10 +01:00
intel ice: fix memory leak in aRFS after reset 2025-03-28 21:58:48 +01:00
litex
marvell net: mvpp2: Prevent parser TCAM memory corruption 2025-04-10 14:33:40 +02:00
mediatek net: ethernet: mtk-star-emac: set mac_managed_pm when probing 2024-07-18 13:18:34 +02:00
mellanox net/mlx5e: SHAMPO, Make reserved size independent of page size 2025-04-10 14:33:37 +02:00
micrel net: ks8851: Fix potential TX stall after interface reopen 2024-07-18 13:18:38 +02:00
microchip net: sparx5: fix the maximum frame length register 2024-12-19 18:08:55 +01:00
microsoft net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup 2024-09-12 11:10:27 +02:00
moxa
mscc net: mscc: ocelot: fix incorrect IFH SRC_PORT field in ocelot_ifh_set_basic() 2024-12-27 13:52:54 +01:00
myricom
natsemi
neterion
netronome nfp: bpf: Add check for nfp_app_ctrl_msg_alloc() 2025-03-07 16:56:38 +01:00
ni
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: use ee->offset when returning sprom data 2024-12-27 13:52:54 +01:00
qlogic qlcnic: fix memory leak issues in qlcnic_sriov_common.c 2025-03-28 21:58:57 +01:00
qualcomm qca_spi: Make driver probing reliable 2024-12-19 18:08:55 +01:00
rdc
realtek r8169: don't apply UDP padding quirk on RTL8126A 2024-12-14 19:54:40 +01:00
renesas net: sh_eth: Fix missing rtnl lock in suspend/resume path 2025-02-21 13:49:23 +01:00
rocker rocker: fix link status detection in rocker_carrier_init() 2024-12-14 19:54:45 +01:00
samsung
seeq net: seeq: Fix use after free vulnerability in ether3 Driver Due to Race Condition 2024-10-17 15:21:13 +02:00
sfc ptp: convert remaining drivers to adjfine interface 2024-12-14 19:54:21 +01:00
sgi
silan
sis
smsc net: smc91x: Fix m68k kernel compilation for ColdFire CPU 2024-06-12 11:02:56 +02:00
socionext
stmicro net: stmmac: restructure the error path of stmmac_probe_config_dt() 2025-01-09 13:29:59 +01:00
sun eth: sungem: remove .ndo_poll_controller to avoid deadlocks 2024-06-12 11:03:18 +02:00
sunplus
synopsys
tehuti
ti net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns() 2025-02-21 13:49:06 +01:00
toshiba net: spider_net: Use size_add() in call to struct_size() 2023-11-20 11:51:52 +01:00
tundra
vertexcom net: vertexcom: mse102x: Fix tx_bytes calculation 2024-11-22 15:37:28 +01:00
via
wangxun
wiznet
xilinx net: axienet: Set mac_managed_pm 2025-03-07 16:56:36 +01:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: ethernet: use ip_hdrlen() instead of bit shift 2024-09-18 19:23:02 +02:00
jme.h
Kconfig net: restore alpha order to Ethernet devices in config 2024-03-06 14:45:04 +00:00
korina.c
lantiq_etop.c net: ethernet: lantiq_etop: fix memory disclosure 2024-10-17 15:21:32 +02:00
lantiq_xrx200.c
Makefile