Skip to content
CVE PROGRAM SOURCE RECORDUnscored

CVE-2026-139049

media: hws: Wait for IRQ handler before returning buffers

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.

Affected products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

Linux Linux

Default version status: unaffected

  • ba07fd2f5742e8b0d965003b34c7a44eb4f67e53 to < 9be75b4b0b37f6720cf7255c5c3ad021ca08ee3baffected
  • ba07fd2f5742e8b0d965003b34c7a44eb4f67e53 to < 1ba17b5a54187e8bb251ff9636ed65c84719b013affected

Linux Linux

Default version status: affected

  • 7.2affected
  • 0 to < 7.2unaffected
  • 7.3.4 to ≤ 7.3.*unaffected
  • 7.4-rc1 to ≤ *unaffected

References