Android security tags, read closely by Lightrion

CVE-2026-58856 AI-generated analysis

platform/frameworks/av, cameraserver (libcameraservice device3 Camera3StreamSplitter)

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

Adds a range check on the output slot index, a null check on the slot's GraphicBuffer, and a checked lookup in mBuffers in Camera3StreamSplitter::returnOutputBufferLocked. It also changes the outputSlots local from a copy to a reference.

Root cause

In services/camera/libcameraservice/device3/Camera3StreamSplitter.cpp, returnOutputBufferLocked() takes an int slot and used it directly as an index into the per-output slot vector (*mOutputSlots[from]) with no range check. The caller shown in the context (lines 678-689) gets this slot from from->dequeueBuffer() on an output IGraphicBufferProducer. The returned sp<GraphicBuffer> was then dereferenced (buffer->getId()) without a null check. Its id was used with mBuffers[...] and the result was dereferenced right away, without checking that the buffer was tracked. Per the commit message the slot index is app-supplied, so an out-of-range value leads to an out-of-bounds read and type confusion in cameraserver. In addition, outputSlots was a by-value copy, so the later outputSlots[slot] = nullptr in the detach path changed only the copy and was never written back to mOutputSlots[from].

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to October 2026 · Findings