UBSAN: array-index-out-of-bounds in uea_bind
Subsystems (5)
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: 3708dd948844 Merge tag 'pm-7.2-rc6' of git://git.kernel.or.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14ff71b9580000 kernel config: https://syzkaller.appspot.com/x/.config?x=145fa60d73086782 dashboard link: https://syzkaller.appspot.com/bug?extid=92f5bf49bf4ac75223ca compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a0a5b9580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12ff71b9580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-3708dd94.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/57f69e2a6e3b/vmlinux-3708dd94.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3511d4246fb6/bzImage-3708dd94.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
usb 5-1: reset high-speed USB device number 6 using dummy_hcd usb 5-1: device descriptor read/64, error -71
usb 5-1: reset high-speed USB device number 6 using dummy_hcd
------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in drivers/usb/atm/ueagle-atm.c:2466:28 index 4 is out of range for type 'bool [4]' CPU: 2 UID: 0 PID: 847 Comm: kworker/2:2 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: usb_hub_wq hub_event Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 ubsan_epilogue+0xa/0x30 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xcc/0xf0 lib/ubsan.c:455 uea_bind+0x1014/0x1380 drivers/usb/atm/ueagle-atm.c:2466 usbatm_usb_probe+0x378/0x1b50 drivers/usb/atm/usbatm.c:1058 uea_probe+0x194/0x570 drivers/usb/atm/ueagle-atm.c:2597 usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3772 usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3772 usb_new_device.cold+0x685/0x115c drivers/usb/core/hub.c:2695 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x30a3/0x4a60 drivers/usb/core/hub.c:5953 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 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 [email protected].
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
syzbot
syzbotForwarded: [PATCH] usb: Fix UBSAN out-of-bounds
For archival purposes, forwarding an incoming command email to [email protected], [email protected].
For archival purposes, forwarding an incoming command email to [email protected], [email protected].
***
Subject: [PATCH] usb: Fix UBSAN out-of-bounds
Author: [email protected]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git 5d5fd841c34649f1b09220fe58e59dffd61c447d
--- drivers/usb/atm/ueagle-atm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/atm/ueagle-atm.c +2 -1
@@ -2463,7 +2463,8 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,if (ifnum !=UEA_INTR_IFACE_NO )return -ENODEV ; - usbatm->flags = (sync_wait[modem_index] ?0 :UDSL_SKIP_HEAVY_INIT ); + usbatm->flags = (modem_index <NB_MODEM && sync_wait[modem_index]) ? +0 :UDSL_SKIP_HEAVY_INIT ;/* interface 1 is for outbound traffic */ ret =claim_interface (usb, usbatm,UEA_US_IFACE_NO );
Signature · 1 line
2.43.0
syzbot
syzbotForwarded: [PATCH] configfs: unhash dentry before dropping the item
In reply to syzbotFor archival purposes, forwarding an incoming command email to [email protected].
For archival purposes, forwarding an incoming command email to [email protected].
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: [email protected]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 762137ff748fa0c920f82ce718163691cb02f907
syzbot
syzbotForwarded: [PATCH] configfs: unhash dentry before dropping the item
In reply to syzbotFor archival purposes, forwarding an incoming command email to [email protected].
For archival purposes, forwarding an incoming command email to [email protected].
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: [email protected]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 762137ff748fa0c920f82ce718163691cb02f907
drivers/usb/atm/ueagle-atm.c +10 -1
@@ -2458,12 +2458,21 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,struct uea_softc *sc;int ret, ifnum = intf->altsetting->desc.bInterfaceNumber;unsigned int alt; +int modem_idx;/* interface 0 is for firmware/monitoring */ if (ifnum !=UEA_INTR_IFACE_NO )return -ENODEV ; - usbatm->flags = (sync_wait[modem_index] ?0 :UDSL_SKIP_HEAVY_INIT ); +/* +* modem_index is a global counter that stops at NB_MODEM once that +* many devices have been probed. Wrap the index the same way as +* sc->modem_index below so that the module parameter lookup stays +* within the bounds of the arrays. +*/ + modem_idx = (modem_index <NB_MODEM ) ? modem_index :0 ; + + usbatm->flags = (sync_wait[modem_idx] ?0 :UDSL_SKIP_HEAVY_INIT );/* interface 1 is for outbound traffic */ ret =claim_interface (usb, usbatm,UEA_US_IFACE_NO );
syzbot
syzbotForwarded: [PATCH] UBSAN: array-index-out-of-bounds in uea_bind
In reply to syzbotFor archival purposes, forwarding an incoming command email to [email protected].
For archival purposes, forwarding an incoming command email to [email protected].
***
Subject: [PATCH] UBSAN: array-index-out-of-bounds in uea_bind
Author: [email protected]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 762137ff748fa0c920f82ce718163691cb02f907