android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikita Zhandarovich dcd592ab9d usb: atm: cxacru: fix a flaw in existing endpoint checks
commit c90aad369899a607cfbc002bebeafd51e31900cd upstream.

Syzbot once again identified a flaw in usb endpoint checking, see [1].
This time the issue stems from a commit authored by me (2eabb655a968
("usb: atm: cxacru: fix endpoint checking in cxacru_bind()")).

While using usb_find_common_endpoints() may usually be enough to
discard devices with wrong endpoints, in this case one needs more
than just finding and identifying the sufficient number of endpoints
of correct types - one needs to check the endpoint's address as well.

Since cxacru_bind() fills URBs with CXACRU_EP_CMD address in mind,
switch the endpoint verification approach to usb_check_XXX_endpoints()
instead to fix incomplete ep testing.

[1] Syzbot report:
usb 5-1: BOGUS urb xfer, pipe 3 != type 1
WARNING: CPU: 0 PID: 1378 at drivers/usb/core/urb.c:504 usb_submit_urb+0xc4e/0x18c0 drivers/usb/core/urb.c:503
...
RIP: 0010:usb_submit_urb+0xc4e/0x18c0 drivers/usb/core/urb.c:503
...
Call Trace:
 <TASK>
 cxacru_cm+0x3c8/0xe50 drivers/usb/atm/cxacru.c:649
 cxacru_card_status drivers/usb/atm/cxacru.c:760 [inline]
 cxacru_bind+0xcf9/0x1150 drivers/usb/atm/cxacru.c:1223
 usbatm_usb_probe+0x314/0x1d30 drivers/usb/atm/usbatm.c:1058
 cxacru_usb_probe+0x184/0x220 drivers/usb/atm/cxacru.c:1377
 usb_probe_interface+0x641/0xbb0 drivers/usb/core/driver.c:396
 really_probe+0x2b9/0xad0 drivers/base/dd.c:658
 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800
 driver_probe_device+0x50/0x430 drivers/base/dd.c:830
...

Reported-and-tested-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=ccbbc229a024fa3e13b5
Fixes: 2eabb655a968 ("usb: atm: cxacru: fix endpoint checking in cxacru_bind()")
Cc: [email protected]
Signed-off-by: Nikita Zhandarovich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-03-13 12:43:31 +01:00
..
atm usb: atm: cxacru: fix a flaw in existing endpoint checks 2025-03-13 12:43:31 +01:00
c67x00
cdns3 usb: cdns3: fix memory double free when handle zero packet 2024-03-01 13:13:36 +01:00
chipidea usb: chipidea: udc: handle USB Error Interrupt if IOC not set 2024-12-14 19:44:54 +01:00
class usb: cdc-acm: Fix handling of oversized fragments 2025-03-13 12:43:15 +01:00
common
core usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader 2025-03-13 12:43:31 +01:00
dwc2 usb: dwc2: gadget: remove of_node reference upon udc_stop 2025-03-13 12:43:14 +01:00
dwc3 usb: dwc3: Fix timeout issue during controller enter/exit from halt state 2025-03-13 12:43:21 +01:00
early
gadget USB: gadget: f_midi: f_midi_complete to call queue_work 2025-03-13 12:43:21 +01:00
host USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI 2025-03-13 12:43:14 +01:00
image
isp1760
misc USB: chaoskey: Fix possible deadlock chaoskey_list_lock 2024-12-14 19:44:34 +01:00
mon
mtu3
musb usb: musb: sunxi: Fix accessing an released usb phy 2024-11-17 14:58:52 +01:00
phy usb: phy: Fix API devm_usb_put_phy() can not release the phy 2024-11-08 16:20:53 +01:00
renesas_usbhs usb: renesas_usbhs: Flush the notify_hotplug_work 2025-03-13 12:43:31 +01:00
roles usb: roles: set switch registered flag early on 2025-03-13 12:43:14 +01:00
serial USB: serial: option: drop MeiG Smart defines 2025-03-13 12:43:15 +01:00
storage usb-storage: Add max sectors quirk for Nokia 208 2025-02-01 18:18:46 +01:00
typec usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE 2025-03-13 12:43:01 +01:00
usbip usbip: Don't submit special requests twice 2024-09-12 11:03:50 +02:00
Kconfig
Makefile
usb-skeleton.c