Android security tags, read closely by Lightrion

CVE-2024-0020 AI-generated analysis

platform/packages/apps/Settings, ringtone/notification sound preferences (RingtonePreference, DefaultRingtonePreference, NotificationSoundPreference)

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

Adds a shared RingtonePreference.isValidRingtoneUri() check that rejects picked ringtone content URIs whose embedded userId (content://{userId}@...) belongs to a user that is not a permitted profile of the current user, and applies it in DefaultRingtonePreference.onSaveRingtone and NotificationSoundPreference.onActivityResult.

Root cause

Ringtone URIs returned from the ringtone picker were accepted with too little validation. DefaultRingtonePreference.onSaveRingtone only resolved the mime type through mUserContext.getContentResolver().getType() and checked that it was audio/* or application/ogg. It never looked at the userId encoded in the URI (content://{userId}@...), so a URI pointing at content of an unrelated user could be stored through RingtoneManager.setActualDefaultRingtoneUri. NotificationSoundPreference.onActivityResult did no validation at all before setRingtone(uri) and callChangeListener(uri). The bulletin classifies the result as information disclosure (ID), High.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to January 2024 · Findings