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, 15 Apr 2024 09:27:32 +0200
From: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>
To: kuba@...nel.org
Cc: davem@...emloft.net,
	edumazet@...gle.com,
	jarkko.palviainen@...il.com,
	jtornosm@...hat.com,
	linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org,
	netdev@...r.kernel.org,
	pabeni@...hat.com,
	stable@...r.kernel.org
Subject: Re: [PATCH] net: usb: ax88179_178a: avoid writing the mac address before first reading

Hello Jakub,

I have been trying to use netif_device_detach() and netif_device_attach()
as conditions, but maybe I am misunderstanding you, becasue I think the
detected problem is not related to suspend/resume process.

Let me try to explain better (if considered, I can complete the patch
explanation later):

The issue happened at the initialization stage. At that moment, during
normal rtnl_setlink call, the mac address is set and written in the device
registers, but since the reset was not commanded previously, the mac
address is not read from the device and without that, it always has the
random address that is pre-generated just in case. 
After this, during open operation, the reset is commanded and the mac
address is read, but as the device registers were modified, it reads the
pregenerated random mac address and not the default mac address for the
device.

To fix,  I am trying to protect this situtation, not allowing to write if
the reset and the default mac address for the device is not previously
read. I think it is easier in the driver because of the device condition.

Thank you 

Best regards
José Ignacio


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ