CVE-2026-139027

Not scored yetLast modified Nov 30, 2026

Description

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

media: vivid: round the height down to the vertical subsampling factor

syzbot reports a vmalloc out-of-bounds write in the test pattern generator:

BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2617 [inline] BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0x2063/0x4160 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705 Write of size 720 at addr ffffc900038f9d50 by task vivid-000-vid-c/6017

The reproducer requests a 720x49 NV12 capture format, i.e. an odd height for a format whose chroma plane is vertically subsampled.

The buffer size is derived from the height by a truncating division:

sizes[p] = (tpg_g_line_width(&dev->tpg, p) * h) / dev->fmt_cap->vdownsampling[p] + dev->fmt_cap->data_offset[p];

For a single buffer holding both planes tpg_g_line_width() returns 720 + 720 / 2 = 1080, so 1080 * 49 = 52920 bytes get allocated.

tpg_fill_plane_buffer() however emits one chroma line for every two luma lines, i.e. DIV_ROUND_UP(49, 2) = 25 lines, and thus needs 49 * 720 + 25 * 720 = 53280 bytes. The memcpy() of the last chroma line runs 360 bytes past the end of the buffer.

An odd height is not meaningful for a 4:2:0 format in the first place, since the chroma plane would have to hold half a line. Rather than fixing up each of the ~10 sites that divide the height by vdownsampling[], round the height down to a multiple of the vertical subsampling factor where it enters the driver. Adjusting the format is what TRY_FMT/S_FMT are for, and it keeps every later division exact.

Formats without vertical subsampling are unaffected and keep accepting odd heights.

Tested with the syzbot reproducer, which no longer triggers the splat, and by streaming NV12, NV21, YUV420, YVU420 and YUYV at heights 47, 48, 49, 51, 480, 481 and 1081. v4l2-compliance gives identical results before and after (48 of 50 succeeded on the vivid device in both cases; the two failures are pre-existing and unrelated).

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139028In the Linux kernel, the following vulnerability has been resolved: power: supply: bq27xxx: Ensure poll work is cancelled on remove The diCVE-2026-139029In the Linux kernel, the following vulnerability has been resolved: power: supply: bq27xxx: synchronize work cancellation on suspend The pCVE-2026-139038.8Insufficient policy enforcement in Bluetooth in Google Chrome prior to 150.0.7871.47 allowed a remote attacker to perform privilege escalatiCVE-2026-139030In the Linux kernel, the following vulnerability has been resolved: ACPI: pfr_update: zero-initialize capability query result query_capabiCVE-2026-139031In the Linux kernel, the following vulnerability has been resolved: media: nuvoton: npcm-video: quiesce VCD IRQ before teardown The VCD IRCVE-2026-139032In the Linux kernel, the following vulnerability has been resolved: media: stv0900: bound DiSEqC reply length to msg[] size The FIFO_BYTENCVE-2026-139033In the Linux kernel, the following vulnerability has been resolved: media: stv090x: bound DiSEqC reply length to msg[] size The FIFO_BYTENCVE-2026-139034In the Linux kernel, the following vulnerability has been resolved: media: adv7604: avoid negative array index in log_status when cp_read fCVE-2026-139035In the Linux kernel, the following vulnerability has been resolved: media: stm32: csi: unregister async notifier on cleanup stm32_csi_parsCVE-2026-139036In the Linux kernel, the following vulnerability has been resolved: media: microchip-isc: fix PM runtime leak in AWB work handler Early reCVE-2026-139037In the Linux kernel, the following vulnerability has been resolved: media: microchip-isc: do not touch WB registers when not streaming iscCVE-2026-139038In the Linux kernel, the following vulnerability has been resolved: media: microchip-isc: disable histogram and flush AWB work on teardown
CVE-2026-139027: Unscored | Vulnix