CVE-2026-31578: media: as102: fix to not free memory after the device is registered in as102_usb_probe()

Published Apr 24, 2026
·
Updated

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

media: as102: fix to not free memory after the device is registered in as102usbprobe()

In as102usb driver, the following race condition occurs: CPU0 CPU1 as102usbprobe() kzalloc(); // alloc as102devt .... usbregisterdev(); fd = sysopen("/path/to/dev"); // open as102 fd .... usbderegisterdev(); .... kfree(); // free as102devt .... sysclose(fd); as102release() // UAF!! as102usbrelease() kfree(); // DFB!!

When a USB character device registered with usbregisterdev() is later unregistered (via usbderegisterdev() or disconnect), the device node is removed so new open() calls fail. However, file descriptors that are already open do not go away immediately: they remain valid until the last reference is dropped and the driver's .release() is invoked.

In as102, as102usbprobe() calls usbregisterdev() and then, on an error path, does usbderegisterdev() and frees as102devt right away. If userspace raced a successful open() before the deregistration, that open FD will later hit as102release() --> as102usbrelease() and access or free as102devt again, occur a race to use-after-free and double-free vuln.

The fix is to never kfree(as102devt) directly once usbregisterdev() has succeeded. After deregistration, defer freeing memory to .release().

In other words, let release() perform the last kfree when the final open FD is closed.

Affected Software

7 affected componentsFixes available
Linux as102 USB driver
Linux Linux kernel<6.6.136
Linux Linux kernel>=6.7<6.12.83
Linux Linux kernel>=6.13<6.18.24
Linux Linux kernel>=6.19<6.19.14
Linux Linux kernel>=7.0<7.0.1
Microsoft azl3 kernel 6.6.134.1-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Do not call kfree(as102_dev_t) directly once usb_register_dev() has succeeded in as102_usb_probe(). If usb_deregister_dev() is invoked or disconnect occurs after registration, defer freeing the as102_dev_t instance and ensure the driver's .release() (as102_release / as102_usb_release) performs the final kfree when the last open file descriptor is closed.

    Linux kernel as102 driver (as102_usb_probe / as102_release) free_on_deregister = false

Event History

Apr 24, 2026
CVE Published
via MITRE·02:42 PM
Data Sourced
via MITRE·02:42 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 26, 2026
Data Sourced
via Microsoft·08:08 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:08 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-31578?

CVE-2026-31578 is considered to have a moderate severity level due to the potential for memory corruption.

2

How do I fix CVE-2026-31578?

To fix CVE-2026-31578, update the Linux kernel to a version that includes the patch addressing this vulnerability.

3

What systems are affected by CVE-2026-31578?

CVE-2026-31578 affects Linux kernel versions 6.6.136 and earlier, specifically within the as102 USB driver.

4

What is the impact of CVE-2026-31578?

The impact of CVE-2026-31578 includes potential system instability or crashes due to race conditions linked to the as102_usb_probe function.

5

Who does CVE-2026-31578 affect?

CVE-2026-31578 primarily affects users and systems utilizing the as102 USB driver within specific Linux kernel versions.

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