CVE-2026-138914: Linux kernel Amlogic video decoder writes a 32-aligned frame into a buffer sized for the raw width

ByLinuxtastic

December 1, 2026 #CVE, #Linux Kernel

The Meson video decoder (drivers/staging/media/meson/vdec/vdec.c) drives the hardware decoder on Amlogic SoCs, the chips in a large share of Arm set-top boxes and single-board computers. The hardware “writes a whole canvas of ALIGN(width, 32) x ALIGN(height, 32)” and reports a stride to match, but get_output_size() “derives sizeimage from the raw width x height”, so “when the width is not a multiple of 32 the planes are too small for the advertised stride” and “the decoder writes past the buffer”. The record’s own example is a 720×360 NV12M stream whose luma plane is 262,144 bytes where 264,960 are needed, and 282,624 for the canvas the firmware fills. Both the kernel CNA and Red Hat score it 7.8; Red Hat rates it Important and lists every RHEL release as not affected. If a board has the meson_vdec driver, upgrade it to a kernel at or above 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63 or 7.3.4 and reboot; x86 and non-Amlogic hosts are not affected.

CVE-2026-138914 at a glance.

ComponentLinux kernel, Amlogic Meson V4L2 memory-to-memory video decoder (staging): get_output_size() and the capture-plane sizing in drivers/staging/media/meson/vdec/vdec.c
Affected versionsmainline 5.3 up to 7.4-rc1 (from commit 3e7f51bd); 5.10.x below 5.10.275, 5.15.x below 5.15.226, 6.1.x below 6.1.193, 6.6.x below 6.6.163, 6.12.x below 6.12.117, 6.18.x below 6.18.63, 7.3.x below 7.3.4. Kernels before 5.3 are not affected
Fixed inmainline 7.4-rc1 (commit b3a805dd) and stable 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63, 7.3.4; eight fix commits in the record. The fix sizes “the planes from the aligned canvas the hardware actually uses”
Severitykernel CNA CVSS 3.1 7.8 High (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H); NVD Received with no score, CWE or CPE of its own. Red Hat Important, 7.8 with the same vector, CWE-787 (out-of-bounds write), score marked draft; Ubuntu needs triage on every release with no priority shown; SUSE not reachable
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30, released 30 November). EPSS: no score yet on 1 December 2026
Who is exposedAmlogic boards and boxes (S905, S912, S922 and relatives) running an upstream, Debian, Ubuntu, Armbian or LibreELEC kernel with CONFIG_VIDEO_MESON_VDEC, which is where media players such as Kodi use the hardware decoder. The attacker is any local process that can open the /dev/video* node and feed it a stream with a width that is not a multiple of 32; the write goes into whatever follows the capture buffer, including DMA-bufs shared with the display. Red Hat lists every RHEL release as not affected and calls exposure on RHEL “extremely limited”; x86 servers cannot carry the driver
PublishedCVE record 30 November 2026 (kernel CNA, updated 1 December); this page built 1 December 2026, last updated 1 December 2026

What it is

A V4L2 memory-to-memory decoder hands the application buffers for decoded frames and tells it, through bytesperline and sizeimage, how large they must be. The Meson hardware does not write exactly the frame it was asked for: amvdec_set_canvases() programmes a canvas whose width and height are both rounded up to 32, and the driver already reports bytesperline = ALIGN(width, 32). The one number it got wrong was the buffer size, which get_output_size() computed from the unaligned dimensions, so for 720×360 NV12M the luma plane was 262,144 bytes against the 264,960 a 736-byte stride needs and the 282,624 the firmware actually fills. “1280×720 and 1920×1080 are not affected” because both are already multiples of 32.

The overrun lands wherever the next allocation is. The symptom that led to the fix was benign — importing the capture DMA-buf into DRM fails, drmModeAddFB2() returns -EINVAL, “so e.g. Kodi plays the sound over a black screen” — but the write itself is a hardware DMA past the end of a buffer whose size the application chose, from a stream the application chose, and that is what the 7.8 score describes: a local process that can open the decoder can corrupt memory with content it controls.

The fix sizes the planes from the aligned canvas, so the buffers the decoder advertises are as large as the ones the hardware writes. It was tested on an S905X (GXL p212) board under LibreELEC 12 with 720×360 and 1920×1080 H.264 “through V4L2 m2m + DRM PRIME with no AddFB2 errors”. git.kernel.org refused our reader, so the change is described from the CNA’s copy of the commit message and the one file the record names.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one.

DistributionStatusFixed package
AlpineNot consulted for this page—
Debianbookworm’s 6.1 kernel (6.1.176-1, security 6.1.192-3) vulnerable; trixie fixed in both the plain and security rows; forky and sid fixed; no DSA or DLA on 1 December 2026trixie 6.12.117-1 (security 6.12.118-1); forky and sid 7.3.6-1 (fix recorded at 7.3.4-1); nothing for bookworm on 1 December 2026
Ubuntuthe linux package is needs triage on every release from 14.04 to 26.10; no priority set and nothing released or in progress on 1 December 2026nothing on 1 December 2026
RHEL, Rocky, Alma, CentOS StreamImportant, 7.8, CWE-787 (bug 2586431); not affected on RHEL 6, 7, 8, 9 and 10 (kernel and kernel-rt) and on the OpenShift RHCOS images; no erratanone needed per Red Hat
openSUSE/SLETracker unreachable on 1 December 2026 (client error); nothing inferred—
Fedora, Arch; self-built kernels; Armbian and LibreELECNot consulted; upstream stable versions apply5.10.275 / 5.15.226 / 6.1.193 / 6.6.163 / 6.12.117 / 6.18.63 / 7.3.4 or later

How to check

Three questions, in order: which kernel is running, is the Meson decoder built or loaded, and which users can open its video node. The second settles it for anything that is not an Amlogic board.

# 1. the running kernel (compare with the fixed stable version for its series)
uname -r

# 2. is the driver built, loaded, or loadable (Amlogic arm64 boards only)
grep -E 'CONFIG_VIDEO_MESON_VDEC=' /boot/config-$(uname -r) 2>/dev/null
lsmod | grep -E '^meson_vdec'
modinfo -n meson_vdec 2>/dev/null
grep -l 'amlogic,.*vdec' /sys/firmware/devicetree/base/soc/*/compatible 2>/dev/null

# 3. the decoder node and who can open it
v4l2-ctl --list-devices 2>/dev/null | grep -A2 -i meson
ls -l /dev/video* 2>/dev/null

A kernel at or above the fixed stable version for its series is done. A machine with no meson_vdec module and no Amlogic decoder in its device tree cannot be reached by this bug, and that is every x86 host and every RHEL kernel. An Amlogic box whose /dev/video* node is in the video group with the media player’s user in it is the normal case, and the risk is the content: any stream the player is pointed at, with a width such as 720, triggers the overrun, so an untrusted file or URL is the attacker.

How to fix it

Install the fixed kernel and reboot; a kernel bug is not patched in place and the decoder stays in memory until the machine boots the new image. Debian trixie and later already carry the fix; Ubuntu had not triaged it and Red Hat is not affected on 1 December 2026. Armbian and LibreELEC builds follow their own kernel branches, so check the version those ship rather than the distribution name.

# Debian trixie / forky / sid
apt update && apt install linux-image-arm64 && systemctl reboot
# Ubuntu, Armbian (apt-based): when the builds land
apt update && apt full-upgrade && systemctl reboot
uname -r

# until then, on a box that plays untrusted media: use software decoding or keep the driver out of memory
echo 'install meson_vdec /bin/false' > /etc/modprobe.d/meson-vdec.conf

Blocking the module falls back to software decoding, which an S905 can manage for standard-definition and some 1080p content and cannot for 4K; it is a stop-gap for a box that opens arbitrary streams, not a fix. What not to do: do not conclude that 1080p-only use is safe because the record names 1280×720 and 1920×1080 as unaffected; the width is the stream’s, not the display’s, and a 720-wide file in a 1080p playlist is the trigger.

Sources

  • CVE-2026-138914 at CVE.org — the kernel CNA record (30 November 2026, updated 1 December when the CNA added its CVSS 3.1 metric): the commit message with the 720×360 arithmetic and the LibreELEC test note, the git and version ranges, CVSS 3.1 7.8
  • Fix commits on git.kernel.org: b3a805dd, c587de78, cb46dc57, 6668d905, 0d6bc58d, 10a7475b, b186accb, 2f643182; git.kernel.org refuses automated readers, so the diffs were not read for this page and the fix is described from the CNA’s copy of the commit message and the file the record names
  • NVD entry — Received on 30 November, carrying the CNA’s ranges; no NVD score, CWE or CPE on 1 December
  • Distribution trackers: Debian (trixie 6.12.117-1 fixed, bookworm vulnerable) · Ubuntu (needs triage, no priority) · Red Hat (Important 7.8, CWE-787, not affected on every RHEL release) · SUSE (unreachable on 1 December)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS: no score for this CVE on 1 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.