Android security tags, read closely by Lightrion

CVE-2024-0051 AI-generated analysis

platform/frameworks/av, libstagefright software OMX MPEG4/H.263 decoder (media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp)

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

Adds an end-of-list check to the outQueue search loop in SoftMPEG4::onQueueFilled. If the current output header is not found, the decoder now returns instead of walking past the end of the output buffer list.

Root cause

In SoftMPEG4::onQueueFilled, after a frame is decoded, the code searches outQueue (List<BufferInfo *>) for the BufferInfo whose mHeader equals outHeader, using `while ((*it)->mHeader != outHeader) ++it;`. The loop had no `it != outQueue.end()` guard. If outHeader was not in outQueue, the iterator moved past the end and was dereferenced. The code then used the resulting pointer as a BufferInfo: it wrote `outInfo->mOwnedByUs = false` and called `outQueue.erase(it)`. The commit message calls this an out of bounds read and write.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2024 · Findings