Skip to main content
Menu
CVEs

Linux kernel out-of-bounds write in vicodec frame dimension rounding

CVE-2026-139042EUVD-2026-138794GHSA-PXQV-94WV-8W5JPublished November 30, 2026, updated

7.8HighCNA
Exploited
No known exploitation
Fix
No fix listed
Who is exposed
Specific setups only

Summary

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

media: vicodec: fix out-of-bounds write on under-rounded coded dimensions

A capture format whose width or height is one more than a multiple of 16 makes the FWHT codec write one 8x8 block row, or column, past the end of the capture plane, and read the same block out of the reference frame for P-coded frames.

vic_round_dim() is documented to round a frame dimension up so that both the luma and the chroma plane end up a multiple of 8, but it only rounds the chroma plane:

round_up((dim) / (div), 8) * (div)

For div == 2 the result is a multiple of 16 in every case but one: when dim % 16 == 1, dim / div is already a multiple of 8 and the macro returns dim - 1. encode_plane() and decode_plane() round the same dimension with round_up(dim, 8), which yields dim + 7 -- one block more than the coded dimension that sized the buffer.

On a KASAN-enabled kernel, a 641x360 YUYV P-frame triggers:

BUG: KASAN: slab-out-of-bounds in add_deltas+0x450/0xcc0 Read of size 1 at addr ffff888009070800 by task trigger_bin/70

Call Trace: add_deltas+0x450/0xcc0 decode_plane+0x1916/0x3390 fwht_decode_frame+0x173/0x620 v4l2_fwht_decode+0x751/0x1120 device_run+0x6bb/0x1850

Round the dimension itself up to a multiple of 8 * div. The rounding changes only for div == 2 and dim % 16 == 1, and MAX_WIDTH and MAX_HEIGHT are both multiples of 16, so the rounded value still fits the advertised limits.

Who should check

Anyone running Linux kernels with the vicodec virtual codec test module loaded, where local users can drive its stateful FWHT decoder.

“the vicodec test module is loaded”

cve.org

What to do

  1. Check whether your setup matches what the bug needs.

    Capture format width or height is one more than a multiple of 16 (for example width 641). The vicodec test module must be loaded. Capture format set to YUYV or UYVY.
  2. Workaround: The facts do not name a workaround. Since the vicodec test module is a stated precondition, keeping it unloaded removes that precondition.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-139042 (media: vicodec: fix out-of-bounds write on under-rounded coded dimensions), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-139042 (entry last updated 2026-12-01):
Affected:
- Linux Linux: version range not reported
- Linux Linux: versions 5.1
Fixed versions: none listed yet.
Conditions (all must be true for the bug to be hit):
- Capture format width or height is one more than a multiple of 16 (for example width 641). (source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e7259565c1246c6d20fe55815bf8e4e3f1d05363)
- The vicodec test module must be loaded. (source: https://www.cve.org/CVERecord?id=CVE-2026-139042)
- Capture format set to YUYV or UYVY. (source: https://www.cve.org/CVERecord?id=CVE-2026-139042)
Setup: the bug needs a feature or setting that is off by default or uncommon. Check whether each asset has it on.
Attacker needs: local access, low-privilege login, no user action.
CISA KEV: CVE-2026-139042 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-139042 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/e7259565c1246c6d20fe55815bf8e4e3f1d05363
- https://git.kernel.org/stable/c/673200195101b91f2acc2e2d8338bb6e47b897df
- https://git.kernel.org/stable/c/6f2a9c71cd0a54b3d8dbfcf534506f165f5d5fd5
- https://git.kernel.org/stable/c/27ea3bc799033643aab1df06a3f0e9e16ad5a565
- https://git.kernel.org/stable/c/1a5ec52bc663c10a975451eba090a6c51283c060
- https://git.kernel.org/stable/c/1b317507238bbee272de232a11b6585d35166db1
- https://git.kernel.org/stable/c/805d4167f7cc419fac6687da3f0fcab96d1955d0
- https://git.kernel.org/stable/c/0183746ebca4c478027e2261b904f844f1443b19
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-139042
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-139042"}.

Affected versions

cve.now Index

38Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
  • Severity7.8/10CVSS 7.8
  • No patch5/5No patch listed yet

What would change the score

  • Would score about 88 if added to CISA KEV
  • Would score about 83 if CISA's SSVC rates exploitation active
  • Would score about 48 if CISA's SSVC rates it automatable

Timeline

  1. CVE published
  2. First seen by cve.now1 day
  3. Record last updated
  4. Posted on X by cve.now

Evidence 10

Questions about CVE-2026-139042

Is CVE-2026-139042 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

The bug is an out-of-bounds write in the kernel's vicodec driver: when the capture buffer's width or height is under-rounded, the driver writes past the end of the buffer. This can corrupt kernel memory, leak bytes to the user, or crash the kernel.

Source: git.kernel.org, cve.org

Which versions are affected by CVE-2026-139042?

Linux: version 5.1.

Source: cve.now feed data

Am I affected, and how do I check?

The reported conditions are the vicodec test module being loaded and the capture format being set to YUYV or UYVY with S_FMT, with a width or height one more than a multiple of 16 (for example 641). To check the module, look whether vicodec is loaded in the kernel module list. The checked facts name no affected version range.

Source: git.kernel.org, cve.org

How do I fix CVE-2026-139042?

The checked facts name no fixed version or patch identifier, so no upgrade target can be given from them. Check the vendor's kernel advisory or the upstream fix for this change.

Source: git.kernel.org, cve.org

What if there's no patch?

The facts do not name a workaround. Since the vicodec test module is a stated precondition, keeping it unloaded removes that precondition.

Source: git.kernel.org, cve.org

No corrections so far. Something wrong on this page? Report an error.