aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/Makefile
diff options
context:
space:
mode:
authorZiyi Guo <n7l8m4@u.northwestern.edu>2026-02-13 20:39:27 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2026-03-02 11:03:32 +0100
commit968b098220e393a10488b6a5dddb302b2eaedf66 (patch)
treee718b8cb039e514377f51448d0ff18ea1a1a3a6b /scripts/basic/Makefile
parentab3f894de216f4a62adc3b57e9191888cbf26885 (diff)
can: esd_usb: add endpoint type validation
esd_usb_probe() constructs bulk pipes for two endpoints without verifying their transfer types: - usb_rcvbulkpipe(dev->udev, 1) for RX (version reply, async RX data) - usb_sndbulkpipe(dev->udev, 2) for TX (version query, CAN frames) A malformed USB device can present these endpoints with transfer types that differ from what the driver assumes, triggering the WARNING in usb_submit_urb(). Use usb_find_common_endpoints() to discover and validate the first bulk IN and bulk OUT endpoints at probe time, before any allocation. Found pipes are saved to struct esd_usb and code uses them directly instead of making pipes in place. Similar to - commit 136bed0bfd3b ("can: mcba_usb: properly check endpoint type") which established the usb_find_common_endpoints() + stored pipes pattern for CAN USB drivers. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Suggested-by: Vincent Mailhol <mailhol@kernel.org> Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu> Reviewed-by: Vincent Mailhol <mailhol@kernel.org> Link: https://patch.msgid.link/20260213203927.599163-1-n7l8m4@u.northwestern.edu Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/basic/Makefile')
0 files changed, 0 insertions, 0 deletions