aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_debug.c
diff options
context:
space:
mode:
authorKamal Heib <[email protected]>2025-09-11 22:36:10 +0000
committerJakub Kicinski <[email protected]>2025-09-14 20:12:03 +0000
commitaf82e857df5dd883a4867bcaf5dde041e57a4e33 (patch)
treea5a51e85535303d70ab13eb4613b4333056bff50 /drivers/net/ethernet/qlogic/qed/qed_debug.c
parentrxrpc: Fix untrusted unsigned subtract (diff)
downloadkernel-af82e857df5dd883a4867bcaf5dde041e57a4e33.tar.gz
kernel-af82e857df5dd883a4867bcaf5dde041e57a4e33.zip
octeon_ep: Validate the VF ID
Add a helper to validate the VF ID and use it in the VF ndo ops to prevent accessing out-of-range entries. Without this check, users can run commands such as: # ip link show dev enp135s0 2: enp135s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:00:00:01:01:00 brd ff:ff:ff:ff:ff:ff vf 0 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state enable, trust off vf 1 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state enable, trust off # ip link set dev enp135s0 vf 4 mac 00:00:00:00:00:14 # echo $? 0 even though VF 4 does not exist, which results in silent success instead of returning an error. Fixes: 8a241ef9b9b8 ("octeon_ep: add ndo ops for VFs in PF driver") Signed-off-by: Kamal Heib <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_debug.c')
0 files changed, 0 insertions, 0 deletions