Android security tags, read closely by Lightrion

CVE-2024-43091 AI-generated analysis

platform/external/skia, src/effects/SkEmbossMaskFilter.cpp (emboss mask filter, 3D mask allocation)

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 (7 corrections). Verify against the commit before relying on it.

In SkEmbossMaskFilter::filterMask the 3-plane 3D mask buffer is now sized with dst->computeTotalImageSize() (0 means too big, so the function aborts) instead of multiplying the single-plane size by 3 without an overflow check.

Root cause

After blurring the source A8 mask, SkEmbossMaskFilter::filterMask sets dst->fFormat = SkMask::k3D_Format and allocates a larger buffer for 'the other two channels'. The old code took planeSize = dst->computeImageSize() (single-plane size, 0 meaning too big), checked only that planeSize != 0, and then called SkMask::AllocImage(planeSize * 3). Nothing checked the multiplication by 3 for overflow. For a large enough mask, planeSize could be valid while planeSize * 3 wrapped, so the allocation would be smaller than the three-plane 3D mask that the rest of the function works on.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2024 · Findings