CVE-2026-138931: media: v4l2-isp: reject zero-sized parameter blocks
In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-isp: reject zero-sized parameter blocks
v4l2ispparamsvalidatebuffer() walks the blocks of a parameters buffer by adding block->size to the current offset. A block whose typeinfo[] entry is an uninitialised hole passes every check on the way there: a size of 0 is not caught by the block->size > buffersize test, and the match against the type info size compares 0 with the hole's own 0 and passes as well. The walk then makes no forward progress and loops forever.
Drivers build their typeinfo[] arrays with designated initialisers indexed by their block type enumeration, so an enumerator left without an entry leaves a zeroed hole rather than failing the build. Drivers call the validator from vb2 .bufprepare, so such a hole turns a VIDIOCQBUF on the parameters video device into an unkillable task spinning with the queue mutex held.
Reject a block whose type info entry is empty. The driver does not implement the type, so it cannot tell whether the block content is meaningful, and accepting it silently would leave that content unconstrained until a later kernel implements the type and starts validating it. The size match then always runs against a non-zero size, and no block can advance the walk by zero.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Reject V4L2 ISP parameter blocks whose type_info[] entry is empty or whose size is zero, preventing zero-progress validation loops.
Event History
Frequently Asked Questions
Who can trigger the denial of service?
A user or process able to issue VIDIOC_QBUF on the affected ISP parameters video device can trigger it by submitting a parameter block that maps to an uninitialised hole in the driver's type_info[] array.
What is the practical impact when exploitation succeeds?
The parameter-buffer validator loops without making progress, leaving an unkillable task spinning while holding the queue mutex. This can deny service to use of that video queue.
How can I tell whether a system is exposed?
Exposure requires an ISP driver whose type_info[] array contains an uninitialised entry for a block-type enumerator and access to its parameters video device. The provided fix changes validation to reject blocks whose type-info entry is empty.
Is there a workaround if the fix cannot be applied immediately?
Restrict access to the affected ISP parameters video device and prevent untrusted processes from issuing VIDIOC_QBUF to it. The vulnerability is triggered through queueing a crafted parameters buffer.