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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVpQUB4VOZLkF1QE3nN7Rp3dRai_VXpVZU4X9nMNU+rcJLOeg@mail.gmail.com>
Date: Wed, 27 Aug 2025 20:05:37 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Andrew Lunn <andrew@...n.ch>
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 5:57 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> 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?

Exactly, will fix other places.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ