Re: [PATCH v2] net: usb: asix: validate PHY address before use
From: Andrew Lunn
Date: Thu Dec 18 2025 - 05:31:30 EST
On Thu, Dec 18, 2025 at 06:41:56AM +0530, Deepanshu Kartikey wrote:
> The ASIX driver reads the PHY address from the USB device via
> asix_read_phy_addr(). A malicious or faulty device can return an
> invalid address (>= PHY_MAX_ADDR), which causes a warning in
> mdiobus_get_phy():
>
> addr 207 out of range
> WARNING: drivers/net/phy/mdio_bus.c:76
>
> Validate the PHY address in asix_read_phy_addr() and remove the
> now-redundant check in ax88172a.c.
>
> Reported-by: syzbot+3d43c9066a5b54902232@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://syzkaller.appspot.com/bug?extid=3d43c9066a5b54902232
> Tested-by: syzbot+3d43c9066a5b54902232@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and handle errors on return")
> Link: https://lore.kernel.org/all/20251217085057.270704-1-kartikey406@xxxxxxxxx/T/ [v1]
> Signed-off-by: Deepanshu Kartikey <kartikey406@xxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew