Android security tags, read closely by Lightrion

CVE-2026-28671 AI-generated analysis

platform/packages/providers/MediaProvider, MediaProvider.java update path (pending-file publish / file movement)

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.

MediaProvider.updateInternal's file-movement path now checks, before Os.rename, whether a database row already claims the destination _data path. If no file backs that row it deletes the row; if a file exists it enforces write permission on the row. The SQLiteConstraintException handler in updateAllowingReplace now deletes a conflicting row at the active rename destination and retries the update in the same transaction.

Root cause

In MediaProvider.java updateInternal, an update can touch placement columns (e.g. clearing IS_PENDING, changing DISPLAY_NAME or RELATIVE_PATH) with movement allowed. In that case the code computes afterPath and calls Os.rename(beforePath, afterPath) on disk. Only after that does it run the database update through updateAllowingReplace. Nothing checked whether a different Files row with _data == afterPath already existed. Per the commit message, a malicious app could insert such a row ahead of time. In the tests the squatter row has the same DISPLAY_NAME and RELATIVE_PATH, IS_PENDING=0, and no backing file. The qb.update then hit the UNIQUE constraint on _data. For callers with targetSdk >= R the exception was simply rethrown. For legacy callers the replace logic ran only if a file existed at the path. The bulletin rates this High / ID.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2026 · Findings