Android security tags, read closely by Lightrion

CVE-2025-48530 AI-generated analysis

platform/external/rust/crabbyavif (AVIF decoder library), plane allocation and C API (src/capi/image.rs, src/image.rs, src/internal_utils/mod.rs)

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.

crabbyavif now allocates image planes with width and height rounded up to even values, allocates and reports only one chroma plane for the Android semi-planar formats (NV12/NV21/P010), and fixes per-format chroma plane width reporting, so plane buffers are no longer undersized for odd-dimension images.

Root cause

Plane buffers were sized from the exact image width and height (width * height * pixel_size) in crabby_avifImageCopy, avif_image_allocate_planes_helper and Image::allocate_planes_with_default_values. For images with odd width or height, particularly with the Android semi-planar formats (AndroidNv12, AndroidNv21, AndroidP010), these buffers and row strides were evidently too small for how the planes are used (the commit title refers to "NV12 crashes"); the accessing code is not in the diff. In addition, avif_image_allocate_planes_helper allocated planes 1 and 2 for all non-monochrome formats, and crabby_avifImagePlaneWidth computed chroma widths generically from chroma_shift_x for both plane 1 and plane 2, which does not match the semi-planar layout that the fix encodes (plane 1 full width, plane 2 width 0).

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to August 2025 · Findings