Android security tags, read closely by Lightrion

CVE-2025-32313 AI-generated analysis

platform/frameworks/native libbinder Parcel; platform/frameworks/base core (android.app.usage.UsageEvents, android.app.NotificationHistory)

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

Fixes Parcel::appendFrom to decide whether to grow the buffer based on the current write position (mDataPos) instead of mDataSize, and adds validation in UsageEvents(Parcel) and NotificationHistory(Parcel) that a parcel-supplied position value does not exceed the rebuilt parcel's data size before it is applied with setDataPosition.

Root cause

In libs/binder/Parcel.cpp, Parcel::appendFrom checked `(mDataSize+len) > mDataCapacity` to decide whether to call growData(len). The fix makes the check depend on mDataPos, which implies the appended bytes go at the current data position. If mDataPos had been moved beyond mDataSize (for example by setDataPosition with an unchecked value), the old capacity test could pass even though the range at mDataPos + len went beyond mDataCapacity. On the Java side, UsageEvents(Parcel) and NotificationHistory(Parcel) read `positionInParcel` directly from the incoming blob. They passed it to mParcel.setDataPosition() without comparing it to mParcel.dataSize(), so a crafted parcel could leave the internal Parcel at an arbitrary data position.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2026 · Findings