CVE-2026-99469: media: gspca: use vb2_video_unregister_device() on disconnect
In the Linux kernel, the following vulnerability has been resolved:
media: gspca: use vb2videounregisterdevice() on disconnect
gspca uses vb2foprelease(), but gspcadisconnect() only unregisters the video device. If the queue owner closes the device after USB disconnect, vb2foprelease() releases the queue and invokes gspcastopstreaming() at that point.
gspcastreamoff() calls subdriver stop callbacks and usbsetinterface() through gspcadev->dev. By the time the late close runs, the USB core can have freed the usbdevice, resulting in a use-after-free. This was observed as a KASAN use-after-free in sdstopN().
Use vb2videounregisterdevice() so the queue is released and streaming is stopped synchronously during disconnect, while the usbdevice is still valid. Since the helper takes the queue lock, which is usblock, call it after dropping that lock.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Compensating control
In gspca disconnect handling, use vb2_video_unregister_device() so the queue is released and streaming is stopped synchronously during disconnect.