linux-stable/drivers/net
Ivan Vecera ea2a1cfc3b i40e: Fix VF MAC filter removal
Commit 73d9629e1c ("i40e: Do not allow untrusted VF to remove
administratively set MAC") fixed an issue where untrusted VF was
allowed to remove its own MAC address although this was assigned
administratively from PF. Unfortunately the introduced check
is wrong because it causes that MAC filters for other MAC addresses
including multi-cast ones are not removed.

<snip>
	if (ether_addr_equal(addr, vf->default_lan_addr.addr) &&
	    i40e_can_vf_change_mac(vf))
		was_unimac_deleted = true;
	else
		continue;

	if (i40e_del_mac_filter(vsi, al->list[i].addr)) {
	...
</snip>

The else path with `continue` effectively skips any MAC filter
removal except one for primary MAC addr when VF is allowed to do so.
Fix the check condition so the `continue` is only done for primary
MAC address.

Fixes: 73d9629e1c ("i40e: Do not allow untrusted VF to remove administratively set MAC")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240329180638.211412-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-04-01 21:33:08 -07:00
..
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-03-07 10:29:36 -08:00
caif
can can: kvaser_pciefd: Add additional Xilinx interrupts 2024-03-19 15:26:01 +01:00
dsa net: dsa: mv88e6xxx: fix usable ports on 88e6020 2024-03-29 11:59:24 -07:00
ethernet i40e: Fix VF MAC filter removal 2024-04-01 21:33:08 -07:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154 spi: Updates for v6.9 2024-03-13 11:07:37 -07:00
ipa Power management updates for 6.9-rc1 2024-03-13 11:40:06 -07:00
ipvlan
mctp
mdio net: phy: mdio-bcm-unimac: Add asp v2.2 support 2024-03-01 09:22:50 +00:00
netdevsim netdevsim: add ndo_get_iflink() implementation 2024-03-01 10:43:10 +00:00
pcs net: pcs: rzn1-miic: update PCS driver to use neg_mode 2024-03-07 20:49:14 -08:00
phy net: phy: micrel: Fix potential null pointer dereference 2024-04-01 20:41:49 -07:00
plip
ppp - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
pse-pd
slip
team
thunderbolt
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-03-11 20:38:36 -07:00
vmxnet3 vmxnet3: Fix missing reserved tailroom 2024-03-14 12:46:24 +01:00
vxlan vxlan: Remove generic .ndo_get_stats64 2024-03-11 16:01:06 -07:00
wan net: wan: fsl_qmc_hdlc: Fix module compilation 2024-03-18 09:25:58 +00:00
wireguard wireguard: netlink: access device through ctx instead of peer 2024-03-19 11:22:50 +01:00
wireless wireless fixes for v6.9-rc2 2024-03-27 15:39:18 -07:00
wwan net: wwan: t7xx: Split 64bit accesses to fix alignment issues 2024-03-25 19:51:57 -07:00
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c net: amt: Remove generic .ndo_get_stats64 2024-03-11 15:16:13 -07:00
bareudp.c net: bareudp: Remove generic .ndo_get_stats64 2024-03-04 08:55:44 +00:00
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-03-07 10:29:36 -08:00
gtp.c net: gtp: Move net_device assigned in setup 2024-03-06 20:37:18 -08:00
ifb.c
loopback.c
macsec.c net: macsec: Leverage core stats allocator 2024-03-06 20:36:21 -08:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c net: netconsole: Add continuation line prefix to userdata messages 2024-03-11 14:07:57 -07:00
netkit.c
nlmon.c net: nlmon: Simplify nlmon_get_stats64 2024-03-04 10:18:02 +00:00
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
tun.c net: introduce include/net/rps.h 2024-03-07 21:12:43 -08:00
veth.c net: veth: do not manipulate GRO when using XDP 2024-03-18 12:25:52 +00:00
virtio_net.c virtio_net: rename free_old_xmit_skbs to free_old_xmit 2024-03-19 03:19:22 -04:00
vrf.c
vsockmon.c
xen-netfront.c xen-netfront: Add missing skb_mark_for_recycle 2024-03-28 18:28:12 -07:00