* [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
@ 2025-08-16 3:08 syzbot
2025-08-17 16:52 ` syzbot
2025-08-17 19:42 ` Forwarded: syzbot
0 siblings, 2 replies; 10+ messages in thread
From: syzbot @ 2025-08-16 3:08 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, linux-kernel, linux-usb,
netdev, pabeni, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: d7ee5bdce789 Merge tag 'firewire-fixes-6.17-rc1' of git://..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11835af0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=412ee2f8b704a5e6
dashboard link: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11d253a2580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/62d2c52c687a/disk-d7ee5bdc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f827f7b0a929/vmlinux-d7ee5bdc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0babf789124a/bzImage-d7ee5bdc.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+20537064367a0f98d597@syzkaller.appspotmail.com
asix 1-1:0.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -71
asix 1-1:0.0 (unnamed net_device) (uninitialized): Error reading Medium Status register: ffffffb9
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/net/usb/asix_devices.c:679:27
shift exponent 240 is too large for 64-bit type 'unsigned long'
CPU: 1 UID: 0 PID: 6020 Comm: kworker/1:4 Not tainted 6.17.0-rc1-syzkaller-00116-gd7ee5bdce789 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x40 lib/ubsan.c:233
__ubsan_handle_shift_out_of_bounds+0x386/0x410 lib/ubsan.c:494
ax88772_init_mdio drivers/net/usb/asix_devices.c:679 [inline]
ax88772_bind+0xdcf/0xfa0 drivers/net/usb/asix_devices.c:910
usbnet_probe+0xa93/0x2870 drivers/net/usb/usbnet.c:1781
usb_probe_interface+0x665/0xc30 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26a/0x9e0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1031
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3689
usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26a/0x9e0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1031
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3689
usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694
hub_port_connect drivers/usb/core/hub.c:5566 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
port_event drivers/usb/core/hub.c:5870 [inline]
hub_event+0x2958/0x4a20 drivers/usb/core/hub.c:5952
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
---[ end trace ]---
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-16 3:08 [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind syzbot
@ 2025-08-17 16:52 ` syzbot
2025-08-18 4:05 ` Yuichiro Tsuji
` (2 more replies)
2025-08-17 19:42 ` Forwarded: syzbot
1 sibling, 3 replies; 10+ messages in thread
From: syzbot @ 2025-08-17 16:52 UTC (permalink / raw)
To: andrew+netdev, andrew, davem, edumazet, kuba, linux-kernel,
linux-usb, netdev, pabeni, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 99bade344cfa Merge tag 'rust-fixes-6.17' of git://git.kern..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=13ea1234580000
kernel config: https://syzkaller.appspot.com/x/.config?x=ce98061fb8ee27bc
dashboard link: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=126d13a2580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1754faf0580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e140d0491611/disk-99bade34.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f581d5a99c83/vmlinux-99bade34.xz
kernel image: https://storage.googleapis.com/syzbot-assets/feceb1caceef/bzImage-99bade34.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+20537064367a0f98d597@syzkaller.appspotmail.com
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/net/usb/asix_devices.c:679:27
shift exponent 208 is too large for 64-bit type 'unsigned long'
CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.17.0-rc1-syzkaller-00214-g99bade344cfa #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x40 lib/ubsan.c:233
__ubsan_handle_shift_out_of_bounds+0x386/0x410 lib/ubsan.c:494
ax88772_init_mdio drivers/net/usb/asix_devices.c:679 [inline]
ax88772_bind+0xdcf/0xfa0 drivers/net/usb/asix_devices.c:910
usbnet_probe+0xa96/0x2870 drivers/net/usb/usbnet.c:1781
usb_probe_interface+0x668/0xc30 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26a/0x9e0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1031
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3689
usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
usb_probe_device+0x1c1/0x390 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26a/0x9e0 drivers/base/dd.c:659
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1031
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3689
usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694
hub_port_connect drivers/usb/core/hub.c:5566 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
port_event drivers/usb/core/hub.c:5870 [inline]
hub_event+0x2958/0x4a20 drivers/usb/core/hub.c:5952
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
---[ end trace ]---
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Forwarded:
2025-08-16 3:08 [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind syzbot
2025-08-17 16:52 ` syzbot
@ 2025-08-17 19:42 ` syzbot
1 sibling, 0 replies; 10+ messages in thread
From: syzbot @ 2025-08-17 19:42 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject:
Author: abinashsinghlalotra@gmail.com
#syz test
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -872,6 +872,11 @@ static int ax88772_bind(struct usbnet *dev, struct
usb_interface *intf)
if (ret < 0)
return ret;
+ if (ret >= 32) {
+ netdev_warn(dev->net, "Invalid PHY address %d, clamping\n", ret);
+ return -EINVAL;
+ }
+
priv->phy_addr = ret;
priv->embd_phy = ((priv->phy_addr & 0x1f) == AX_EMBD_PHY_ADDR);
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
[not found] <CAMV7Lq4Uob0YMb+rZQNUApX4YYPQyqarsDCA1pVTLMV5=vUgQw@mail.gmail.com>
@ 2025-08-17 20:49 ` syzbot
0 siblings, 0 replies; 10+ messages in thread
From: syzbot @ 2025-08-17 20:49 UTC (permalink / raw)
To: abinashsinghlalotra, linux-kernel, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file drivers/net/usb/asix_devices.c
patch: **** unexpected end of file in patch
Tested on:
commit: 8d561baa Merge tag 'x86_urgent_for_v6.17_rc2' of git:/..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=ce98061fb8ee27bc
dashboard link: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=1272aba2580000
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-17 16:52 ` syzbot
@ 2025-08-18 4:05 ` Yuichiro Tsuji
2025-08-18 4:59 ` syzbot
2025-08-18 5:12 ` Yuichiro Tsuji
2025-08-18 6:22 ` Yuichiro Tsuji
2 siblings, 1 reply; 10+ messages in thread
From: Yuichiro Tsuji @ 2025-08-18 4:05 UTC (permalink / raw)
To: syzbot+20537064367a0f98d597; +Cc: linux-kernel, syzkaller-bugs
#syz test
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index d9f5942ccc44..792ddda1ad49 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -676,7 +676,7 @@ static int ax88772_init_mdio(struct usbnet *dev)
priv->mdio->read = &asix_mdio_bus_read;
priv->mdio->write = &asix_mdio_bus_write;
priv->mdio->name = "Asix MDIO Bus";
- priv->mdio->phy_mask = ~(BIT(priv->phy_addr) | BIT(AX_EMBD_PHY_ADDR));
+ priv->mdio->phy_mask = ~(BIT(priv->phy_addr & 0x1f) |
+BIT(AX_EMBD_PHY_ADDR));
/* mii bus name is usb-<usb bus number>-<usb device number> */
snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "usb-%03d:%03d",
dev->udev->bus->busnum, dev->udev->devnum);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-18 4:05 ` Yuichiro Tsuji
@ 2025-08-18 4:59 ` syzbot
0 siblings, 0 replies; 10+ messages in thread
From: syzbot @ 2025-08-18 4:59 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, yuichtsu
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file drivers/net/usb/asix_devices.c
patch: **** malformed patch at line 13: dev->udev->bus->busnum, dev->udev->devnum);
Tested on:
commit: c17b750b Linux 6.17-rc2
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=ce98061fb8ee27bc
dashboard link: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=15f61ba2580000
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-17 16:52 ` syzbot
2025-08-18 4:05 ` Yuichiro Tsuji
@ 2025-08-18 5:12 ` Yuichiro Tsuji
2025-08-18 5:27 ` syzbot
2025-08-18 6:22 ` Yuichiro Tsuji
2 siblings, 1 reply; 10+ messages in thread
From: Yuichiro Tsuji @ 2025-08-18 5:12 UTC (permalink / raw)
To: syzbot+20537064367a0f98d597; +Cc: linux-kernel, syzkaller-bugs
#syz test
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index d9f5942ccc44..792ddda1ad49 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -676,7 +676,7 @@ static int ax88772_init_mdio(struct usbnet *dev)
priv->mdio->read = &asix_mdio_bus_read;
priv->mdio->write = &asix_mdio_bus_write;
priv->mdio->name = "Asix MDIO Bus";
- priv->mdio->phy_mask = ~(BIT(priv->phy_addr) | BIT(AX_EMBD_PHY_ADDR));
+ priv->mdio->phy_mask = ~(BIT(priv->phy_addr & 0x1f) |
+BIT(AX_EMBD_PHY_ADDR));
/* mii bus name is usb-<usb bus number>-<usb device number> */
snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "usb-%03d:%03d", dev->udev->bus->busnum, dev->udev->devnum);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-18 5:12 ` Yuichiro Tsuji
@ 2025-08-18 5:27 ` syzbot
0 siblings, 0 replies; 10+ messages in thread
From: syzbot @ 2025-08-18 5:27 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, yuichtsu
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file drivers/net/usb/asix_devices.c
patch: **** malformed patch at line 12:
Tested on:
commit: c17b750b Linux 6.17-rc2
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=ce98061fb8ee27bc
dashboard link: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=117aa442580000
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-17 16:52 ` syzbot
2025-08-18 4:05 ` Yuichiro Tsuji
2025-08-18 5:12 ` Yuichiro Tsuji
@ 2025-08-18 6:22 ` Yuichiro Tsuji
2025-08-18 6:53 ` syzbot
2 siblings, 1 reply; 10+ messages in thread
From: Yuichiro Tsuji @ 2025-08-18 6:22 UTC (permalink / raw)
To: syzbot+20537064367a0f98d597; +Cc: linux-kernel, syzkaller-bugs
#syz test
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index d9f5942ccc44..792ddda1ad49 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -676,7 +676,7 @@ static int ax88772_init_mdio(struct usbnet *dev)
priv->mdio->read = &asix_mdio_bus_read;
priv->mdio->write = &asix_mdio_bus_write;
priv->mdio->name = "Asix MDIO Bus";
- priv->mdio->phy_mask = ~(BIT(priv->phy_addr) | BIT(AX_EMBD_PHY_ADDR));
+ priv->mdio->phy_mask = ~(BIT(priv->phy_addr & 0x1f) | BIT(AX_EMBD_PHY_ADDR));
/* mii bus name is usb-<usb bus number>-<usb device number> */
snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "usb-%03d:%03d",
dev->udev->bus->busnum, dev->udev->devnum);
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind
2025-08-18 6:22 ` Yuichiro Tsuji
@ 2025-08-18 6:53 ` syzbot
0 siblings, 0 replies; 10+ messages in thread
From: syzbot @ 2025-08-18 6:53 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, yuichtsu
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+20537064367a0f98d597@syzkaller.appspotmail.com
Tested-by: syzbot+20537064367a0f98d597@syzkaller.appspotmail.com
Tested on:
commit: c17b750b Linux 6.17-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13d8eba2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=fe8fc1adb24b215
dashboard link: https://syzkaller.appspot.com/bug?extid=20537064367a0f98d597
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=13d99234580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-08-18 6:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16 3:08 [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind syzbot
2025-08-17 16:52 ` syzbot
2025-08-18 4:05 ` Yuichiro Tsuji
2025-08-18 4:59 ` syzbot
2025-08-18 5:12 ` Yuichiro Tsuji
2025-08-18 5:27 ` syzbot
2025-08-18 6:22 ` Yuichiro Tsuji
2025-08-18 6:53 ` syzbot
2025-08-17 19:42 ` Forwarded: syzbot
[not found] <CAMV7Lq4Uob0YMb+rZQNUApX4YYPQyqarsDCA1pVTLMV5=vUgQw@mail.gmail.com>
2025-08-17 20:49 ` [syzbot] [usb?] UBSAN: shift-out-of-bounds in ax88772_bind syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).