Android security tags, read closely by Lightrion

CVE-2024-43767 AI-generated analysis

platform/external/skia, core blur mask filter (src/core/SkBlurMF.cpp)

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 a check in SkBlurMF.cpp prepare_to_draw_into_mask() so it returns false when SkMask::computeImageSize() returns 0 (the size overflow signal, per the commit title), so no SkMask image is allocated with that size.

Root cause

prepare_to_draw_into_mask() sets mask->fBounds from bounds.roundOut(), sets fRowBytes = SkAlign4(width) and fFormat = kA8_Format, then calls mask->computeImageSize() and passes the result straight to SkMask::AllocImage(), checking only for a nullptr return. The commit title ("Check for size overflow before allocating SkMask data") and the added size == 0 check indicate that computeImageSize() returns 0 when the size overflows, and the code did not test for this. The caller draw_rrect_into_mask() then installs the mask pixels into an SkBitmap and draws into it with an SkCanvas positioned by mask->fBounds. The authors describe the fix as speculative and the issue as not reproducible.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to December 2024 · Findings