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: <87ace089-0d1b-474b-aa9d-aed1e83062bc@lunn.ch>
Date: Thu, 28 Aug 2025 02:57:19 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: Petko Manolov <petkan@...leusys.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
	linux-usb@...r.kernel.org,
	syzbot+b4d5d8faea6996fd55e3@...kaller.appspotmail.com
Subject: Re: [PATCH v1 net] net: usb: rtl8150: Fix uninit-value access in
 set_carrier().

On Wed, Aug 27, 2025 at 11:31:02PM +0000, Kuniyuki Iwashima wrote:
> syzbot reported set_carrier() accesses an uninitialised local var. [0]
> 
> get_registers() is a wrapper of usb_control_msg_recv(), which copies
> data to the passed buffer only when it returns 0.
> 
> Let's check the retval before accessing tmp in set_carrier().

	do {
		get_registers(dev, PHYCNT, 1, data);
	} while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT));

	if (i <= MII_TIMEOUT) {
		get_registers(dev, PHYDAT, 2, data);
		*reg = data[0] | (data[1] << 8);



	/* Get the CR contents. */
	get_registers(dev, CR, 1, &cr);
	/* Set the WEPROM bit (eeprom write enable). */
	cr |= 0x20;
	set_registers(dev, CR, 1, &cr);


	do {
		get_registers(dev, CR, 1, &data);
	} while ((data & 0x10) && --i);

Don't these also have the same problem?

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ