CVE-2026-138905: media: vicodec: fix NULL deref on oversized frame
In the Linux kernel, the following vulnerability has been resolved:
media: vicodec: fix NULL deref on oversized frame
jobready() only honours the isheadervalid() verdict when ctx->comphasframe is set, and comphasframe is only set once compsize reaches the full frame size. Since the copy is clamped to ctx->compmaxsize, a header advertising a larger size leaves compsize stuck at compmaxsize, so comphasframe stays false and the failed validation is discarded.
Control then falls into the resolution change branch, which calls updatecapturedatafromheader(). That function re-derives info via infofromheader(), assigns it to qdst->info and dereferences it as qdst->info->sizeimagemult, with no NULL check of its own. isheadervalid() does check that same infofromheader() result -- if (!info) return false which is precisely the false verdict jobready() discarded above. infofromheader() returns NULL whenever the header flags resolve to no supported pixel format.
Drop the comphasframe 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 deviceprocess(), which already returns -EINVAL when compframesize exceeds compmaxsize.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Linux kernel media vicodec resolution-change path, drop the `comp_has_frame` conjunct so an invalid header always bails out.