# CVE-2026-138905: media: vicodec: fix NULL deref on oversized frame

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2026-11-30T13:26:04.677Z
- Modified: 2026-12-01T06:17:30.623Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

media: vicodec: fix NULL deref on oversized frame

job_ready() only honours the is_header_valid() verdict when
ctx->comp_has_frame is set, and comp_has_frame is only set once
comp_size reaches the full frame size. Since the copy is clamped to
ctx->comp_max_size, a header advertising a larger size leaves comp_size
stuck at comp_max_size, so comp_has_frame stays false and the failed
validation is discarded.

Control then falls into the resolution change branch, which calls
update_capture_data_from_header(). That function re-derives info via
info_from_header(), assigns it to q_dst->info and dereferences it as
q_dst->info->sizeimage_mult, with no NULL check of its own.
is_header_valid() does check that same info_from_header() result --
if (!info) return false which is precisely the false verdict
job_ready() discarded above. info_from_header() returns NULL whenever the
header flags resolve to no supported pixel format.

Drop the comp_has_frame conjunct so an invalid header always bails out.
The resolution change path is unaffected, as it is entered with a valid
header. Oversized frames are then rejected by device_process(), which
already returns -EINVAL when comp_frame_size exceeds comp_max_size.

(As written by CVE List.)

## Affected

- Linux Linux: from 3b15f68e19c28a76d175f61943a8c23224afce93 before ed06bca3414b045dd29a0a5ca65e64e83e0b5373; from 3b15f68e19c28a76d175f61943a8c23224afce93 before 7347bd55fdc61db467400439a038a38ff69bc041; from 3b15f68e19c28a76d175f61943a8c23224afce93 before 5dfb45a44264484dd6cdb82c8e9bdefd4d091842; from 3b15f68e19c28a76d175f61943a8c23224afce93 before 8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7; from 3b15f68e19c28a76d175f61943a8c23224afce93 before 563dfdc969c1bf63e4ace17a53aaaedd59595a01; from 3b15f68e19c28a76d175f61943a8c23224afce93 before 855012e5e1bb64b7f7e50422c02b2ebdcd872657; from 3b15f68e19c28a76d175f61943a8c23224afce93 before b6f62366bc014a3a20fa0a3c42e51cadd198fb41; from 3b15f68e19c28a76d175f61943a8c23224afce93 before c657eb609197e289b054bc2c4e86a0fc32dd7ebe; 5.1 (not affected: before 5.1; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.117 up to 6.12.*; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/ed06bca3414b045dd29a0a5ca65e64e83e0b5373>
- <https://git.kernel.org/stable/c/7347bd55fdc61db467400439a038a38ff69bc041>
- <https://git.kernel.org/stable/c/5dfb45a44264484dd6cdb82c8e9bdefd4d091842>
- <https://git.kernel.org/stable/c/8a2486fbd2fb552a89adbfe7bd4e4437f9bdb1f7>
- <https://git.kernel.org/stable/c/563dfdc969c1bf63e4ace17a53aaaedd59595a01>
- <https://git.kernel.org/stable/c/855012e5e1bb64b7f7e50422c02b2ebdcd872657>
- <https://git.kernel.org/stable/c/b6f62366bc014a3a20fa0a3c42e51cadd198fb41>
- <https://git.kernel.org/stable/c/c657eb609197e289b054bc2c4e86a0fc32dd7ebe>

## Sources

- CVE List: [CVE-2026-138905](https://www.cve.org/CVERecord?id=CVE-2026-138905), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-138905](https://nvd.nist.gov/vuln/detail/CVE-2026-138905), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-138905 · Whole record: https://cve.day/CVE-2026-138905.json · Rebuilt by cve.day 2026-12-01T06:32:17.105Z
