CVE-2026-28633 AI-generated analysis
platform/frameworks/base, services/voiceinteraction (VoiceInteractionManagerService / RecognitionServiceInfo)
In safe mode, VoiceInteractionManagerService no longer parses the recognition service metadata of third-party (non-FLAG_SYSTEM) recognizers in RecognitionServiceInfo.getAvailableServices, nor the metadata of the already-configured current recognizer, to prevent a malicious large metadata file from causing boot issues (OOM) in safe mode.
Root cause
When VoiceInteractionManagerService initializes recognizer settings for a user, RecognitionServiceInfo.getAvailableServices calls RecognitionServiceInfo.parseInfo on every resolved recognition service. A separate path also calls parseInfo on the currently configured recognizer (curRecognizer != null branch). Per the commit message and inline comments, a malicious app can supply a large XML recognition service metadata file, and loading it can cause an OOM that crashes the system and causes boot issues. This parsing also ran in safe mode, even though third-party apps are not launchable in safe mode.
How the fix works
- RecognitionServiceInfo.java:getAvailableServices gains a boolean isSafeMode parameter. For each ResolveInfo, if isSafeMode is true and serviceInfo.applicationInfo.flags lacks ApplicationInfo.FLAG_SYSTEM, it skips parseInfo, adds new RecognitionServiceInfo(serviceInfo, selectableAsDefault=true, parseError="") and continues. FLAG_SYSTEM recognizers are still parsed in safe mode. In normal mode the behavior is unchanged.
- VoiceInteractionManagerService.java (curRecognizer != null branch of initialization): the guard around RecognitionServiceInfo.parseInfo(mContext.getPackageManager(), recognizerInfo) changes from `recognizerInfo != null` to `recognizerInfo != null && !mSafeMode`, so the metadata of the already-set recognizer (system or third-party) is not parsed in safe mode.
- VoiceInteractionManagerService.java: the call at the recognizer selection site (around line 834 on Android 14) becomes RecognitionServiceInfo.getAvailableServices(mContext, userHandle, mSafeMode).
- Single commit. parseInfo itself is not modified.
Completeness
- The fix only suppresses metadata parsing when mSafeMode is true. In a normal boot, parseInfo still runs on every resolved recognizer's metadata, so the fix limits the safe-mode boot path rather than the parsing itself.
- In getAvailableServices the skip applies only to apps without ApplicationInfo.FLAG_SYSTEM; system recognizers are still parsed in safe mode. Updated preinstalled apps keep FLAG_SYSTEM, so their metadata is still parsed (general platform knowledge).
- The curRecognizer branch skips parsing for any recognizer in safe mode, system or not, which is broader than the getAvailableServices filter.
- parseInfo is unchanged. The material shows no other callers beyond these two sites. The TODO about using this class in VoiceInputHelper refers to possible future use.
Behavior changes
- In safe mode, third-party recognition services are returned by getAvailableServices with selectableAsDefault=true and an empty parse error without their metadata being parsed; the comment says they still will not be auto-selected because only preinstalled recognizers are auto-selected.
- In safe mode, a currently configured recognizer whose metadata marks it as not selectableAsDefault is no longer detected and unset during initialization, and its parse-error warning is not logged (that block now runs only when !mSafeMode).
- getAvailableServices signature changed (new boolean parameter); any additional caller must be updated.
Per major
- Android 14: same fix; commit 20ecd72dd4c8 in android-security-14.0.0_r29, cherry-pick of a81b51b6a6e0 (Change-Id I52435ca8da633a73fc63e07c6fea3ec9cd8cd986); 8/8 patched lines present
- Android 15: same fix; commit df4d44965279 in android-security-15.0.0_r17, identical hunks, VoiceInteractionManagerService.java hunks at 648 and 912 (old) / 915 (new); 8/8 present
- Android 16: same fix; commit a660d0c46482 in android-security-16.0.0_r8, identical hunks at 648 and 912 (old) / 915 (new); 8/8 present
- Android 17: same fix; commit 4c5500a0d604 in android-security-17.0.0_r1, identical hunks at 818 and 1101 (old) / 1104 (new); 8/8 present
Unknowns
- The parseInfo implementation, and whether it bounds resource or XML size, are not shown.
- Exact size or structure of metadata that triggers the OOM, and whether it happens in resource loading or XML parsing.
- Whether Google shipped separate hardening of parseInfo; none is in the material.
- Names of the enclosing VoiceInteractionManagerService methods and whether other in-tree callers of parseInfo exist.