KernelScan.io

HIGH Introduced in 5.0

vicodec FWHT Buffer Overflow

CVE-2026-89724

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: media: vicodec: fix out-of-bounds write in FWHT encoder vidioc_s_fmt_vid_out() sizes the encoder CAPTURE buffer from the compressed descriptor pixfmt_fwht, whose sizeimage_mult is 3: coded_w * coded_h * 3 + sizeof(struct fwht_cframe_hdr). fwht_encode_frame() encodes one plane per component, and an incompressible plane takes the FWHT_FRAME_UNENCODED path in encode_plane(), copying the plane verbatim. For a 4-component pixel format all four planes are full resolution (width_div == height_div == 1), so a frame that forces every plane through the unencoded fallback writes sizeof(struct fwht_cframe_hdr) + 4 * coded_w * coded_h bytes, overrunning the plane by coded_w * coded_h, which can result in corruption of adjacent kernel heap memory. Bump pixfmt_fwht.sizeimage_mult from 3 to 4, matching the largest components_num among the supported raw formats, so the capture buffer is always large enough for the unencoded fallback.

02

Engine v0.6.0

Risk summary

A local user with access to the vicodec video device node can trigger an out-of-bounds heap write by encoding a 4-component pixel format with incompressible data. The overflow size is controlled by the frame dimensions and corrupts adjacent kernel heap memory, potentially leading to privilege escalation or a kernel crash. The vicodec test driver module must be loaded for the vulnerability to be reachable.

Affecteddrivers/media/test-drivers/vicodec/vicodec-core.c (media vicodec)

Vulnerability analysis

The vicodec test driver's FWHT encoder sizes its capture buffer assuming at most three full-resolution component planes, but 4-component pixel formats such as ARGB32 produce four full-resolution planes. When the encoder encounters incompressible data it falls back to copying each plane verbatim into the capture buffer, writing up to one full plane's worth of data past the buffer end and corrupting adjacent kernel heap memory. The fix increases the buffer size multiplier from 3 to 4 so the capture buffer always accommodates the worst-case four-plane unencoded fallback. The vulnerable path is reachable locally by any user with access to the vicodec video device node, which requires the vicodec test driver module to be loaded; no special hardware or kernel capabilities are needed.

03

BranchIntroducedFixed inPatch commit
5.105.05.10.270f7ae26c100a6
5.155.05.15.2216ea647e76c44
6.15.06.1.188d40838a63f2b
6.125.06.12.10984cfebf7f422
6.185.06.18.508c14472431e2
6.65.06.6.157e21cccc29b84
7.25.07.2.4b95315ffc66b
mainline5.07.3cf4500ebf6fb
cip/5.105.05.10.271-cip78f7ae26c100a6
cip/6.15.06.1.189-cip61d40838a63f2b
cip/6.1-rt5.06.1.189-cip61-rt32d40838a63f2b
cip/6.125.06.12.111-cip3284cfebf7f422

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)