CVE-2026-68213 in Linuxinfo

Summary

by MITRE • 08/10/2026

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

media: rtl2832_sdr: Return queued buffers on start_streaming() failure

The vb2 framework hands buffers to the driver via buf_queue() before calling start_streaming(). If start_streaming() returns an error without first returning those buffers via vb2_buffer_done(), vb2_start_streaming() fires WARN_ON(owned_by_drv_count) and the queued buffers leak.

rtl2832_sdr_start_streaming() had multiple error paths that hit this trap: two direct early returns (-ENODEV, -ERESTARTSYS), plus six `goto err` paths covering subdev s_power, tuner setup, ADC setup, stream-buffer allocation, urb allocation, and urb submission failures. None of them returned the queued buffers.

The original function had no distinct success exit and fell straight through into the err label, which previously only did mutex_unlock and "return ret". Adding queued-buffer cleanup at err must therefore be paired with an explicit success return; otherwise every successful start would also drain the buffer queue and kill streaming. Add that success return, then add rtl2832_sdr_cleanup_queued_bufs() at the err label and before each early return.

The cleanup helper takes a vb2_buffer_state argument so that the start_streaming error paths can pass VB2_BUF_STATE_QUEUED (as expected by userspace on start_streaming failure) while stop_streaming keeps its existing VB2_BUF_STATE_ERROR semantics.

This mirrors the uvcvideo fix in commit 4cf3b6fd54eb ("media: uvcvideo: Return queued buffers on start_streaming() failure").

The err label still does not roll back power_ctrl(), frontend_ctrl(), the POWER_ON flag, or stream/URB allocations that may have happened before the failing step. Those are pre-existing leaks of a different class and are not addressed here.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/10/2026

The vulnerability identified in the linux kernel's rtl2832_sdr driver represents a critical buffer management flaw that can lead to resource leakage and potential system instability during streaming operations. This issue specifically affects the media subsystem's handling of buffer queues within the vb2 framework, where buffers are queued before start_streaming() is invoked. When start_streaming() encounters an error condition without properly returning previously queued buffers via vb2_buffer_done(), the framework triggers a warning mechanism that indicates driver ownership count discrepancies, resulting in leaked buffers that remain stranded in the queue.

The technical implementation of this vulnerability stems from multiple error paths within the rtl2832_sdr_start_streaming() function that fail to properly clean up queued buffers before returning error codes. The function contains direct early returns at two points (-ENODEV and -ERESTARTSYS) along with six distinct goto err paths that handle various failure conditions including subdev power management, tuner configuration, ADC setup, stream buffer allocation, urb allocation, and urb submission failures. None of these error handling pathways included buffer cleanup operations, creating a scenario where successfully queued buffers would remain in the system indefinitely.

The operational impact of this vulnerability extends beyond simple resource leakage to potentially affect system stability and performance during media streaming operations. When buffers accumulate due to failed streaming attempts, they consume memory resources that could otherwise be utilized for legitimate streaming activities. This creates a denial-of-service condition where repeated failed streaming attempts gradually deplete available buffer resources, ultimately preventing successful streaming operations from occurring. The vulnerability specifically impacts the vb2_start_streaming() function's internal validation mechanism that enforces ownership count consistency through WARN_ON(owned_by_drv_count) checks.

The fix implemented addresses this vulnerability by introducing explicit buffer cleanup mechanisms that properly handle both success and failure conditions within the streaming process. The solution involves adding a dedicated rtl2832_sdr_cleanup_queued_bufs() helper function that correctly manages buffer state transitions based on vb2_buffer_state arguments, ensuring that error paths return buffers with VB2_BUF_STATE_QUEUED semantics while maintaining existing error semantics for stop_streaming operations. This approach mirrors the established pattern used in the uvcvideo driver fix referenced in commit 4cf3b6fd54eb, demonstrating a consistent methodology for addressing similar buffer management issues across kernel media drivers.

The mitigation strategy maintains the distinction between different types of resource management during streaming operations by ensuring that successful streaming paths continue to function normally while failed attempts properly release queued resources. This solution specifically targets the immediate buffer leakage issue without addressing other pre-existing resource leaks related to power control, frontend management, or allocation rollbacks that may have occurred prior to the failing step. The implementation follows established kernel patterns for error handling and resource cleanup, ensuring compatibility with existing driver interfaces while preventing the accumulation of stranded buffers in memory.

This vulnerability aligns with common security concerns identified in CWE categories related to resource management and buffer handling within kernel drivers, specifically addressing issues around improper resource release and state management during error conditions. The fix demonstrates proper adherence to kernel development practices for maintaining system stability through careful buffer lifecycle management, preventing potential escalation of resource exhaustion into more serious system reliability issues. The solution maintains backward compatibility while strengthening the driver's resilience against failure scenarios that could compromise system resources or operational continuity.

Responsible

Linux

Reservation

07/30/2026

Disclosure

08/10/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!