Android security tags, read closely by Lightrion

CVE-2026-58995 AI-generated analysis

platform/frameworks/base, libs/androidfw (ZipFileRO)

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

Changes the type of requiredSize in ZipFileRO::getEntryFileName from uint16_t to size_t so that a maximum-length (65535 byte) Zip entry name no longer wraps the required-size computation to 0 and bypasses the caller buffer length check.

Root cause

In libs/androidfw/ZipFileRO.cpp, ZipFileRO::getEntryFileName computed `const uint16_t requiredSize = zipEntry->name.length() + 1;`. Zip entry names can be up to 65535 bytes (per the commit message). For a 65535 byte name, the value 65536 is truncated to 0 when stored in uint16_t. The following check `if (bufLen < requiredSize)` then never fails, so the function proceeds past the guard even when the caller's buffer may be far smaller than the name plus terminator (the new test uses a 4096 byte buffer). The ALOGW also printed requiredSize with %d.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings