Android security tags, read closely by Lightrion

CVE-2025-48540 AI-generated analysis

platform/frameworks/native, libbinder RPC Binder (libs/binder/RpcState.cpp)

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.

Three small commits to libs/binder/RpcState.cpp make RPC Binder terminate the session (session->shutdownAndWait(false)) on error paths that previously only returned an error code and left the session alive. The paths are: a TRANSACT command received when a non-ANY CommandType was expected; a bad object-table span in an incoming transaction; and CommandData allocation failure in processTransact and waitForReply.

Root cause

RpcState processes a byte stream from a remote peer, and its wire protocol is not self-synchronizing (the existing comment in processCommand says there is no way to tell where one command ends and the next begins). Several error paths detected malformed or unexpected input but only returned a status code (BAD_TYPE, BAD_VALUE, NO_MEMORY) without calling session->shutdownAndWait(false): (1) processCommand received RPC_COMMAND_TRANSACT while the caller requested a CommandType other than ANY, and returned BAD_TYPE before processTransact could read the body; (2) in the incoming-transaction path (processTransactInternalTailCall label), the object-table bytes inferred from parcelDataSize could not be reinterpreted as uint32_t, and the code returned BAD_VALUE; (3) processTransact and waitForReply failed to allocate CommandData for the body and returned NO_MEMORY without reading it. In each case the session continued, so the stream could be left desynchronized. The SPAN commit calls its error return 'not recoverable', and the ENOMEM comment says 'the wire protocol gets messed up'.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2025 · Findings