Files
harfbuzz/test/api
Behdad EsfahbodandClaude Opus 4.8 4a8f1cd542 [gpu] Charge layer clip-outline references to the paint budget
The paint encoder memoizes a clip glyph's sub-blob, so layers painted
under the same clip stack cost it only a cached index and 24 bytes of
op stream each.  The fragment shader, however, walks every curve of
every clip outline again for every layer in every fragment.  Ops, clips
per layer and outline size each had a cap, but nothing bounded their
product: a small COLRv1 font nesting a few PaintGlyph clips of a dense
outline under tens of thousands of PaintSolid layers made the shader do
hundreds of millions of curve-loop iterations per fragment, a denial of
service on the GPU (or the CPU under a software rasterizer).

Charge each layer's reference to each clip sub-blob -- cached or freshly
encoded, glyph or path clip -- to the existing session work budget, in
encoded RGBA16I texels, which is what the shader's band walk scales
with.  This lives in emit_all_clip_sub_blobs(), the one path all four
layer emitters go through; exhausting the budget marks the paint
unsupported like the other encoder limits, so hb_gpu_paint_encode()
returns NULL.  It adds no new tunable: the budget defaults to
HB_BUDGET_GLYPH and hb_paint_set_budget(), including
HB_BUDGET_UNLIMITED, governs it as it does the outline work.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-FUCZJR1Y.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-30 16:55:57 -06:00
..
2025-04-06 18:08:50 -06:00
2026-07-30 19:02:25 -06:00
2026-09-04 14:14:49 -06:00
2026-07-31 04:31:26 +03:00
2025-04-05 22:37:10 -06:00
2020-01-31 16:37:30 -05:00
2020-01-15 13:36:01 -08:00
2025-06-08 13:43:27 +03:00