Android security tags, read closely by Lightrion

CVE-2024-43089 AI-generated analysis

platform/packages/providers/MediaProvider, MediaProvider.update (file placement / rename 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 (8 corrections). Verify against the commit before relying on it.

Adds an enforceCallingPermission(uri, extras, true) call before the shared `break` of the movement switch in MediaProvider.java (visible cases IMAGES_MEDIA_ID, DOWNLOADS_ID, FILES_ID), so that the caller's permissions to do placement are checked before a file rename/move through MediaProvider.update.

Root cause

In MediaProvider.java, a switch that decides whether a URI type may be "moved" (otherwise it throws IllegalArgumentException "Movement of " + uri) accepted cases including DOWNLOADS_ID and FILES_ID without checking the caller's permissions to do placement. Per the commit message, malicious apps could use MediaProvider.update to rename files in the lower file system that they had no access to. They could not update the MediaProvider DB this way. But they could create fake records in the DB and then rename the file to the same name as their record, which gave them access to the file. Per the commit message, IMAGES_MEDIA_ID, AUDIO_MEDIA_ID and VIDEO_MEDIA_ID URIs were already guarded, and this fix covers all other Media URIs.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2024 · Findings