summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorNguyen Ngoc Thang <ngocthang2710.1999@gmail.com>2026-09-10 00:19:26 +0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-10 15:42:31 +0200
commit6a3ee813d5fc41c4d0e7d19689b885c7bdd6f3be (patch)
tree5c24680d5bc6bb158cef9c757144f3abae9c07c4 /tools/perf/scripts/python/stackcollapse.py
parente84caed6e7f58d96ea2e4aaa0b947ab05faa451b (diff)
downloadlinux-next-6a3ee813d5fc41c4d0e7d19689b885c7bdd6f3be.tar.gz
linux-next-6a3ee813d5fc41c4d0e7d19689b885c7bdd6f3be.zip
usb: storage: ene_ub6250: set transport_reset to avoid NULL deref
ene_ub6250_probe() sets us->transport but never sets us->transport_reset. get_transport() only fills in transport_reset for the standard USB_PR_CB/CBI/BULK protocols; since this driver matches on VID/PID alone, a device can report any bInterfaceProtocol value and still bind, leaving transport_reset NULL. When the transport then reports an error, usb_stor_invoke_transport() calls us->transport_reset(us) in its Handle_Errors path, dereferencing a NULL function pointer: BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:0x0 Call Trace: usb_stor_invoke_transport+0x55a/0x1a40 drivers/usb/storage/transport.c:926 usb_stor_control_thread+0x44c/0x8f0 drivers/usb/storage/usb.c:462 kthread+0x38b/0x480 kernel/kthread.c:436 Set transport_reset to usb_stor_Bulk_reset: ene_send_scsi_cmd() already frames its command/status packets with the shared struct bulk_cb_wrap/bulk_cs_wrap from include/linux/usb/storage.h and only ever transfers over us->send_bulk_pipe/recv_bulk_pipe, i.e. this device speaks the Bulk-Only Transport wire protocol underneath its own SCSI translation layer, so the Bulk-Only reset is the correct recovery action for it, matching the pattern already used by the other subdrivers with a custom transport function (alauda, datafab, jumpshot, karma). Also harden usb_stor_probe2()'s existing sanity check to require transport_reset alongside transport and proto_handler, so a future subdriver making the same mistake fails to probe instead of crashing on the first error recovery. Reported-by: syzbot+356ae236154297f0d60d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=356ae236154297f0d60d Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://patch.msgid.link/20260909171926.54111-1-ngocthang2710.1999@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions