Android security tags, read closely by Lightrion

CVE-2026-58865 AI-generated analysis

platform/frameworks/base, telephony/common MMS PDU parser (com.google.android.mms.pdu.PduParser)

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.

Adds a bounds check on the well-known content-type index in PduParser.parseContentType and null checks on the parameter map and the parsed charset string in PduParser.parseContentTypeParams so a malformed MMS PDU no longer throws ArrayIndexOutOfBoundsException or NullPointerException out of PduParser.parse().

Root cause

In telephony/common/com/google/android/mms/pdu/PduParser.java, parseContentType indexed PduContentTypes.contentTypes directly with the value returned by parseShortInteger(pduDataStream). That value is read from the PDU (0-127 according to the added comment), but the table only has indices 0-82 (per the added comment and test). A short-integer content type of 83 or more therefore threw ArrayIndexOutOfBoundsException. In parseContentTypeParams, the short-integer branch of case P_TYPE/P_CT_MR_TYPE called map.put without checking map for null; per the added test, the ELEMENT_DESCRIPTOR path passes a null map. In the extension-charset branch of the charset parameter, charsetStr from parseWapString was passed to new String() and map.put was called without a null check on either. The added test shows an empty charset string value is expected to trigger this NPE, which implies parseWapString can return null, though its body is not shown. The tests reach all three paths from PduParser.parse() on malformed PDU bytes, and each one surfaced as an uncaught runtime exception.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to October 2026 · Findings