Android security tags, read closely by Lightrion

CVE-2026-58938 AI-generated analysis

platform/frameworks/av, media/module/extractors/mp4 (libmp4extractor, MPEG4Source)

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 (1 corrections). Verify against the commit before relying on it.

Adds a recursion depth parameter and a depth > 100 guard to MPEG4Source::parseChunk in the MP4 extractor so deeply nested boxes in a crafted MP4 file return ERROR_MALFORMED instead of recursing without bound.

Root cause

MPEG4Source::parseChunk in media/module/extractors/mp4/MPEG4Extractor.cpp recursively parses nested boxes: inside the moof/traf container handling it loops `while (*offset < stop_offset)` calling parseChunk(offset), and in the trailing scan it calls parseChunk(offset) again when it encounters an mdat box. Neither call site tracked recursion depth, so a file with excessively nested boxes (the commit message gives moof->traf->moof as an example) drives unbounded recursion and stack exhaustion, crashing the media process (mediaserver per the commit message). The sibling MPEG4Extractor::parseChunk already had a depth guard; MPEG4Source::parseChunk did not. Additionally, on 14/15/16 the mdat call site discarded the return status of the recursive parseChunk and did not require chunk_size > 0.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings