Forwarded: [PATCH] usb: Fix UBSAN out-of-bounds

From: syzbot

Date: Sun Aug 02 2026 - 00:46:24 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: [PATCH] usb: Fix UBSAN out-of-bounds
Author: subasris1210@xxxxxxxxx

#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(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 4266a0cb7e3b..61723e7ab351 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -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);
--
2.43.0