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:	Wed, 24 Feb 2016 22:27:16 +0200
From:	Saeed Mahameed <saeedm@....mellanox.co.il>
To:	David Miller <davem@...emloft.net>
Cc:	Saeed Mahameed <saeedm@...lanox.com>,
	Linux Netdev List <netdev@...r.kernel.org>,
	Gal Pressman <galp@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>, kaber@...sh.net
Subject: Re: [PATCH net] net/8021q: Check the correct vlan filter capability

>> Netdev features can be changed dynamically to off after vlan_vid_add
>> was called, thus vlan_vid_del will skip ndo_vlan_rx_kill_vid and will
>> leave the device driver with un-freed resources.
>
> Are you sure the fix isn't to make vlan_vid_add() check ->features instead
> of ->hw_features.

This is exactly what this fix suggests, "->features" is not consistent
and can be turned ON/OFF between vlan_add/del which can leave the NIC
driver in inconsistent state !

>
> Should we really be trying to add VLAN filters when the user has
> turned it off?

Well, I think it is debatable, but the current implementation is not
consistent, especially for adding vlan 0 by default and then the user
disables the vlan filter, this will cause the stack to never call the
nic ndo_vlan_rx_kill_vid for the pre added vlan 0 and vise versa call
kill_vid without add_vid, BUG ?

So i think we have two options, use this patch, and always trust to
delegate vlan_vid_add/del to the NIC when it's HW supports it, and the
nic will be smart enough to know what to do with it (in case vlan
filter is enabled/disabled). Or, for each vlan we can remember if it
was added to the NIC or not so the stack will know whether to clean it
up or not.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ