Cyber Risks · Google Project Zero

The Curious Case of Convexity Confusion

Summary: Google Project Zero's Ivan Fratric analyzed an externally reported stack-based buffer overflow in the Skia graphics library, which is used by Chrome, Firefox and Android, and found the trigger was a malformed RRect with tiny radius values that produced a concave shape still marked as convex. He then identified two ways to bypass Skia's Convexicator checks - point pairs whose squared distance falls below roughly 3.74e-23 are ignored, and direction-change tolerances let concavities around 1e-10 pass - yielding stack and heap out-of-bounds writes in the Chrome renderer.

Why it matters: The original patch raised floating-point precision and zeroed tiny corner radii, but Fratric found other variants, and Skia's affine-transform optimization copies the convexity attribute forward, so a single mislabeled path can be enlarged into memory corruption in the Chrome renderer.

Read the original at Google Project Zero ↗

Topics
Vulnerabilities & Patching
Related