{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-138905","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.902Z","datePublished":"2026-11-30T13:26:04.677Z","dateUpdated":"2026-12-01T05:40:36.610Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:40:36.610Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vicodec: fix NULL deref on oversized frame\n\njob_ready() only honours the is_header_valid() verdict when\nctx->comp_has_frame is set, and comp_has_frame is only set once\ncomp_size reaches the full frame size. Since the copy is clamped to\nctx->comp_max_size, a header advertising a larger size leaves comp_size\nstuck at comp_max_size, so comp_has_frame stays false and the failed\nvalidation is discarded.\n\nControl then falls into the resolution change branch, which calls\nupdate_capture_data_from_header(). That function re-derives info via\ninfo_from_header(), assigns it to q_dst->info and dereferences it as\nq_dst->info->sizeimage_mult, with no NULL check of its own.\nis_header_valid() does check that same info_from_header() result --\nif (!info) return false which is precisely the false verdict\njob_ready() discarded above. info_from_header() returns NULL whenever the\nheader flags resolve to no supported pixel format.\n\nDrop the comp_has_frame conjunct so an invalid header always bails out.\nThe resolution change path is unaffected, as it is entered with a valid\nheader. Oversized frames are then rejected by device_process(), which\nalready returns -EINVAL when comp_frame_size exceeds comp_max_size."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The crafted fwht_cframe_hdr arrives in a buffer queued with VIDIOC_QBUF on the vicodec stateful-decoder /dev/videoN OUTPUT queue, and job_ready() runs from v4l2_m2m_try_schedule() inside that ioctl. FWHT is a test-only format that no network service feeds into vicodec, so this is local only.\nAC:L - The attacker writes the header: a size field above comp_max_size keeps comp_size short of the frame size, so comp_has_frame stays false and job_ready() ignores the failed is_header_valid() check every time. No race or memory-layout dependence; the ioctl sequence is deterministic.\nPR:L - vicodec_open() and the m2m QBUF/STREAMON/REQBUFS ioctls check no capabilities. Any local user who can open the decoder node (video group or logind uaccess ACL) can trigger it once the vicodec test module has been loaded.\nUI:N - The attacking process opens the decoder node, queues its own crafted FWHT stream and starts streaming itself; no other user has to do anything.\nS:U - The crash or memory corruption stays inside the kernel's own security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - The ignored check is also the only MIN/MAX width and height check, so update_capture_data_from_header() copies unchecked dimensions into q_dst. After the capture restart, vicodec_start_streaming() sizes ref_frame with 32-bit multiplications that overflow, while decode_plane() loops over the full dimensions and reads ref_frame out of bounds.\nI:H - With buffers undersized by that overflow, fwht_decode_frame()/decode_plane() write attacker-chosen pixel blocks past the vmalloc'd capture plane, an out-of-bounds kernel write. The NULL q_dst->info deref the commit names is only the simplest outcome of the ignored check.\nA:H - A header whose flags match no pixel format makes info_from_header() return NULL, and update_capture_data_from_header() dereferences q_dst->info->sizeimage_mult. The resulting oops happens with the m2m job_spinlock held and IRQs off, and any user with access to the node can repeat it."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/test-drivers/vicodec/vicodec-core.c"],"versions":[{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"ed06bca3414b045dd29a0a5ca65e64e83e0b5373","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"7347bd55fdc61db467400439a038a38ff69bc041","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"5dfb45a44264484dd6cdb82c8e9bdefd4d091842","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"563dfdc969c1bf63e4ace17a53aaaedd59595a01","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"855012e5e1bb64b7f7e50422c02b2ebdcd872657","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"b6f62366bc014a3a20fa0a3c42e51cadd198fb41","status":"affected","versionType":"git"},{"version":"3b15f68e19c28a76d175f61943a8c23224afce93","lessThan":"c657eb609197e289b054bc2c4e86a0fc32dd7ebe","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/test-drivers/vicodec/vicodec-core.c"],"versions":[{"version":"5.1","status":"affected"},{"version":"0","lessThan":"5.1","status":"unaffected","versionType":"semver"},{"version":"5.10.275","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/ed06bca3414b045dd29a0a5ca65e64e83e0b5373"},{"url":"https://git.kernel.org/stable/c/7347bd55fdc61db467400439a038a38ff69bc041"},{"url":"https://git.kernel.org/stable/c/5dfb45a44264484dd6cdb82c8e9bdefd4d091842"},{"url":"https://git.kernel.org/stable/c/8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7"},{"url":"https://git.kernel.org/stable/c/563dfdc969c1bf63e4ace17a53aaaedd59595a01"},{"url":"https://git.kernel.org/stable/c/855012e5e1bb64b7f7e50422c02b2ebdcd872657"},{"url":"https://git.kernel.org/stable/c/b6f62366bc014a3a20fa0a3c42e51cadd198fb41"},{"url":"https://git.kernel.org/stable/c/c657eb609197e289b054bc2c4e86a0fc32dd7ebe"}],"title":"media: vicodec: fix NULL deref on oversized frame","x_generator":{"engine":"bippy-1.2.0"}}}}