mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 23:41:03 +01:00
* [sanitize] Charge ChainRule backtrack/input/lookahead arrays to max_ops ChainRule::sanitize() checks the length of each of its three arrays but only sanitizes the trailing LookupRecord array, so it never charges max_ops for the bytes it skipped over. A table with many ChainRuleSet offsets all pointing at one large ChainRule could therefore be sanitized in time proportional to offsets x rule size, escaping the sanitizer's work bound (restoring the accounting removed by385896ff6). Charge the skipped span (from this to the LookupRecord array) to check_ops before sanitizing the records. Adds a fuzzer regression font. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-EFNNHRHV. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * [GPOS] Charge zero-size ValueRecord arrays to the sanitizer op budget When a ValueFormat is empty its records take no bytes, so ValueFormat::sanitize_values() and PairPosFormat2::sanitize() pass check_range() without charging max_ops for the records, while later code (the subsetter, variation-index collection) still walks count records. A tiny table can thus declare a huge valueCount / class matrix and cost the subsetter CPU out of proportion to its size. Charge count ops when the record size / stride is zero, following the918193ebfprecedent. Adds two fuzzer regression fonts. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-HFGOLC64. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>