⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

CVE-2026-138905: Linux Kernel VICODEC NULL Pointer Dereference in Compressed-Frame Handling | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-138905: Linux Kernel VICODEC NULL Pointer Dereference in Compressed-Frame Handling

Executive summary

CVE-2026-138905 addresses a NULL pointer dereference in the Linux kernel's VICODEC media-driver code. The defect occurs when a crafted compressed-frame job advertises an oversized frame and contains flags that resolve to no supported pixel format. A validation failure can be discarded because it is conditionally evaluated only after ctx->comp_has_frame is set, allowing execution to reach code that dereferences the NULL result of info_from_header().

The described upstream correction removes the comp_has_frame condition so that invalid headers are always rejected. The existing check in device_process() also rejects frames whose comp_frame_size exceeds ctx->comp_max_size. The available intelligence contains no evidence of exploitation, no CVSS vector, and no listing in the CISA KEV catalog. Because reachability from unprivileged users is not established, the real-world severity is assessed as low.

Detailed analysis

What the vulnerability is

The vulnerability is a NULL pointer dereference in the Linux kernel's media: vicodec compressed-frame processing path.

During job handling, job_ready() calls is_header_valid() to determine whether a frame header identifies a supported, usable format. The problem is that the validation result is honored only when ctx->comp_has_frame is already set.

For an oversized frame, the copy operation is clamped to ctx->comp_max_size. Consequently, ctx->comp_size may never reach the full size declared in the header, leaving ctx->comp_has_frame false. Under that condition, the negative result returned by is_header_valid() can be ignored.

Execution then enters the resolution-change branch and calls update_capture_data_from_header(). That function obtains the result of info_from_header(), assigns it to q_dst->info, and accesses q_dst->info->sizeimage_mult without first checking that the pointer is valid.

info_from_header() returns NULL when the header flags resolve to no supported pixel format. The corresponding validation logic in is_header_valid() already handles that condition with if (!info) return false. The vulnerable control flow can therefore discard a valid rejection and later dereference the same NULL result.

Root cause

The defect combines inconsistent validation with a misleading state condition:

  1. job_ready() obtains an invalid-header verdict from is_header_valid().

  1. That verdict is considered only when ctx->comp_has_frame is true.

  1. An oversized header can leave ctx->comp_size at ctx->comp_max_size, preventing ctx->comp_has_frame from becoming true.

  1. The invalid header is therefore allowed to reach the resolution-change path.

  1. info_from_header() returns NULL because the header flags do not resolve to a supported pixel format.

  1. q_dst->info->sizeimage_mult is dereferenced without a NULL check.

The upstream fix described in the advisory removes the comp_has_frame conjunct. With that change, an invalid header always causes job_ready() to exit before resolution handling. The resolution-change path remains unaffected for valid headers.

Trigger conditions

The supplied advisory identifies a crafted compressed-frame job or frame header processed through the Linux kernel's VICODEC media path. The relevant conditions are:

  • The header advertises a frame size larger than ctx->comp_max_size.

  • The header flags resolve to no supported pixel format, causing info_from_header() to return NULL.

  • The oversized size leaves ctx->comp_has_frame false, allowing the failed validation to be ignored.

The source does not establish whether an ordinary user, an unprivileged container workload, or only a privileged or specialized device workflow can submit the triggering input. Reachability is therefore the main unresolved factor in assessing exploitability.

Affected systems

The affected product is the Linux kernel, specifically the code addressed by the media: vicodec change.

The provided context does not identify:

  • Exact vulnerable kernel releases

  • The first fixed kernel release

  • Distribution-specific packages or backports

  • A downloadable upstream commit or patch URL

  • A CVSS score or vector

The advisory was published on 2026-11-30. Operators should consult the relevant Linux kernel and distribution maintainers to determine whether a deployed package contains the fix.

Impact and exploitability

The direct technical effect is a kernel NULL pointer dereference. Depending on the surrounding kernel behavior and the point at which the fault occurs, this may terminate the affected process, produce a kernel oops, or lead to a kernel crash and associated service disruption.

The supplied intelligence does not establish whether the fault is recoverable, whether any additional security consequences are possible, or whether the vulnerable path is broadly exposed to userspace. No exploit, proof of concept, exploitation telemetry, campaign, or known exploitation report is included. The linked CVE is also not identified as being in the CISA KEV catalog.

Accordingly, the practical risk is characterized as low-to-unknown from an exploitation perspective, with denial of service as the most plausible outcome. The low assessment reflects the memory-safety nature of the defect but also the absence of confirmed exploitation, an available CVSS vector, a demonstrated privilege boundary, and a broadly reachable user interface.

Mitigation

Patch

Apply the upstream fix described in the advisory. The is_header_valid() result must be honored regardless of ctx->comp_has_frame, ensuring that an invalid header cannot enter the resolution-change processing path.

The exact upstream commit, fixed kernel release, and distribution package versions are not included in the supplied context. Patch status should therefore be confirmed with the applicable kernel or distribution vendor rather than inferred solely from a version number.

Where an immediate update is not feasible, minimize use of affected VICODEC devices and compressed-frame workflows, particularly where frame data can originate from an untrusted source.

Operational safeguards

Where technically and operationally feasible:

  • Restrict access to the relevant device or media interface.

  • Prevent untrusted producers or transports from supplying compressed frames to the affected path.

  • Disable the affected VICODEC functionality where it is not required.

  • Validate frame dimensions and sizes before compressed frames enter kernel-driver processing.

The existing device_process() check that returns -EINVAL when comp_frame_size exceeds comp_max_size provides an additional defense against oversized frames. It does not, however, replace the job_ready() correction because the security defect concerns the ordering of validation and the discarded invalid-header verdict.

Detection

Monitor kernel logs and crash telemetry for NULL pointer dereferences involving the VICODEC path. Relevant indicators include:

  • media: vicodec

  • job_ready()

  • update_capture_data_from_header()

  • info_from_header()

  • q_dst->info

  • sizeimage_mult

  • A kernel oops or general protection fault during compressed-video-frame processing

Repeated malformed or oversized compressed-frame submissions and abrupt termination or restart of services using the affected media path may also indicate attempted exploitation. The supplied context does not define a stable detection signature, so these indicators should be validated against local kernel logs and actual backtraces.

References

·
← News