CVE-2026-49934 AI-generated analysis
platform/packages/services/Telecomm, outgoing call intent processing (NewOutgoingCallIntentBroadcaster, MmiUtils)
Telecom's dangerous-MMI gate in NewOutgoingCallIntentBroadcaster.evaluateCall now checks the number extracted from the CALL intent (rebuilt as a Uri) instead of the raw intent data. The MmiUtils classifiers also trim surrounding whitespace from the scheme-specific part before matching. As a result, a tel: URI with leading whitespace no longer gets past the check that limits dangerous MMI and vertical service codes to the default or system phone app.
Root cause
In NewOutgoingCallIntentBroadcaster.evaluateCall, the branch that decides whether a CALL intent carries a dangerous MMI or vertical service code called mMmiUtils.isDangerousMmiOrVerticalCode(intent.getData()), so it ran on the raw URI. It did not use the local `number`, which per the commit message comes from getNumberFromCallIntent and has already been through its correctness checks. The MmiUtils classifiers read handle.getSchemeSpecificPart() without normalizing it. isDangerousVerticalServiceCode requires charAt(0) == '*'. isCallForwardingMmiCode needs sPatternSuppService, whose pattern starts with an MMI action prefix, to match the whole string. A tel: URI whose scheme-specific part starts with whitespace (for example "tel: *21*1234567#", as in the new test) was therefore not classified as dangerous. The `!mIsDefaultOrSystemPhoneApp` rejection, which cancels the call with OUTGOING_CANCELED and sends the request to the system dialer via ACTION_DIAL, was not applied.
How the fix works
- src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java:evaluateCall: the dangerous-code check now receives Uri.fromParts(handle.getScheme(), number, null), where `number` is the value already extracted (per the commit message, via getNumberFromCallIntent). The raw intent.getData() is no longer used.
- src/com/android/server/telecom/MmiUtils.java:isCallForwardingMmiCode: dialString is trimmed (if non-null) before sPatternSuppService.matcher(), so leading or trailing whitespace no longer stops the regex from matching a call-forwarding service code.
- src/com/android/server/telecom/MmiUtils.java:isDangerousVerticalServiceCode: dialedNumber is trimmed (if non-null), and a null guard is added before the length check and the charAt(0) == '*' test.
- src/com/android/server/telecom/MmiUtils.java:isPotentialInCallMMICode: dialedNumber is trimmed (if non-null), and the equals, startsWith and length checks are wrapped in a null guard.
- src/com/android/server/telecom/MmiUtils.java:isPotentialMMICode: rewritten to return early on a null handle or null scheme-specific part, then trim before contains("#"). Trimming does not change the result of the '#' test.
- tests: MmiUtilsTest adds whitespace-padded dangerous dial strings. NewOutgoingCallIntentBroadcasterTest adds testDangerousMmiCodeWithLeadingSpacesAndNonDefaultDialer and relaxes the existing mock to any(), because the Uri passed to isDangerousMmiOrVerticalCode is now a newly built object.
Completeness
- The fix has two layers. The evaluateCall gate uses the extracted `number`, and all four MmiUtils classifiers trim on their own, so the MmiUtils helpers are also hardened for any other caller that passes a raw Uri.
- Normalization in MmiUtils is limited to String.trim(). It does not remove interior whitespace or other non-dialable characters. Whether getNumberFromCallIntent handles those is not shown in the material.
- isDangerousVerticalServiceCode and isPotentialInCallMMICode are gated by isTelScheme. isCallForwardingMmiCode has no scheme check and now trims for any scheme.
- The new null guards in isDangerousVerticalServiceCode and isPotentialInCallMMICode duplicate isTelScheme's non-null check on getSchemeSpecificPart(), so they are only defensive.
- The fix does not change getNumberFromCallIntent. The commit message says it already performs correctness checks.
Behavior changes
- MmiUtils now classifies dangerous MMI and vertical service codes with leading or trailing whitespace the same way as unpadded ones. If a CALL intent carries one and the caller is not the default or system phone app, the call is cancelled with DisconnectCause.OUTGOING_CANCELED and sent to the system dialer via ACTION_DIAL, as the new test shows.
- isDangerousMmiOrVerticalCode now receives a newly built Uri (scheme from the intent, scheme-specific part = extracted number) instead of the original intent Uri. Any mock or override keyed on the exact Uri must be updated; the test switched to any().
- isPotentialInCallMMICode and isPotentialMMICode now also trim before matching, so padded in-call codes and dial strings are matched the same way as unpadded ones.
Per major
- Android 14: Same fix: commit 12f9b433c1ae in android-security-14.0.0_r29. The MmiUtils and NewOutgoingCallIntentBroadcaster changes are identical (hunk at line 291). The test differs only in resolving config_defaultDialer via Resources.getSystem().getIdentifier. The patched region is present at android-security-14.0.0_r31 (7/8 lines).
- Android 15: Same fix: commit 34f4edcdb5b0 in android-security-15.0.0_r17 (the analysed commit), hunk at line 297. The patched region is present at android-security-15.0.0_r19 (7/8 lines).
- Android 16: Same fix: commit c36565c8706e in android-security-16.0.0_r8, identical source changes, hunk at line 294. The patched region is present at android-security-16.0.0_r10 (7/8 lines).
- Android 17: Same fix: commit 84aa17aab267 in android-security-17.0.0_r1, identical source changes, hunk at line 209. As on Android 14, the test uses Resources.getSystem().getIdentifier. The patched region is present at android-security-17.0.0_r3 (7/8 lines).
Unknowns
- The body of getNumberFromCallIntent and exactly what normalization it applies to the dial string are not in the material.
- The condition of the if branch just before the dangerous-MMI else-if in evaluateCall is not shown.
- The path a call takes after the gate is skipped, and which downstream component then interprets the whitespace-prefixed dial string, are not shown.
- Whether isPotentialInCallMMICode takes part in the dangerous-code gate is not shown.
- What the missing 1/8 line in the 'patched region present' metric corresponds to on each latest security tag.