Android security tags, read closely by Lightrion

CVE-2025-27363 AI-generated analysis

platform/external/freetype, TrueType glyph loader (src/truetype/ttgload.c, GX variation support)

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.

Restructures heap buffer allocation in external/freetype src/truetype/ttgload.c in two places. In the TrueType composite-glyph variation path (load_truetype_glyph), the temporary outline is now allocated directly into the FT_Outline fields with explicit sizes, and n_points/n_contours are set only after allocation succeeds. In TT_Process_Simple_Glyph, the unrounded array switches to a non-zeroing allocation.

Root cause

In load_truetype_glyph, a composite glyph loaded for a non-default variation instance (TT_CONFIG_OPTION_GX_VAR_SUPPORT) gets a temporary FT_Outline that passes the subglyph anchor points plus the 4 phantom points to TT_Vary_Apply_Glyph_Deltas. The old code did this in order: (1) set outline.n_contours = outline.n_points = limit (a short) before any allocation; (2) allocated four separate local arrays (points, tags, contours, unrounded), each of limit + 4 entries, with zeroing FT_NEW_ARRAY; (3) filled the locals; (4) only then attached them to the outline. The fix changes the buffer layout and sizing of this temporary outline. The material does not state what memory-safety fault the old layout caused.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to May 2025 · Findings