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]
Message-ID: <17cc8e10-3b54-7bb7-6245-eba11d049034@nvidia.com>
Date: Tue, 20 Jun 2023 13:42:14 +0300
From: Gal Pressman <gal@...dia.com>
To: Piotr Gardocki <piotrx.gardocki@...el.com>, netdev@...r.kernel.org
Cc: intel-wired-lan@...ts.osuosl.org, przemyslaw.kitszel@...el.com,
 michal.swiatkowski@...ux.intel.com, pmenzel@...gen.mpg.de, kuba@...nel.org,
 maciej.fijalkowski@...el.com, anthony.l.nguyen@...el.com,
 simon.horman@...igine.com, aleksander.lobakin@...el.com
Subject: Re: [PATCH net-next v2 1/3] net: add check for current MAC address in
 dev_set_mac_address

On 20/06/2023 13:29, Piotr Gardocki wrote:
> On 20.06.2023 09:16, Gal Pressman wrote:
>> On 13/06/2023 15:24, Piotr Gardocki wrote:
>>> In some cases it is possible for kernel to come with request
>>> to change primary MAC address to the address that is already
>>> set on the given interface.
>>>
>>> This patch adds proper check to return fast from the function
>>> in these cases.
>>>
>>> An example of such case is adding an interface to bonding
>>> channel in balance-alb mode:
>>> modprobe bonding mode=balance-alb miimon=100 max_bonds=1
>>> ip link set bond0 up
>>> ifenslave bond0 <eth>
>>>
>>> Signed-off-by: Piotr Gardocki <piotrx.gardocki@...el.com>
>>
>> Hello Piotr,
>>
>> I believe this patch has an (unintended?) side effect.
>> The early return in dev_set_mac_address() makes it so
>> 'dev->addr_assign_type' doesn't get assigned with NET_ADDR_SET, I don't
>> think this is the correct behavior.
> 
> Hi Gal,
> 
> I checked it, you're right. When the addr_assign_type is PERM or RANDOM
> and user or some driver sets the same MAC address the type doesn't change
> to NET_ADDR_SET. In my testing I didn't notice issues with that, but I'm
> sure there are cases I didn't cover. Did you discover any useful cases
> that broke after this patch or did you just notice it in code?

This behavior change was caught in our regression tests.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ