CVE-2026-138914
published high CVSS 3.1 · 7.8media: meson: vdec: size capture planes from the aligned canvas
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux3e7f51bd96077acad6acd7b45668f65b44233c4e to < c587de78ffa123d17a93026d78da7e76823cc4e0 · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < cb46dc57d169509e69a3e218e970785c2b79f7f8 · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < 6668d9052231ae3daf6c8bfc8f6d379f1f35ffd5 · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < 0d6bc58d7f319c63f8525efb630de1ce55b7d780 · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < 10a7475bc6d1cef7d5c1e7f27c8de4a011ebbbed · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < b186accb1d7d8f9aa7b5183d7eb9ff26ac568ce3 · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < 2f643182e4feef3a41bec2dd98c1294750392326 · 3e7f51bd96077acad6acd7b45668f65b44233c4e to < b3a805dd5a83ba8c85e2085d3411eb9975e0aea4 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.3 (affected) · 0 to < 5.3 (unaffected · semver) · 5.10.275 through 5.10.* (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
Description
In the Linux kernel, the following vulnerability has been resolved: media: meson: vdec: size capture planes from the aligned canvas The decoder writes a whole canvas of ALIGN(width, 32) x ALIGN(height, 32) (amvdec_set_canvases()) and reports bytesperline = ALIGN(width, 32), but get_output_size() derives sizeimage from the raw width x height. When the width is not a multiple of 32 the planes are too small for the advertised stride: for 720x360 NV12M the luma plane is 262144 bytes while 736 * 360 = 264960 are needed (282624 for the canvas the firmware fills). The decoder writes past the buffer, and importing the capture dma-buf into DRM fails: drmModeAddFB2() returns -EINVAL, so e.g. Kodi plays the sound over a black screen. 1280x720 and 1920x1080 are not affected. Size the planes from the aligned canvas the hardware actually uses. Tested on an S905X (GXL p212) board with LibreELEC 12 (6.16.0-rc3): 720x360 and 1920x1080 H.264 play through V4L2 m2m + DRM PRIME with no AddFB2 errors.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The overrun is driven through V4L2 ioctls on the meson-vdec /dev/videoN node (S_FMT, REQBUFS, QBUF of an H.264 or MPEG-1/2 bitstream, STREAMON). The local process hands the bitstream to esparser itself, so no kernel network protocol carries the geometry. AC:L - The attacker sets the geometry: the H.264 SPS mb_width/crop_right/crop_bottom feed codec_h264_src_change(), and vdec_s_fmt() sets sess->width/height for MPEG-1/2. At 1857x1057, get_output_size() returns 1966080 while amvdec_set_canvases() programs a 1888x1088 (2054144-byte) canvas. The overrun repeats on every decoded frame, with no race. PR:L - It needs only an open fd on the decoder node. udev gives video4linux nodes to the video group, and the uaccess tag gives them to the logged-in seat user. vdec_open() and the ioctl handlers do no capability checks, but an account with device access is still required. UI:N - The attacker opens the device, queues their own bitstream and capture buffers, and starts streaming. Nobody else has to play a file or do anything. S:U - The attacker reaches the decoder through the kernel's own driver, and the GX/G12 vdec has no IOMMU. The DMA lands in physical memory that the same kernel manages, so the vulnerable and impacted components share one authority. C:H - The decoder's DMA runs up to 88064 bytes of luma and 44032 bytes of chroma past each capture plane on 1080p SoCs (180224 bytes of luma for 4K H.264 on GXL/G12A). It lands in the reusable default CMA pool or buddy pages: other processes' pages, page cache or kernel memory. That is enough to escalate privileges and read arbitrary memory. I:H - The overflowing bytes are decoded pixels, which the attacker sets through the bitstream (H.264 I_PCM macroblocks carry raw samples). That makes this a controlled physical-memory write past the vb2-dma-contig allocation, with no IOMMU to stop it. A:H - Every frame overwrites the CMA or kernel pages next to each capture buffer, corrupting unrelated memory and crashing the kernel. Even benign 720x360 content overruns the luma plane by 20480 bytes per frame.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 3e7f51bd96077acad6acd7b45668f65b44233c4e to < c587de78ffa123d17a93026d78da7e76823cc4e0 (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < cb46dc57d169509e69a3e218e970785c2b79f7f8 (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < 6668d9052231ae3daf6c8bfc8f6d379f1f35ffd5 (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < 0d6bc58d7f319c63f8525efb630de1ce55b7d780 (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < 10a7475bc6d1cef7d5c1e7f27c8de4a011ebbbed (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < b186accb1d7d8f9aa7b5183d7eb9ff26ac568ce3 (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < 2f643182e4feef3a41bec2dd98c1294750392326 (affected · git)3e7f51bd96077acad6acd7b45668f65b44233c4e to < b3a805dd5a83ba8c85e2085d3411eb9975e0aea4 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.3 (affected)0 to < 5.3 (unaffected · semver)5.10.275 through 5.10.* (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
8- https://git.kernel.org/stable/c/0d6bc58d7f319c63f8525efb630de1ce55b7d780
- https://git.kernel.org/stable/c/10a7475bc6d1cef7d5c1e7f27c8de4a011ebbbed
- https://git.kernel.org/stable/c/2f643182e4feef3a41bec2dd98c1294750392326
- https://git.kernel.org/stable/c/6668d9052231ae3daf6c8bfc8f6d379f1f35ffd5
- https://git.kernel.org/stable/c/b186accb1d7d8f9aa7b5183d7eb9ff26ac568ce3
- https://git.kernel.org/stable/c/b3a805dd5a83ba8c85e2085d3411eb9975e0aea4
- https://git.kernel.org/stable/c/c587de78ffa123d17a93026d78da7e76823cc4e0
- https://git.kernel.org/stable/c/cb46dc57d169509e69a3e218e970785c2b79f7f8
Provider assertions
1Linux · cna
media: meson: vdec: size capture planes from the aligned canvas
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 6db4f8ad65fce32f193122bb02115f65e37a40e9d4a2dc401d8e563754698c57
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record