From nobody Mon Feb 9 04:28:55 2026 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 952E82E8DFD for ; Wed, 17 Dec 2025 06:27:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.69 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765952865; cv=none; b=lqcEOWJJHP+1iFDykH7BDTqqHkVJnN1Viq9RQwujX2Mrtq+2cJxuA9i5qcQBZ47EHqv6By6nv2yUH8RDsVfQrZ/4tQvEdtBbyEZ7IgGxxhv00GIz1Cp9SsVhqX8p90PFRlHkMlmqG7LqLRrNN7G8ONoRA5fC4RpODGmAn1uGY+M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765952865; c=relaxed/simple; bh=uvzLeRFqDeCxJmsJunEQwzXuSstvXhZ1Mxx0NSuOIFg=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=isZbUVlmVk6rhqANsplMlt7zgMkk2TU8/Rz/b+feybPKcowcZZItWFWHAdhZ3bJsWwl/QkijVzD5GU8btN4YkmBABxrdQh4CwK9rOJiG8DXCFjSyKikVE+9JsB4LaBADLxjcPmGC+01y2CEuzJjU9HHxsKXYB9HzsrI9bEEy4BM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.210.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-7c701a712ecso604111a34.0 for ; Tue, 16 Dec 2025 22:27:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765952862; x=1766557662; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f2GIXckluR4jbhlBlTx8lPldyQ+wKDQx2+Pd/WEU+VU=; b=HXSxs/TFi413Af/KZ5KuvahC5RdMqwaJAYmKhpgRT0shLqq96Ul0PyZKG3iymWBBvl ukTP9KX8kjO0uwcw4V2UNUJWEaEmD34bWTbWgkDTaDWbi3ns7zAAVvKWSIu22oYI9qqp Cgn/hBb3VkTI9VIn8pEu80I/V31VFeHIGM64XzK/BWi/jrifuzDb57wvv6YKmPVtaiuc PIiXH26eX6kUPMm/zhfQ145aAb+Fq0i5YOaeDkdCtGphniX59noXWalPp7XxrfwgjqYH ktBWN5+MnmoBd+IfubY8B9xsONsvpgbNPeZEJPzIB3Ehw1ejcxxeHfbZyJrdhgw0ny88 w6NA== X-Gm-Message-State: AOJu0YyjuYW4SYVUNWVTZKxfJyasuJVjqSUBHZc/0Ah+NMvh0hsamXNX LvUAbtGR/BXh67TCE/o2i2npcU3iSiKvRpjBYT1EMslSPHp1s0F7tzkEBOvOmWw480L+lYaOiAU kvZ7jvEZHdrsjU34Hb9w9HN9l8iQ9fw0g1azYeRIfbSXeFicfzBC9+h/jG70= X-Google-Smtp-Source: AGHT+IExUxwuYA2xGLIUCUUOS99tbRplWFfYwBpGvvVKAwdYVAN3WVurdjel4IH+BJ+lFPlF17KvKdKIVc0T5JzEwb+IdX1qHfIk Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:3c8:b0:659:9a49:8e2f with SMTP id 006d021491bc7-65b37f79a3dmr7459593eaf.33.1765952862535; Tue, 16 Dec 2025 22:27:42 -0800 (PST) Date: Tue, 16 Dec 2025 22:27:42 -0800 In-Reply-To: <693fff66.a70a0220.104cf0.033d.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69424d5e.a70a0220.25eec0.0016.GAE@google.com> Subject: Forwarded: [PATCH] net: usb: asix: validate PHY address before use From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] net: usb: asix: validate PHY address before use Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gi= t master 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 (>=3D 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 before returning it from asix_read_phy_addr(). Reported-by: syzbot+3d43c9066a5b54902232@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3D3d43c9066a5b54902232 Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and han= dle errors on return") Signed-off-by: Deepanshu Kartikey --- drivers/net/usb/asix_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c index 7fd763917ae2..6ab3486072cb 100644 --- a/drivers/net/usb/asix_common.c +++ b/drivers/net/usb/asix_common.c @@ -335,6 +335,11 @@ int asix_read_phy_addr(struct usbnet *dev, bool intern= al) offset =3D (internal ? 1 : 0); ret =3D buf[offset]; =20 + if (ret >=3D PHY_MAX_ADDR) { + netdev_err(dev->net, "invalid PHY address: %d\n", ret); + return -ENODEV; + } + netdev_dbg(dev->net, "%s PHY address 0x%x\n", internal ? "internal" : "external", ret); =20 --=20 2.43.0