Android security tags, read closely by Lightrion

CVE-2026-49927 AI-generated analysis

platform/external/libppd, ppd raster interpreter (ppd/raster-interpret.c) and raster-to-PostScript filter (ppd/rastertops.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 (8 corrections). Verify against the commit before relying on it.

Adds 64-bit overflow checks when ppdRasterInterpretPPD derives cupsBytesPerLine. In write_flate it rejects cupsBytesPerLine*6 above INT32_MAX and replaces the header-sized stack VLAs and per-line mallocs with single checked heap allocations, freed through a common cleanup path.

Root cause

In ppd/rastertops.c write_flate, buffer sizes came from the raster page header field header.cupsBytesPerLine using 32-bit unsigned arithmetic. This applied to the stack VLAs in[header.cupsBytesPerLine * 6] and out[header.cupsBytesPerLine * 6], and to the per-line heap allocation convertedpix = malloc(header.cupsBytesPerLine * 6). A large cupsBytesPerLine wraps the multiplication, so the buffers end up much smaller than the data convert_pixels then writes, which gives a heap out-of-bounds write. The conversion branch is used when cupsBitsPerColor == 1 and the color space is in a set that includes CUPS_CSPACE_RGB. The VLAs also let a header value drive unbounded stack allocation. In ppd/raster-interpret.c ppdRasterInterpretPPD, h->cupsBytesPerLine = (h->cupsBitsPerPixel * h->cupsWidth + 7) / 8 and the CUPS_ORDER_BANDED multiply by h->cupsNumColors were also computed in 32 bits with no overflow detection. The old write_flate also leaked pixdata on the fwrite error path.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2026 · Findings