CVE-2026-139049: media: hws: Wait for IRQ handler before returning buffers
In the Linux kernel, the following vulnerability has been resolved:
media: hws: Wait for IRQ handler before returning buffers
hwsstopstreaming() disables capture and then collects the active and queued buffers straight away. Clearing capactive and setting stoprequested 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 irqlock before it touches the buffer, so stopstreaming can run in between. Without a nextprepared buffer both paths complete the same buffer, and the second vb2bufferdone() hits the WARNON for a buffer that is no longer active. With a nextprepared buffer the snapshot is the only remaining reference to the old active buffer, so stopstreaming returns without it and vb2 reports "stopstreaming operation is leaving buffer %u in active state" before completing it with an error.
Either way the driver breaks the vb2 rule that stopstreaming 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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In hws_stop_streaming(), after disabling capture, wait for the VDONE IRQ handler to finish before collecting and returning active and queued buffers.