Android security tags, read closely by Lightrion

CVE-2024-43768 AI-generated analysis

platform/external/skia, PDF backend (src/pdf/SkDeflate.cpp, zlib allocator callback skia_alloc_func)

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

Adds an integer-overflow bounds check to Skia's zlib allocator callback skia_alloc_func in src/pdf/SkDeflate.cpp so that nullptr is returned when items * size would not fit in size_t, instead of passing a wrapped-around size to sk_calloc_throw.

Root cause

skia_alloc_func<T>(void*, T items, T size), the zlib allocator callback in src/pdf/SkDeflate.cpp, computed SkToSizeT(items) * SkToSizeT(size) and passed the product straight to sk_calloc_throw. Nothing checked that size fits in size_t or that items * size fits in size_t, so an overflowing product could wrap and request a smaller allocation than requested.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to December 2024 · Findings