{"id":"CVE-2026-138905","aliases":["CVE-2026-138905"],"related":[],"kind":"vulnerability","state":"published","title":"media: vicodec: fix NULL deref on oversized frame","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T13:26:04.677Z","modified":"2026-12-01T06:17:30.623Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"ed06bca3414b045dd29a0a5ca65e64e83e0b5373","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"7347bd55fdc61db467400439a038a38ff69bc041","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"5dfb45a44264484dd6cdb82c8e9bdefd4d091842","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"563dfdc969c1bf63e4ace17a53aaaedd59595a01","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"855012e5e1bb64b7f7e50422c02b2ebdcd872657","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"b6f62366bc014a3a20fa0a3c42e51cadd198fb41","status":"affected"},{"type":"git","introduced":"3b15f68e19c28a76d175f61943a8c23224afce93","fixed":"c657eb609197e289b054bc2c4e86a0fc32dd7ebe","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.1","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/ed06bca3414b045dd29a0a5ca65e64e83e0b5373","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7347bd55fdc61db467400439a038a38ff69bc041","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5dfb45a44264484dd6cdb82c8e9bdefd4d091842","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/563dfdc969c1bf63e4ace17a53aaaedd59595a01","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/855012e5e1bb64b7f7e50422c02b2ebdcd872657","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b6f62366bc014a3a20fa0a3c42e51cadd198fb41","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c657eb609197e289b054bc2c4e86a0fc32dd7ebe","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138905","url":"https://www.cve.org/CVERecord?id=CVE-2026-138905","licence":"CVE Terms of Use","modified":"2026-12-01T05:40:36.610Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138905","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138905","licence":"Public domain","modified":"2026-12-01T06:17:30.623Z"}],"updatedAt":"2026-12-01T06:32:17.105Z","epss":{"score":0.00192,"percentile":0.09286,"date":"2026-12-01T12:00:22.000Z"}}