CVE-2026-89894: media: cx231xx: reject geometry changes while the VBI queue is busy
In the Linux kernel, the following vulnerability has been resolved:
media: cx231xx: reject geometry changes while the VBI queue is busy
vidiocsfmtvidcap() and vidiocsstd() change the device-wide dev->width / dev->norm but only refuse the change when the video queue (dev->vidq) is busy. The VBI queue (dev->vbiq) shares that same geometry: cx231xxinitvbiisoc() latches dmaq->linesperfield from dev->norm, the VBI videobuf2 plane is sized from dev->width / dev->norm in vbiqueuesetup() and vbibufprepare(), and cx231xxdovbicopy() then recomputes the destination offset from the live dev->width and the latched linesperfield on every URB completion:
offset = linescompleted (dev->width << 1) + ...; if (dmaq->currentfield == 2) offset += dev->width 2 dmaq->linesperfield; memcpy(plane + offset, pbuffer, lencopy);
Because the VBI node shares videoioctlops with the video node, an application can size a small VBI plane (REQBUFS/QBUF with a small width, or with the NTSC standard), then enlarge dev->width (or switch dev->norm to PAL) through the video node while the VBI stream is running -- the change is allowed because only dev->vidq is checked -- and let the device deliver a field-2 VBI payload. cx231xxdovbicopy() now computes the offset with the larger geometry and memcpy()s past the end of the smaller plane that was already allocated, a heap out-of-bounds write whose offset is attacker-chosen and whose contents come from the device. The per-field guard in cx231xxcopyvbiline() does not help: it bounds the copy against the latched linesperfield, not the plane's real capacity, and vb2 does not re-run bufprepare() for an already prepared buffer.
Refuse the format/standard change when the VBI queue is busy as well, so the geometry cannot change underneath an allocated VBI buffer.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems using the Linux kernel cx231xx media driver are exposed when the device’s VBI queue is active. The issue requires use of both the VBI and video nodes that share the device-wide geometry and video standard settings.
What does an attacker need to do to trigger the vulnerable condition?
An application must allocate and queue VBI buffers using a smaller width or NTSC-sized geometry, start VBI streaming, and then change the width or switch the standard to PAL through the video node. The video queue must not be busy, because the original checks only blocked changes when that queue was active.
What can be done until the fix is deployed?
Do not allow width, format, or video-standard changes while VBI streaming is running. Stop the VBI stream and release or reconfigure its buffers before making geometry or standard changes through the video node.
How can I identify a potentially affected workflow?
Look for applications that operate the cx231xx VBI and video nodes concurrently, especially workflows that issue VBI REQBUFS/QBUF calls and then use video-node ioctls to change capture format or television standard while VBI buffers remain queued.