CVE-2026-31583: media: em28xx: fix use-after-free in em28xx_v4l2_open()

Published Apr 24, 2026
·
Updated

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

media: em28xx: fix use-after-free in em28xxv4l2open()

em28xxv4l2open() reads dev->v4l2 without holding dev->lock, creating a race with em28xxv4l2init()'s error path and em28xxv4l2fini(), both of which free the em28xxv4l2 struct and set dev->v4l2 to NULL under dev->lock.

This race leads to two issues: - use-after-free in v4l2fhinit() when accessing vdev->ctrlhandler, since the videodevice is embedded in the freed em28xxv4l2 struct. - NULL pointer dereference in em28xxresolutionset() when accessing v4l2->norm, since dev->v4l2 has been set to NULL.

Fix this by moving the mutexlock() before the dev->v4l2 read and adding a NULL check for dev->v4l2 under the lock.

Affected Software

7 affected componentsFixes available
Linux Linux kernel (media em28xx driver)
Linux Linux kernel<6.6.136
Linux Linux kernel>=6.12<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

    Modify em28xx_v4l2_open() to call mutex_lock() before reading dev->v4l2, and add a NULL check for dev->v4l2 while holding the lock to prevent use-after-free and NULL pointer dereference.

    Linux kernel media em28xx driver (em28xx_v4l2_open) mutex_lock placement and dev->v4l2 NULL-check = lock before reading dev->v4l2; check dev->v4l2 for NULL while holding the lock

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:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems using the Linux kernel's media em28xx driver are affected. The listed software also includes Microsoft azl3 kernel 6.6.134.1-2.

2

What does an attacker need to exploit the flaw?

The CVSS vector indicates local access, low privileges, and no user interaction are required. Exploitation depends on triggering a race while the em28xx V4L2 device is being opened and its V4L2 state is being initialized, torn down, or encountering initialization failure.

3

What failures can this race cause?

It can cause a use-after-free when V4L2 file-handle initialization accesses a video device embedded in freed memory. It can also cause a NULL pointer dereference when resolution handling accesses V4L2 state after it has been cleared.

4

How can teams determine whether they need the fix?

Review whether the running kernel includes and uses the media em28xx driver, then check whether its source contains the locking change that reads dev->v4l2 only after acquiring dev->lock and verifies it is non-NULL. The provided stable-kernel references identify commits containing the resolution.

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