{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139049","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.911Z","datePublished":"2026-11-30T13:27:23.651Z","dateUpdated":"2026-12-01T05:40:54.343Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:40:54.343Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: hws: Wait for IRQ handler before returning buffers\n\nhws_stop_streaming() disables capture and then collects the active and\nqueued buffers straight away. Clearing cap_active and setting\nstop_requested only stops a VDONE handler that has not checked them\nyet; one already running on another CPU has passed those checks and\ncannot be recalled.\n\nThat handler snapshots v->active into a local pointer and drops\nirq_lock before it touches the buffer, so stop_streaming can run in\nbetween. Without a next_prepared buffer both paths complete the same\nbuffer, and the second vb2_buffer_done() hits the WARN_ON for a buffer\nthat is no longer active. With a next_prepared buffer the snapshot is\nthe only remaining reference to the old active buffer, so\nstop_streaming returns without it and vb2 reports \"stop_streaming\noperation is leaving buffer %u in active state\" before completing it\nwith an error.\n\nEither way the driver breaks the vb2 rule that stop_streaming has to\ngive back every buffer it owns before it returns.\n\nWait for the handler once the hardware is disabled and before the\nbuffers are collected. The live mode change and the channel cleanup\npaths already do this around the same collect helper."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"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().\nAC: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.\nPR: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.\nUI: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.\nS: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.\nC: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.\nI: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.\nA: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."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/pci/hws/hws_video.c"],"versions":[{"version":"ba07fd2f5742e8b0d965003b34c7a44eb4f67e53","lessThan":"9be75b4b0b37f6720cf7255c5c3ad021ca08ee3b","status":"affected","versionType":"git"},{"version":"ba07fd2f5742e8b0d965003b34c7a44eb4f67e53","lessThan":"1ba17b5a54187e8bb251ff9636ed65c84719b013","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/pci/hws/hws_video.c"],"versions":[{"version":"7.2","status":"affected"},{"version":"0","lessThan":"7.2","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/9be75b4b0b37f6720cf7255c5c3ad021ca08ee3b"},{"url":"https://git.kernel.org/stable/c/1ba17b5a54187e8bb251ff9636ed65c84719b013"}],"title":"media: hws: Wait for IRQ handler before returning buffers","x_generator":{"engine":"bippy-1.2.0"}}}}