linux-stable/drivers
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
..
accel
accessibility Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
acpi RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
amba
android Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
ata
atm
auxdisplay
base Driver core changes for 6.9-rc1 2024-03-21 13:34:15 -07:00
bcma
block block-6.9-20240322 2024-03-22 12:46:07 -07:00
bluetooth Bluetooth: qca: fix device-address endianness 2024-03-29 09:48:37 -04:00
bus Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
cache
cdrom
cdx
char Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
clk ARM: late SoC changes for 6.9 2024-03-19 11:57:26 -07:00
clocksource A set of updates for clocksource and clockevent drivers: 2024-03-23 14:42:45 -07:00
comedi Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
connector
counter
cpufreq RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
cpuidle RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
crypto This push fixes a regression that broke iwd as well as a divide by 2024-03-25 10:48:23 -07:00
cxl
dax
dca
devfreq
dio
dma
dma-buf
dpll dpll: indent DPLL option type by a tab 2024-03-25 19:40:23 -07:00
edac
eisa
extcon
firewire firewire: core: add memo about the caller of show functions for device attributes 2024-03-21 21:20:18 +09:00
firmware EFI fixes for v6.9 #2 2024-03-24 13:54:06 -07:00
fpga Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
fsi
gnss
gpio
gpu drm fixes for 6.9-rc1 2024-03-21 19:04:31 -07:00
greybus Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
hid
hsi
hte
hv hyperv-next for v6.9 2024-03-21 10:01:02 -07:00
hwmon
hwspinlock
hwtracing
i2c i2c: muxes: pca954x: Allow sharing reset GPIO 2024-03-20 09:45:04 +01:00
i3c
idle
iio Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
infiniband
input TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
interconnect
iommu dma-mapping fixes for Linux 6.9 2024-03-24 10:45:31 -07:00
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md - Fix a memory leak in DM integrity recheck code that was added during 2024-03-22 12:34:26 -07:00
media
memory Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
memstick
message
mfd TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
misc hardening fixes for v6.9-rc1 2024-03-23 08:43:21 -07:00
mmc
most
mtd This pull request contains updates for UBI and UBIFS: 2024-03-21 15:09:29 -07:00
mux
net i40e: Fix VF MAC filter removal 2024-04-01 21:33:08 -07:00
nfc
ntb
nubus
nvdimm
nvme nvme updates for Linux 6.9 2024-03-21 13:23:07 -06:00
nvmem
of Driver core changes for 6.9-rc1 2024-03-21 13:34:15 -07:00
opp
parisc
parport
pci
pcmcia
peci
perf RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
phy USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
pinctrl
platform Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
pmdomain
pnp
power
powercap
pps
ps3
ptp
pwm pwm: img: fix pwm clock lookup 2024-03-25 07:31:26 +01:00
rapidio
ras
regulator regulator: Fix for v6.9 2024-03-22 09:52:37 -07:00
remoteproc remoteproc updates for v6.9 2024-03-21 10:37:39 -07:00
reset
rpmsg
rtc RTC for 6.9 2024-03-21 17:16:46 -07:00
s390 s390/qeth: handle deferred cc1 2024-03-25 19:46:49 -07:00
sbus
scsi SCSI misc on 20240322 2024-03-22 13:31:07 -07:00
sh
siox SIOX changes for 6.9-rc1 2024-03-21 15:18:18 -07:00
slimbus
soc Including fixes from CAN, netfilter, wireguard and IPsec. 2024-03-21 14:50:39 -07:00
soundwire
spi spi: Fixes for v6.9 2024-03-22 09:57:00 -07:00
spmi
ssb
staging Staging driver cleanups for 6.9-rc1 2024-03-21 13:03:44 -07:00
target
tc
tee
thermal
thunderbolt USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
tty TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
ufs
uio Fix build errors due to new UIO_MEM_DMA_COHERENT mess 2024-03-27 09:48:47 -07:00
usb USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
vdpa
vfio
vhost
video fbdev fixes and cleanups for 6.9-rc1: 2024-03-22 10:09:08 -07:00
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile