Commit 24ef2f53 authored by Yuichiro Tsuji's avatar Yuichiro Tsuji Committed by Jakub Kicinski
Browse files

net: usb: asix_devices: Fix PHY address mask in MDIO bus initialization



Syzbot reported shift-out-of-bounds exception on MDIO bus initialization.

The PHY address should be masked to 5 bits (0-31). Without this
mask, invalid PHY addresses could be used, potentially causing issues
with MDIO bus operations.

Fix this by masking the PHY address with 0x1f (31 decimal) to ensure
it stays within the valid range.

Fixes: 4faff709 ("net: usb: asix_devices: add phy_mask for ax88772 mdio bus")
Reported-by: default avatar <syzbot+20537064367a0f98d597@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597


Tested-by: default avatar <syzbot+20537064367a0f98d597@syzkaller.appspotmail.com>
Signed-off-by: default avatarYuichiro Tsuji <yuichtsu@amazon.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250818084541.1958-1-yuichtsu@amazon.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bc1a59cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment