# CVE-2026-139560: media: em28xx: hold the vb2 queue lock when releasing the queue on close


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 30 Nov 2026
- **Updated:** 30 Nov 2026
- **Also known as:** DEBIAN-CVE-2026-139560, GHSA-76pv-j6hv-f39x, UBUNTU-CVE-2026-139560

## What is CVE-2026-139560?

CVE-2026-139560 is a vulnerability in Linux, published on 30 Nov 2026. 

### Official description

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

media: em28xx: hold the vb2 queue lock when releasing the queue on close

Commit de626073dfcb ("media: em28xx: drop 'users' field") replaced the
vb2_fop_release() call in em28xx_v4l2_close() with
_vb2_fop_release(filp, NULL) under dev->lock. vb2_fop_release() took
the vb2 queue lock, but the new call takes no lock at all.

The video and VBI queues have their own locks (vb_queue_lock and
vb_vbi_queue_lock), and v4l2_ioctl_get_lock() serializes the queue
ioctls with those rather than dev->lock. The queue can therefore be
released on close while another file handle is in the middle of
VIDIOC_REQBUFS. __vb2_queue_alloc() adds each buffer to the queue before
allocating its planes, so the release can find an MMAP buffer whose
mem_priv is still NULL and hand it to vb2_vmalloc_put():

  BUG: kernel NULL pointer dereference, address: 0000000000000020
  RIP: 0010:vb2_vmalloc_put+0xe/0x50 [videobuf2_vmalloc]
  Call Trace:
   __vb2_queue_free+0x14e/0x350 [videobuf2_common]
   vb2_core_queue_release+0x3b/0x80 [videobuf2_common]
   _vb2_fop_release+0x44/0x70 [videobuf2_v4l2]
   em28xx_v4l2_close+0x60/0x140 [em28xx_v4l]
   v4l2_release+0x9d/0xf0 [videodev]
   __fput+0xfd/0x280

This was hit with OBS on a MyGica iGrabber (card=105).

Pass the queue lock to _vb2_fop_release(). Taking it while holding
dev->lock matches the existing order in em28xx_v4l2_fini(), where
vb2_video_unregister_device() takes the queue lock under dev->lock.

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


## How do I fix CVE-2026-139560?

Upgrade to a fixed version.

## Is CVE-2026-139560 being exploited?

There is no known exploitation of CVE-2026-139560 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-139560 and fix it if it is affected.

What it is: CVE-2026-139560 is a vulnerability in Linux, published on 30 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-139560 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-139560/ (Markdown: https://insights.sbomify.com/CVE-2026-139560/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-139560
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-139560
- OSV: https://osv.dev/vulnerability/CVE-2026-139560

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-139560/
Summaries are generated and may contain mistakes; the official description above is the record.
