{"api_version":"1","generated_at":"2026-12-01T14:27:25+00:00","cve":"CVE-2026-139027","urls":{"html":"https://cve.report/CVE-2026-139027","api":"https://cve.report/api/cve/CVE-2026-139027.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139027","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139027"},"summary":{"title":"media: vivid: round the height down to the vertical subsampling factor","description":"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(&dev->tpg, p) * h) /\n\t\t   dev->fmt_cap->vdownsampling[p] +\n\t\t   dev->fmt_cap->data_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).","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:06","updated_at":"2026-11-30 14:18:06"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/883ba9671d826fe7e6a5d2cd6789eb42f46f9ec5","name":"https://git.kernel.org/stable/c/883ba9671d826fe7e6a5d2cd6789eb42f46f9ec5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f3b8f2f68afb6b16ce254266b246bbb8a1aaf1f8","name":"https://git.kernel.org/stable/c/f3b8f2f68afb6b16ce254266b246bbb8a1aaf1f8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a2ec28dd2a88d0721fc4a30242861e2be01d4023","name":"https://git.kernel.org/stable/c/a2ec28dd2a88d0721fc4a30242861e2be01d4023","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e9115c139cad53919457a179d81964430dfdae32","name":"https://git.kernel.org/stable/c/e9115c139cad53919457a179d81964430dfdae32","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/66ad567e88397a04429d8f768f49cb8e52fd1dd0","name":"https://git.kernel.org/stable/c/66ad567e88397a04429d8f768f49cb8e52fd1dd0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6c55e02d9b3f4bdcd4e951c8d7cf3ae8131e3e43","name":"https://git.kernel.org/stable/c/6c55e02d9b3f4bdcd4e951c8d7cf3ae8131e3e43","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f8614b4e7dd89b69b63405e47aa84aeae5a656b4","name":"https://git.kernel.org/stable/c/f8614b4e7dd89b69b63405e47aa84aeae5a656b4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/00dd4a5c2b8c7391367c047ad79158043116723c","name":"https://git.kernel.org/stable/c/00dd4a5c2b8c7391367c047ad79158043116723c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139027","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139027","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e f8614b4e7dd89b69b63405e47aa84aeae5a656b4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e f3b8f2f68afb6b16ce254266b246bbb8a1aaf1f8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e 6c55e02d9b3f4bdcd4e951c8d7cf3ae8131e3e43 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e 66ad567e88397a04429d8f768f49cb8e52fd1dd0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e 883ba9671d826fe7e6a5d2cd6789eb42f46f9ec5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e 00dd4a5c2b8c7391367c047ad79158043116723c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e e9115c139cad53919457a179d81964430dfdae32 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ddcaee9dd4c00174db8ddf913c87ddf3773c446e a2ec28dd2a88d0721fc4a30242861e2be01d4023 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/media/test-drivers/vivid/vivid-vid-cap.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"f8614b4e7dd89b69b63405e47aa84aeae5a656b4","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"f3b8f2f68afb6b16ce254266b246bbb8a1aaf1f8","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"6c55e02d9b3f4bdcd4e951c8d7cf3ae8131e3e43","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"66ad567e88397a04429d8f768f49cb8e52fd1dd0","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"883ba9671d826fe7e6a5d2cd6789eb42f46f9ec5","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"00dd4a5c2b8c7391367c047ad79158043116723c","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"e9115c139cad53919457a179d81964430dfdae32","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"},{"lessThan":"a2ec28dd2a88d0721fc4a30242861e2be01d4023","status":"affected","version":"ddcaee9dd4c00174db8ddf913c87ddf3773c446e","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/media/test-drivers/vivid/vivid-vid-cap.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.1"},{"lessThan":"4.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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(&dev->tpg, p) * h) /\n\t\t   dev->fmt_cap->vdownsampling[p] +\n\t\t   dev->fmt_cap->data_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)."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:27:11.602Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/f8614b4e7dd89b69b63405e47aa84aeae5a656b4"},{"url":"https://git.kernel.org/stable/c/f3b8f2f68afb6b16ce254266b246bbb8a1aaf1f8"},{"url":"https://git.kernel.org/stable/c/6c55e02d9b3f4bdcd4e951c8d7cf3ae8131e3e43"},{"url":"https://git.kernel.org/stable/c/66ad567e88397a04429d8f768f49cb8e52fd1dd0"},{"url":"https://git.kernel.org/stable/c/883ba9671d826fe7e6a5d2cd6789eb42f46f9ec5"},{"url":"https://git.kernel.org/stable/c/00dd4a5c2b8c7391367c047ad79158043116723c"},{"url":"https://git.kernel.org/stable/c/e9115c139cad53919457a179d81964430dfdae32"},{"url":"https://git.kernel.org/stable/c/a2ec28dd2a88d0721fc4a30242861e2be01d4023"}],"title":"media: vivid: round the height down to the vertical subsampling factor","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139027","datePublished":"2026-11-30T13:27:11.602Z","dateReserved":"2026-11-30T13:22:15.909Z","dateUpdated":"2026-11-30T13:27:11.602Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:06","lastModifiedDate":"2026-11-30 14:18:06","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139027","Ordinal":"1","Title":"media: vivid: round the height down to the vertical subsampling ","CVE":"CVE-2026-139027","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139027","Ordinal":"1","NoteData":"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(&dev->tpg, p) * h) /\n\t\t   dev->fmt_cap->vdownsampling[p] +\n\t\t   dev->fmt_cap->data_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).","Type":"Description","Title":"media: vivid: round the height down to the vertical subsampling "}]}}}