# CVE-2026-31583: media: em28xx: fix use-after-free in em28xx\_v4l2\_open()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-04-24T14:42:12.923Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 3c0283a59e36e3707c4a81f4952e362d31f876b8; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 2cbf81f76842e46bdf25823c70e1db4044a65678; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 38a327221f7f765e7d853b7bafe47e342441ec85; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< b5d141ea15f173f15b9f0a72965902f3428c0d92; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 5fb2940327722b4684d2f964b54c1c90aa277324; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 871b8ea8ef39a6c253594649f4339378fad3d0dd; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 6b9e66437cc6123ddedac141e1b8b6fcf57d2972; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< dd2b888e08d3b3d6aacd65d76cd44fac11da750f; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< a66485a934c7187ae8e36517d40615fa2e961cff
- Anyone running Linux 3.16

## Description

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

media: em28xx: fix use-after-free in em28xx\_v4l2\_open()

em28xx\_v4l2\_open() reads dev-\>v4l2 without holding dev-\>lock,
creating a race with em28xx\_v4l2\_init()'s error path and
em28xx\_v4l2\_fini(), both of which free the em28xx\_v4l2 struct
and set dev-\>v4l2 to NULL under dev-\>lock.

This race leads to two issues:
 - use-after-free in v4l2\_fh\_init() when accessing vdev-\>ctrl\_handler,
   since the video\_device is embedded in the freed em28xx\_v4l2 struct.
 - NULL pointer dereference in em28xx\_resolution\_set() when accessing
   v4l2-\>norm, since dev-\>v4l2 has been set to NULL.

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

## Affected and fixed versions

- Linux: \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 3c0283a59e36e3707c4a81f4952e362d31f876b8; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 2cbf81f76842e46bdf25823c70e1db4044a65678; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 38a327221f7f765e7d853b7bafe47e342441ec85; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< b5d141ea15f173f15b9f0a72965902f3428c0d92; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 5fb2940327722b4684d2f964b54c1c90aa277324; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 871b8ea8ef39a6c253594649f4339378fad3d0dd; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 6b9e66437cc6123ddedac141e1b8b6fcf57d2972; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< dd2b888e08d3b3d6aacd65d76cd44fac11da750f; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< a66485a934c7187ae8e36517d40615fa2e961cff (cvelist)
- Linux: 3.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31583. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31583.md
Affected: Linux >= 8139a4d583abad45eb987b5a99b3281b6d435b7e, < 3c0283a59e36e3707c4a81f4952e362d31f876b8; >= 8139a4d583abad45eb987b5a99b3281b6d435b7e, < 2cbf81f76842e46bdf25823c70e1db4044a65678; >= 8139a4d583abad45eb987b5a99b3281b6d435b7e, < 38a327221f7f765e7d853b7bafe47e342441ec85; >= 8139a4d583abad45eb987b5…
Fixed in: Linux 3c0283a59e36e3707c4a81f4952e362d31f876b8, Linux 2cbf81f76842e46bdf25823c70e1db4044a65678, Linux 38a327221f7f765e7d853b7bafe47e342441ec85, Linux 5fb2940327722b4684d2f964b54c1c90aa277324, Linux 871b8ea8ef39a6c253594649f4339378fad3d0dd, Linux 6b9e66437cc6123ddedac141e1b8b6fcf57d2972

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31583 being exploited?

There is no confirmed exploitation: CVE-2026-31583 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-31583?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31583?

Linux \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 3c0283a59e36e3707c4a81f4952e362d31f876b8; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 2cbf81f76842e46bdf25823c70e1db4044a65678; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 38a327221f7f765e7d853b7bafe47e342441ec85; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< b5d141ea15f173f15b9f0a72965902f3428c0d92; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 5fb2940327722b4684d2f964b54c1c90aa277324; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 871b8ea8ef39a6c253594649f4339378fad3d0dd; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< 6b9e66437cc6123ddedac141e1b8b6fcf57d2972; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< dd2b888e08d3b3d6aacd65d76cd44fac11da750f; \>= 8139a4d583abad45eb987b5a99b3281b6d435b7e, \< a66485a934c7187ae8e36517d40615fa2e961cff; Linux 3.16.

### Is there a fix for CVE-2026-31583?

Yes. Fixed in Linux 3c0283a59e36e3707c4a81f4952e362d31f876b8, Linux 2cbf81f76842e46bdf25823c70e1db4044a65678, Linux 38a327221f7f765e7d853b7bafe47e342441ec85, Linux 5fb2940327722b4684d2f964b54c1c90aa277324, Linux 871b8ea8ef39a6c253594649f4339378fad3d0dd, Linux 6b9e66437cc6123ddedac141e1b8b6fcf57d2972. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-31583?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b5d141ea15f173f15b9f0a72965902f3428c0d92>
- patch: <https://git.kernel.org/stable/c/5fb2940327722b4684d2f964b54c1c90aa277324>
- patch: <https://git.kernel.org/stable/c/871b8ea8ef39a6c253594649f4339378fad3d0dd>
- patch: <https://git.kernel.org/stable/c/6b9e66437cc6123ddedac141e1b8b6fcf57d2972>
- patch: <https://git.kernel.org/stable/c/dd2b888e08d3b3d6aacd65d76cd44fac11da750f>
- patch: <https://git.kernel.org/stable/c/a66485a934c7187ae8e36517d40615fa2e961cff>
- other: <https://git.kernel.org/stable/c/3c0283a59e36e3707c4a81f4952e362d31f876b8>
- other: <https://git.kernel.org/stable/c/2cbf81f76842e46bdf25823c70e1db4044a65678>
- other: <https://git.kernel.org/stable/c/38a327221f7f765e7d853b7bafe47e342441ec85>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31583>

HTML: <https://flawdb.com/CVE-2026-31583> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31583>
