Skip to contentSkip to conversation

usb: atm: ueagle-atm: fix array-index-out-of-bounds in uea_bind()

PATCH Applied Subasri S 2 participants 2 messages Aug 2 – Aug 6

Subsystems (5)
Networking Network drivers USB ATM +1 more subsystems
lore
Share & tools
lore

Subasri S

author
#0 lore raw

PATCH 1/1 usb: atm: ueagle-atm: fix array-index-out-of-bounds in uea_bind()

Add a bounds check on the global variable modem_index before using it as an index in sync_wait[] array whose size is NB_MODEM.

Reported-by [email protected]
Fixes b72458a80c75 ("[PATCH] USB: Eagle and ADI 930 usb adsl modem driver")
---
 drivers/usb/atm/ueagle-atm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/atm/ueagle-atm.c +2 -1
index 4266a0cb7e3b..61723e7ab351 100644
@@ -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);

---
base-commit: f5098b6bae761e346ebcd9da7f95622c04733cff
change-id: 20260802-usb-ueagble-atm-ca29d2bd4189

Best regards,

Signature · 1 line
Subasri S <[email protected]>
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Sun, 02 Aug 2026 11:59:24 +0530 you wrote:

Add a bounds check on the global variable modem_index before using it as an index in sync_wait[] array whose size is NB_MODEM.

Reported-by [email protected]
Fixes b72458a80c75 ("[PATCH] USB: Eagle and ADI 930 usb adsl modem driver")

[...]

Here is the summary with links:
- usb: atm: ueagle-atm: fix array-index-out-of-bounds in uea_bind()

    https://git.kernel.org/netdev/net-next/c/37a5e120118a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html