lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Feb 2024 10:11:44 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<edumazet@...gle.com>, <netdev@...r.kernel.org>
CC: Ivan Vecera <ivecera@...hat.com>, Simon Horman <horms@...nel.org>, "Rafal
 Romanowski" <rafal.romanowski@...el.com>
Subject: Re: [PATCH net] i40e: Do not allow untrusted VF to remove
 administratively set MAC



On 2/8/2024 10:03 AM, Tony Nguyen wrote:
> From: Ivan Vecera <ivecera@...hat.com>
> 
> Currently when PF administratively sets VF's MAC address and the VF
> is put down (VF tries to delete all MACs) then the MAC is removed
> from MAC filters and primary VF MAC is zeroed.
> 
> Do not allow untrusted VF to remove primary MAC when it was set
> administratively by PF.

This is currently marked as "Not Applicable" [1]. Are there changes to 
be done or, perhaps, it got mismarked? If the latter, I do have an i40e 
pull request to send so I could also bundle this with that if it's more 
convenient.

Thanks,
Tony

> Reproducer:
> 1) Create VF
> 2) Set VF interface up
> 3) Administratively set the VF's MAC
> 4) Put VF interface down
> 
> [root@...t ~]# echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs
> [root@...t ~]# ip link set enp2s0f0v0 up
> [root@...t ~]# ip link set enp2s0f0 vf 0 mac fe:6c:b5:da:c7:7d
> [root@...t ~]# ip link show enp2s0f0
> 23: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
>      link/ether 3c:ec:ef:b7:dd:04 brd ff:ff:ff:ff:ff:ff
>      vf 0     link/ether fe:6c:b5:da:c7:7d brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off
> [root@...t ~]# ip link set enp2s0f0v0 down
> [root@...t ~]# ip link show enp2s0f0
> 23: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
>      link/ether 3c:ec:ef:b7:dd:04 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 auto, trust off
> 
> Fixes: 700bbf6c1f9e ("i40e: allow VF to remove any MAC filter")
> Fixes: ceb29474bbbc ("i40e: Add support for VF to specify its primary MAC address")
> Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>

[1] 
https://patchwork.kernel.org/project/netdevbpf/patch/20240208180335.1844996-1-anthony.l.nguyen@intel.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ