{"id":"CVE-2026-138905","summary":"media: vicodec: fix NULL deref on oversized frame","details":"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-\u003ecomp_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-\u003ecomp_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-\u003einfo and dereferences it as\nq_dst-\u003einfo-\u003esizeimage_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.","modified":"2026-12-01T07:00:28.423735313Z","published":"2026-11-30T13:26:04.677Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138905.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/563dfdc969c1bf63e4ace17a53aaaedd59595a01"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5dfb45a44264484dd6cdb82c8e9bdefd4d091842"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7347bd55fdc61db467400439a038a38ff69bc041"},{"type":"WEB","url":"https://git.kernel.org/stable/c/855012e5e1bb64b7f7e50422c02b2ebdcd872657"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b6f62366bc014a3a20fa0a3c42e51cadd198fb41"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c657eb609197e289b054bc2c4e86a0fc32dd7ebe"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ed06bca3414b045dd29a0a5ca65e64e83e0b5373"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138905.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138905"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3b15f68e19c28a76d175f61943a8c23224afce93"},{"fixed":"ed06bca3414b045dd29a0a5ca65e64e83e0b5373"},{"fixed":"7347bd55fdc61db467400439a038a38ff69bc041"},{"fixed":"5dfb45a44264484dd6cdb82c8e9bdefd4d091842"},{"fixed":"8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7"},{"fixed":"563dfdc969c1bf63e4ace17a53aaaedd59595a01"},{"fixed":"855012e5e1bb64b7f7e50422c02b2ebdcd872657"},{"fixed":"b6f62366bc014a3a20fa0a3c42e51cadd198fb41"},{"fixed":"c657eb609197e289b054bc2c4e86a0fc32dd7ebe"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138905.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.1.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138905.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}