Android security tags, read closely by Lightrion

CVE-2023-40110 AI-generated analysis

platform/frameworks/av, media/mtp (libmtp MtpPacket)

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

Adds bounds checks against mBufferSize to MtpPacket::getUInt16, getUInt32, putUInt16 and putUInt32 in media/mtp/MtpPacket.cpp, so reads abort and writes are dropped when offset plus field width exceeds the allocated buffer.

Root cause

MtpPacket::getUInt16/getUInt32/putUInt16/putUInt32 indexed mBuffer at offset, offset+1 (and up to offset+3) without comparing against mBufferSize. The commit message says the fuzzer found a write to a buffer index greater than the buffer size (heap OOB write). The read accessors had the same unchecked pattern.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2023 · Findings