Android security tags, read closely by Lightrion

CVE-2025-48578 AI-generated analysis

platform/packages/providers/MediaProvider, MediaProvider.java (content provider update path and getMediaUri call path)

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.

Makes MediaProvider restore the caller identity it had cleared before an exception propagates: in MediaProvider#updateInternal when ContentUris.parseId throws NumberFormatException, and (on 15/16) in MediaProvider#getResultForGetMediaUri when an unsupported document authority causes an IllegalArgumentException.

Root cause

In MediaProvider#updateInternal the code calls clearLocalCallingIdentity() and then evaluates MediaStore.Files.getContentUri(volumeName, ContentUris.parseId(uri)) outside of any try/finally. If the URI's id segment is not numeric, ContentUris.parseId throws NumberFormatException and the exception escapes. The cleared identity token is never passed back to restoreLocalCallingIdentity. The commit message describes the same defect in MediaProvider#getResultForGetMediaUri: after the calling identity is cleared, an IllegalArgumentException is thrown for an unsupported documentUri authority without calling restoreCallingIdentity(token) first.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2026 · Findings