Android security tags, read closely by Lightrion

CVE-2026-58968 AI-generated analysis

platform/external/libopenapv, APV decoder metadata (src/oapv_vlc.c, src/oapv_metadata.c, src/oapv_bs.c)

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

Reworks metadata PBU payload parsing in libopenapv (oapvd_vlc_metadata, oapvm_set, meta_verify_mdp_data, oapv_bsr_sink). Filler payloads are now sunk and skipped like other payloads, and their 0xFF content is checked in meta_verify_mdp_data. Zero-size payloads are handled explicitly. The bitstream sink bound check is changed. The trailing filler size can no longer underflow. A follow-up commit moves the payload_data declaration into the loop.

Root cause

In oapvd_vlc_metadata (src/oapv_vlc.c), metadata payloads went through three different paths. (1) Filler payloads (OAPV_METADATA_FILLER) were consumed byte by byte with oapv_bsr_read after oapv_bsr_sink. oapv_bsr_read refills via fn_flush(bs, 4), so bs->cur can move ahead of the logical payload end. (2) Non-filler payloads were skipped with BSR_MOVE_BYTE_ALIGN. (3) Zero-size payloads set payload_data = NULL and then called oapvm_set, which rejected (NULL, 0) with OAPV_ERR_INVALID_ARGUMENT. After the loop, the trailing filler size was computed as target_read_size - (bs->cur - bs_start_pos) without checking that bs->cur - bs_start_pos <= target_read_size. A bs->cur that had moved too far therefore produced an unsigned underflow that was passed to oapvd_vlc_filler. Separately, oapv_bsr_sink (src/oapv_bs.c) checked bs->cur + BSW_GET_SINK_BYTE(bs) < bs->end, while the function itself rewinds bs->cur. Before the follow-up commit, payload_data was declared outside the while loop.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings