CVE-2026-28621 AI-generated analysis
platform/packages/services/Telecomm, RingtoneFactory (incoming call ringtone selection)
RingtoneFactory.getRingtone now only uses a contact's custom ringtone URI if the URI's user component (Uri.getUserInfo) is absent or matches the incoming call's associated user, otherwise it falls back to the default ringtone.
Root cause
In src/com/android/server/telecom/RingtoneFactory.java, getRingtone() took the contact ringtone URI from Call.getRingtone() (mCallerInfo.contactRingtoneUri) and passed it directly to RingtoneManager.getRingtone(userContext, ringtoneUri, ...) without checking which user the URI refers to. Per the commit message, a ringtone file owned by a different user could therefore be accessed and played by a user who does not own it.
How the fix works
- Commit 4519ff98a0bb (android-security-14.0.0_r19), RingtoneFactory.java:getRingtone: wraps the RingtoneManager.getRingtone(userContext, ringtoneUri, ...) call in `if (currentUserOwnsRingtone(ringtoneUri, incomingCall))`; otherwise it logs 'Failed to verify that the custom ringtone URI is owned by the current user' and leaves ringtone null so the existing default-ringtone fallback runs.
- Commit 4519ff98a0bb, RingtoneFactory.java:currentUserOwnsRingtone (static): returns false if TextUtils.isEmpty(ringtoneUri.getUserInfo()) or incomingCall.getAssociatedUser() is null; otherwise compares String.valueOf(associatedUser.getIdentifier()) with ringtoneUri.getUserInfo(). This rejected every URI without a user component; the follow-up commit states it prevents a regression caused by this original fix.
- Commit 4519ff98a0bb, Call.java:getRingtone: made public and @VisibleForTesting; adds tests/src/com/android/server/telecom/tests/RingtoneFactoryTest.java with two tests (owner allowed, other user rejected).
- Commit 9639413a5dcc (android-security-14.0.0_r29), RingtoneFactory.java:currentUserOwnsRingtone (now an instance method): if ringtoneUri.getUserInfo() == null returns true (commented as set by the current user); if incomingCall.getAssociatedUser() is null logs (Log.d) and returns false; otherwise compares the associated user id string with the URI userInfo. The getRingtone() gating and Call.java change are the same as the first commit; RingtoneFactoryTest gains testCustomRingtoneAccessibleWhenUserInfoNull.
- Android 15 (0d4024bee09c) and Android 16 (a87be58dc77a) commits in the material carry only the final form (null userInfo accepted, non-static method, three tests).
Completeness
- The check is applied only at the explicit-ringtone path in RingtoneFactory.getRingtone(); the default-ringtone fallback path (RingtoneManager.getActualDefaultRingtoneUri on contextToUse) is unchanged.
- Validation is purely a string comparison of Uri.getUserInfo() against incomingCall.getAssociatedUser().getIdentifier(); a URI with null user component is trusted as belonging to the current user and is passed to RingtoneManager.getRingtone with userContext as before. No validation of scheme, authority or path is added.
- For work contacts, userContext is the work profile context (from mCallsManager.getCurrentUserHandle()) but the ownership check compares against incomingCall.getAssociatedUser(); the material does not show how these interact for a URI carrying the work profile's user id.
- The first Android 14 commit alone (r19) rejects all URIs lacking a user component; the second commit (r29) relaxes this. Per-major facts show 7/8 lines of the patched region in the latest 14, 15 and 16 tags.
Behavior changes
- A contact custom ringtone whose URI user component does not match the call's associated user is no longer played; Telecom logs a warning and uses the default ringtone instead.
- If the incoming call has no associated user and the URI carries a user component, the custom ringtone is rejected (Log.d) and the default is used.
- Between android-security-14.0.0_r19 and r29, custom ringtones with no user component in the URI were also rejected and replaced by the default ringtone; r29 accepts them again.
- Call.getRingtone() visibility changed from package-private to public (@VisibleForTesting).
Per major
- Android 14: Two commits: 4519ff98a0bb in android-security-14.0.0_r19 (initial check, static currentUserOwnsRingtone rejecting empty userInfo, 2 tests), then 9639413a5dcc in android-security-14.0.0_r29 (accepts null userInfo, fixes the regression, 3 tests). At android-security-14.0.0_r31, 7/8 lines of the patched region are present.
- Android 15: Same fix as the final Android 14 form, single commit 0d4024bee09c in android-security-15.0.0_r17 (getRingtone there returns new Pair(ringtoneUri, ringtone)); 7/8 lines of the patched region present at android-security-15.0.0_r19.
- Android 16: Same fix as the final form, single commit a87be58dc77a in android-security-16.0.0_r8; 7/8 lines of the patched region present at android-security-16.0.0_r10.
- Android 17: Not listed by the bulletin for 17; per-major facts show 7/8 lines of the patched region present at android-security-17.0.0_r3.
Unknowns
- How a cross-user ringtone URI gets into CallerInfo.contactRingtoneUri (the contacts data path) is not shown.
- Whether Android 15 and 16 ever carried the over-strict first version; the material shows only the final-form commit for those branches.
- Whether the Android 14 RingtoneFactoryTest compiles against the two-argument constructor and Ringtone return type shown in the 14 code context.
- Interaction of the ownership check with work-profile contacts (userContext from mCallsManager.getCurrentUserHandle() versus incomingCall.getAssociatedUser()) is not shown.
- Which line of the patched region is missing (7/8) in each latest tag.