CVE-2026-89901: media: airspy: use vb2_video_unregister_device() on disconnect to fix NULL deref

Published Sep 16, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

media: airspy: use vb2videounregisterdevice() on disconnect to fix NULL deref

airspydisconnect() clears s->udev under v4l2lock, but airspystopstreaming() unconditionally calls airspyctrlmsg() and airspyfreestreambufs() afterwards. If a streaming user closes the device after disconnect, stopstreaming() runs and dereferences the NULL s->udev:

airspystopstreaming() airspyctrlmsg(s, CMDRECEIVERMODE, 0, 0, NULL, 0) usbsndctrlpipe(s->udev, 0) / NULL deref / airspyfreestreambufs(s) usbfreecoherent(s->udev, ...) / NULL deref /

The airspy driver uses vb2foprelease() in its fileoperations, so replace videounregisterdevice(&s->vdev) with vb2videounregisterdevice(&s->vdev) and move it before clearing s->udev. vb2videounregisterdevice() releases the vb2 queue, which synchronously runs airspystopstreaming() if streaming is active, so the URBs, coherent DMA stream buffers and the hardware stop control message all execute while s->udev is still valid.

vb2videounregisterdevice() locks vdev->queue->lock (vbqueuelock) internally, and stopstreaming() locks v4l2lock, so the previous outer mutexlock(&s->vbqueuelock) / mutexlock(&s->v4l2lock) pair around the unregister sequence would self-deadlock and has been removed. A short v4l2lock critical section around s->udev = NULL remains so any ioctl path that still holds the file descriptor sees coherent state.

Issue identified by automated review of the INV-003 series at https://sashiko.dev/

Affected Software

1 affected component
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Replace the airspy disconnect unregister logic to call vb2_video_unregister_device(&s->vdev) before clearing s->udev (i.e., move vb2_video_unregister_device() ahead of s->udev = NULL). Use a short v4l2_lock critical section only for s->udev = NULL, while keeping the unregister sequence coherent so stop_streaming() does not dereference NULL.

    media: airspy (v4l2/ vb2 disconnect path) disconnect sequence for device unregister = Use vb2_video_unregister_device() on disconnect and unregister before clearing s->udev

Event History

Sep 16, 2026
CVE Published
via MITRE·10:32 AM
Data Sourced
via MITRE·10:32 AM
Description

Frequently Asked Questions

1

What conditions are required to trigger the NULL dereference?

An Airspy device must be disconnected while streaming is active, followed by a streaming user closing the device. The close path then runs the stream-stop routine after the USB device pointer has been cleared.

2

Which systems are exposed to this issue?

Systems using the Linux kernel Airspy media driver are exposed when they have an Airspy device in use with active streaming. The issue is tied to device disconnect handling rather than normal streaming alone.

3

What observable behavior may indicate the system has encountered this issue?

A NULL-pointer dereference can occur during the stream shutdown path after an Airspy USB disconnect. The failing operations include sending the receiver-stop control message and freeing coherent DMA stream buffers through the cleared USB device pointer.

4

How does the resolved change prevent the failure?

The corrected disconnect path unregisters the video device through the vb2-specific unregister function before clearing the USB device pointer. This synchronously stops active streaming and releases URBs and DMA buffers while the USB device pointer remains valid.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203