Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-139049

published high CVSS 3.1 · 7.0

media: hws: Wait for IRQ handler before returning buffers

Published
30 Nov 2026, 13:27:23 UTC
Updated
01 Dec 2026, 05:40:54 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxba07fd2f5742e8b0d965003b34c7a44eb4f67e53 to < 9be75b4b0b37f6720cf7255c5c3ad021ca08ee3b · ba07fd2f5742e8b0d965003b34c7a44eb4f67e53 to < 1ba17b5a54187e8bb251ff9636ed65c84719b013 · Other versions: unaffected Affected Not stated Linux
Linux — Linux7.2 (affected) · 0 to < 7.2 (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: media: hws: Wait for IRQ handler before returning buffers hws_stop_streaming() disables capture and then collects the active and queued buffers straight away. Clearing cap_active and setting stop_requested only stops a VDONE handler that has not checked them yet; one already running on another CPU has passed those checks and cannot be recalled. That handler snapshots v->active into a local pointer and drops irq_lock before it touches the buffer, so stop_streaming can run in between. Without a next_prepared buffer both paths complete the same buffer, and the second vb2_buffer_done() hits the WARN_ON for a buffer that is no longer active. With a next_prepared buffer the snapshot is the only remaining reference to the old active buffer, so stop_streaming returns without it and vb2 reports "stop_streaming operation is leaving buffer %u in active state" before completing it with an error. Either way the driver breaks the vb2 rule that stop_streaming has to give back every buffer it owns before it returns. Wait for the handler once the hardware is disabled and before the buffers are collected. The live mode change and the channel cleanup paths already do this around the same collect helper.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.0 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The free side is a local process acting on the hws /dev/videoN node: VIDIOC_STREAMOFF or close() runs vb2_fop_release -> vb2_core_queue_release -> __vb2_queue_cancel -> hws_stop_streaming(), and then __vb2_queue_free(). The other side is the card's VDONE interrupt for a captured HDMI frame. No remote protocol carries input to hws_video_handle_vdone(). AC:H - hws_video_handle_vdone() must pass its stop_requested/cap_active check and be inside the roughly 200 ns window between spin_unlock(irq_lock) and vb2_buffer_done(). hws_stop_streaming() first spends about 2 µs on register readbacks in hws_enable_video_capture(). Winning therefore needs the hard-IRQ handler to stall (SMI/NMI/vCPU preemption) for the whole teardown, which the attacker cannot cause. PR:L - hws_open() is only v4l2_fh_open(), and the streaming ioctls (with vdev->lock=state_lock) have no capable() check. The capture node is udev GROUP=video 0660 plus the uaccess tag, so any video-group member or logged-in seat user can start streaming and close the fd. UI:N - The attacker's own process queues buffers, issues VIDIOC_STREAMON so the card raises VDONE per frame, and times STREAMOFF/close() against the frame cadence. No other user or administrator has to do anything. S:U - The freed object is the kernel's vb2_buffer/hwsvideo_buffer, allocated by vb2 for this queue, and the stale use happens in the same kernel's hard-IRQ handler. No VM, sandbox or IOMMU boundary is crossed. C:H - After kfree(vb) in __vb2_queue_free(), the handler's local done pointer feeds vb2_buffer_done(), which reads vb->state, vb->vb2_queue and vb->planes from the freed slab object. If that object is reclaimed, attacker-controlled pointers are dereferenced, which can be leveraged for kernel memory disclosure. I:H - The handler writes planes[0].bytesused, sequence and timestamp into the freed buffer. vb2_buffer_done() then does list_add_tail(&vb->done_entry, &q->done_list), atomic_dec(owned_by_drv_count) and call_void_memop(finish) through vb->vb2_queue. On a reclaimed object that is a pointer write plus an indirect call. A:H - A stale vb2_queue pointer in hard-IRQ context oopses as a fatal exception in interrupt. Even the narrower outcomes break the queue: a double vb2_buffer_done() races its unlocked state check into a double list_add, which is a BUG under BUG_ON_DATA_CORRUPTION, or leaves an active buffer behind and triggers the vb2 WARNs.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux ba07fd2f5742e8b0d965003b34c7a44eb4f67e53 to < 9be75b4b0b37f6720cf7255c5c3ad021ca08ee3b (affected · git)ba07fd2f5742e8b0d965003b34c7a44eb4f67e53 to < 1ba17b5a54187e8bb251ff9636ed65c84719b013 (affected · git)Default: unaffected Linux · cna
Linux Linux 7.2 (affected)0 to < 7.2 (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

media: hws: Wait for IRQ handler before returning buffers

Provenance

Schema
5.2
Searchable
yes
Content hash
63bd5c2cf9ddb7f7560766deb733bee7a433982a184cf7b0c155eff8b2f17ddf
Ingested
01 Dec 2026, 05:47:22 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected