Re: [PATCH v7] media: siano: fix URB work teardown
From: hyeonjun hong
Date: Mon Nov 30 2026 - 08:45:44 EST
On Sun, Nov 29, 2026 at 02:19:55AM -0800, Rohith Matam wrote:
> Fixes: ebad8e731c1c ("media: usb: siano: Fix use after free bugs caused by do_submit_urb")
The URB_FREE_BUFFER line removed here was added by 564246fd3ff4
("media: siano: Fix coherent memory allocation failure on arm64"),
which is in v4.17, so that part is older than ebad8e731c1c. It is
also the part the 9fe09db3795456e0b442 reproducer hits (see below).
Should the patch carry a second Fixes tag for it?
> - wake_up_interruptible(&coredev->buffer_mng_waitq);
> list_add_locked(&cb->entry, &coredev->buffers, &coredev->bufferslock);
> + wake_up(&coredev->buffer_mng_waitq);
The v3 and v4 changelogs explained this change, v7 no longer mentions
it. Since it also affects smssdio, a sentence in the commit message
would help.
I tested this with the syz reproducer from the 9fe09db3795456e0b442
report, converted with syz-prog2c (procs=1), 90 seconds under QEMU with
dummy_hcd, raw-gadget, KASAN and DEBUG_OBJECTS_WORK.
On the base commit b4e3c4b6a36f:
WARNING: mm/slub.c:6855 at free_large_kmalloc+0x10a/0x160
kfree
usb_free_urb
smsusb_term_device
smsusb_init_device
WARNING: kernel/workqueue.c:4691 at enable_work+0x242/0x2a0
__cancel_work_sync
cancel_work_sync
smsusb_stop_streaming
smsusb_term_device
smsusb_init_device
ODEBUG: free active (active state 0) object type: work_struct
hint: do_submit_urb+0x0/0x60
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave
smsusb_submit_urb
do_submit_urb
process_one_work
With this patch applied, the same run shows none of these (76 probes).
The reproducer only reaches the probe failure path
(smscore_start_device() fails), so a disconnect while streaming and
the abortable wait were not exercised.
Tested-by: Hyeonjun Hong <hyeonjunhong330@xxxxxxxxx>