]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: pvrusb2: fix URB leak in pvr2_send_request_ex
authorSzymon Wilczek <szymonwilczek@gmx.com>
Sat, 20 Dec 2025 18:24:19 +0000 (19:24 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 12:21:03 +0000 (13:21 +0100)
commita8333c8262aed2aedf608c18edd39cf5342680a7
tree78a932b80f1784b580af71fd5bb4ab48798f09fc
parent63bf2f71712c458239f44bb25cf581a06f9770dc
media: pvrusb2: fix URB leak in pvr2_send_request_ex

When pvr2_send_request_ex() submits a write URB successfully but fails to
submit the read URB (e.g. returns -ENOMEM), it returns immediately without
waiting for the write URB to complete. Since the driver reuses the same
URB structure, a subsequent call to pvr2_send_request_ex() attempts to
submit the still-active write URB, triggering a 'URB submitted while
active' warning in usb_submit_urb().

Fix this by ensuring the write URB is unlinked and waited upon if the read
URB submission fails.

Reported-by: syzbot+405dcd13121ff75a9e16@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=405dcd13121ff75a9e16
Signed-off-by: Szymon Wilczek <szymonwilczek@gmx.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/usb/pvrusb2/pvrusb2-hdw.c