Android security tags, read closely by Lightrion

CVE-2026-58868 AI-generated analysis

platform/frameworks/av, libstagefright FrameDecoder (MediaImageDecoder; commit tests reference MediaMetadataRetrieverTest and ImageReaderDecoderTest)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (4 corrections). Verify against the commit before relying on it.

Adds range and consistency validation of the width, height, stride and crop rectangle read from the codec output format in MediaImageDecoder::onOutputReceived (media/libstagefright/FrameDecoder.cpp), returning ERROR_MALFORMED instead of using unchecked int32_t values (the commit message: 'Check before converting int32_t to size_t').

Root cause

MediaImageDecoder::onOutputReceived reads "width", "height", "color-format", "stride", "crop" and "slice-height" from outputFormat and, after optionally replacing height with slice-height, computes crop dimensions as crop_right - crop_left + 1 and crop_bottom - crop_top + 1, which are used for frame allocation (allocVideoFrame in the code context). No check ensured that crop coordinates were non-negative, that right >= left and bottom >= top, that the crop rectangle lay inside width/height, that width/height were positive, or that stride was non-negative and even. The commit message describes the problem as converting int32_t to size_t without a prior check.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings