Android security tags, read closely by Lightrion

CVE-2026-58876 AI-generated analysis

platform/external/aac, libSBRdec (Fraunhofer AAC decoder, parametric stereo decoder creation/reset)

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.

CreatePsDec in libSBRdec no longer frees a caller-owned parametric stereo decoder instance on its error path (only locally allocated instances), and the caller sbrDecoder_ResetElement now explicitly calls DeletePsDec on failure so the handle is freed and cleared instead of left dangling.

Root cause

CreatePsDec (libSBRdec/src/psdec.cpp) has two entry paths: when *h_PS_DEC is NULL it allocates a new instance via GetRam_ps_dec(), otherwise it reuses the existing instance ("Reset an open instance", h_ps_d = *h_PS_DEC). If any later step fails (for example an aacSamplesPerFrame value that the new test calls invalid, 512), control jumps to bail, which unconditionally called DeletePsDec(&h_ps_d). In the reset path this freed the instance that the caller still references through *h_PS_DEC (self->hParametricStereoDec in sbrDecoder_ResetElement), and only the local copy h_ps_d was cleared. The caller's handle therefore pointed to freed memory, and any later use or deletion of self->hParametricStereoDec was a use-after-free or double free.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings