GHSA-494W-45XJ-949H
Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32In 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).
{
"affected": [],
"aliases": [
"CVE-2026-139027"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-30T14:18:06Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vivid: round the height down to the vertical subsampling factor\n\nsyzbot reports a vmalloc out-of-bounds write in the test pattern\ngenerator:\n\nBUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2617 [inline]\nBUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0x2063/0x4160 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705\nWrite of size 720 at addr ffffc900038f9d50 by task vivid-000-vid-c/6017\n\nThe reproducer requests a 720x49 NV12 capture format, i.e. an odd\nheight for a format whose chroma plane is vertically subsampled.\n\nThe buffer size is derived from the height by a truncating division:\n\n\tsizes[p] = (tpg_g_line_width(\u0026dev-\u003etpg, p) * h) /\n\t\t dev-\u003efmt_cap-\u003evdownsampling[p] +\n\t\t dev-\u003efmt_cap-\u003edata_offset[p];\n\nFor a single buffer holding both planes tpg_g_line_width() returns\n720 + 720 / 2 = 1080, so 1080 * 49 = 52920 bytes get allocated.\n\ntpg_fill_plane_buffer() however emits one chroma line for every two\nluma lines, i.e. DIV_ROUND_UP(49, 2) = 25 lines, and thus needs\n49 * 720 + 25 * 720 = 53280 bytes. The memcpy() of the last chroma\nline runs 360 bytes past the end of the buffer.\n\nAn odd height is not meaningful for a 4:2:0 format in the first place,\nsince the chroma plane would have to hold half a line. Rather than\nfixing up each of the ~10 sites that divide the height by\nvdownsampling[], round the height down to a multiple of the vertical\nsubsampling factor where it enters the driver. Adjusting the format is\nwhat TRY_FMT/S_FMT are for, and it keeps every later division exact.\n\nFormats without vertical subsampling are unaffected and keep accepting\nodd heights.\n\nTested with the syzbot reproducer, which no longer triggers the splat,\nand by streaming NV12, NV21, YUV420, YVU420 and YUYV at heights 47,\n48, 49, 51, 480, 481 and 1081. v4l2-compliance gives identical results\nbefore and after (48 of 50 succeeded on the vivid device in both\ncases; the two failures are pre-existing and unrelated).",
"id": "GHSA-494w-45xj-949h",
"modified": "2026-11-30T15:32:14Z",
"published": "2026-11-30T15:32:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139027"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/00dd4a5c2b8c7391367c047ad79158043116723c"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/66ad567e88397a04429d8f768f49cb8e52fd1dd0"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6c55e02d9b3f4bdcd4e951c8d7cf3ae8131e3e43"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/883ba9671d826fe7e6a5d2cd6789eb42f46f9ec5"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a2ec28dd2a88d0721fc4a30242861e2be01d4023"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/e9115c139cad53919457a179d81964430dfdae32"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/f3b8f2f68afb6b16ce254266b246bbb8a1aaf1f8"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/f8614b4e7dd89b69b63405e47aa84aeae5a656b4"
}
],
"schema_version": "1.4.0",
"severity": []
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.