HIGH Introduced in 5.0
vicodec FWHT Buffer Overflow
CVE-2026-89724
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
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.
02KernelScan AI Analysis
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.
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.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.0 | 5.10.270 | f7ae26c100a6 |
| 5.15 | 5.0 | 5.15.221 | 6ea647e76c44 |
| 6.1 | 5.0 | 6.1.188 | d40838a63f2b |
| 6.12 | 5.0 | 6.12.109 | 84cfebf7f422 |
| 6.18 | 5.0 | 6.18.50 | 8c14472431e2 |
| 6.6 | 5.0 | 6.6.157 | e21cccc29b84 |
| 7.2 | 5.0 | 7.2.4 | b95315ffc66b |
| mainline | 5.0 | 7.3 | cf4500ebf6fb |
| cip/5.10 | 5.0 | 5.10.271-cip78 | f7ae26c100a6 |
| cip/6.1 | 5.0 | 6.1.189-cip61 | d40838a63f2b |
| cip/6.1-rt | 5.0 | 6.1.189-cip61-rt32 | d40838a63f2b |
| cip/6.12 | 5.0 | 6.12.111-cip32 | 84cfebf7f422 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |