CVE-2026-28632 AI-generated analysis
platform/packages/modules/IntentResolver, ChooserActivity cross-profile (work/personal) target resolution
ChooserActivity now filters the alternate (payload) intents it hands to the other profile's target list so that only the target intent and alternate intents that pass IntentForwarderActivity.canForward for the source/target user pair are resolved cross-profile, and returns an empty list when the target intent itself cannot be forwarded.
Root cause
In ChooserActivity's two-profile pager adapter creation, the full list mIntents (target intent plus caller-supplied alternate intents) was passed through sanitizePayloadIntents, which only stripped package/component/selector, and then used as cross-profile payload intents for a ChooserGridAdapter. The cross-profile policy gate, AbstractMultiProfilePagerAdapter.CrossProfileIntentsChecker.hasCrossProfileIntents, returned true if ANY intent in the list satisfied IntentForwarderActivity.canForward. As a result, alternate intents not individually permitted by the cross-profile policy could still be resolved against the other profile as long as one intent was forwardable (bulletin type ID).
How the fix works
- java/src/com/android/intentresolver/util/IntentUtils.kt: adds isCrossProfileIntent(intent, sourceUserId, targetUserId, packageManager, contentResolver), a wrapper returning IntentForwarderActivity.canForward(...) != null using intent.resolveTypeIfNeeded(contentResolver).
- IntentUtils.kt: adds prepareCrossProfileIntents(contentResolver, targetIntent, intents, source, target). It first checks the target intent with isCrossProfileIntent for the source->target user pair; if it fails, it returns emptyList() (comment: the empty collection is then handled by NoCrossProfileEmptyStateProvider). Otherwise it calls sanitizePayloadIntents with a predicate that keeps an intent only if it is intents[0] (the target intent per the in-code comment) or it individually passes isCrossProfileIntent.
- IntentUtils.kt: sanitizePayloadIntents gains an optional predicate parameter (default { true }); entries failing the predicate are dropped (null entries are preserved on Android 14), kept entries are still copied with package/component and selector package/component cleared.
- java/src/com/android/intentresolver/ChooserActivity.java (two-profile pager adapter creation method following createChooserMultiProfilePagerAdapterForOneProfile): replaces sanitizePayloadIntents(mIntents) with prepareCrossProfileIntents(getContentResolver(), mChooserRequest.getTargetIntent(), mIntents, source, target), where source/target are personal->work when selectedProfile == PROFILE_PERSONAL and work->personal otherwise. The visible context indicates the result is used as the payload intents of the non-selected profile's adapter.
- ChooserActivity.java: overrides createCrossProfileIntentsChecker() to return the new AlwaysTrueCrossProfileIntentsChecker, whose hasCrossProfileIntents returns intents.isNotEmpty(); its doc comment states it is for cases where the cross-profile intents have been vetted elsewhere (here, in prepareCrossProfileIntents).
- java/src/com/android/intentresolver/AbstractMultiProfilePagerAdapter.java:CrossProfileIntentsChecker.hasCrossProfileIntents: refactored to call isCrossProfileIntent; same anyMatch semantics.
Completeness
- Covers the ChooserActivity two-profile path (personal<->work) in both directions, for the target intent and every alternate intent in mIntents.
- The target intent (intents[0]) is passed through unconditionally once the top-level canForward check on mChooserRequest.getTargetIntent() succeeds; the predicate relies on intents[0] being that target intent, per the in-code comment referencing ResolverActivity.mIntents initialization.
- The base CrossProfileIntentsChecker (anyMatch over the list) is left unchanged for other callers; which other callers use it and whether they forward unfiltered intent lists is not shown in the material.
- Android 14 variant has no private-profile handling; Android 15/16 add getEffectiveProfile to map Private profile to the personal (parent) profile for the check. The Android 14 diff uses only personal/work/clone handles in this path.
- Unit tests for prepareCrossProfileIntents were added on 15/16 (IntentUtilsTest.kt) but not in the Android 14 commit; the commit message cites manual testing and new STS tests.
Behavior changes
- Alternate intents that fail IntentForwarderActivity.canForward for the source->target user pair are no longer passed as cross-profile payload intents.
- If the chooser's target intent cannot be forwarded to the other profile, the cross-profile payload intent list is empty; per the code comment this is handled by NoCrossProfileEmptyStateProvider.
- ChooserActivity's cross-profile checker now returns intents.isNotEmpty() (AlwaysTrueCrossProfileIntentsChecker) instead of anyMatch(canForward).
- canForward is now evaluated for the target intent and then for each alternate intent individually (no short-circuit) when the pager adapter is created.
Per major
- Android 14: adapted fix: commit d07a326e6a02 in android-security-14.0.0_r29 (Cherrypick-From 224a40d0b2bdc8fb48bd0f4d456e7019f9d7294a, Change-Id I85ece5179da3f4908870be96174be4ec4fd912e5). Uses nullable List<Intent?>, the inner class AbstractMultiProfilePagerAdapter.CrossProfileIntentsChecker, AlwaysTrueCrossProfileIntentsChecker in package com.android.intentresolver, no getEffectiveProfile/private profile handling and no unit tests. At android-security-14.0.0_r31 6/8 lines of the patched region are present.
- Android 15: same fix as 16: commit 3a9315003908 in android-security-15.0.0_r17; touches ChooserActivity.java (createChooserGridAdapter call site using request.getCrossProfilePayloadIntents and getEffectiveProfile for Private profile), emptystate/CrossProfileIntentsChecker.java, new emptystate/AlwaysTrueCrossProfileIntentsChecker.kt, IntentUtils.kt with injectable packageManagerProvider/isCrossProfileIntent, plus IntentUtilsTest.kt. 8/8 lines present at android-security-15.0.0_r19.
- Android 16: same fix as 15: commit 661c048f08fb in android-security-16.0.0_r8, same content apart from ChooserActivity context/line offsets. 8/8 lines present at android-security-16.0.0_r10.
- Android 17: not listed by the bulletin (not affected per the bulletin); 5/8 lines of the patched region present at android-security-17.0.0_r3, the material does not show how the code reached that state.
Unknowns
- Whether ResolverActivity (non-chooser) or other callers also hand an unfiltered intent list to a cross-profile adapter; their code is not in the material.
- Exact name of the Android 14 ChooserActivity method changed (not shown in the diff hunk headers) and full payloadIntents ternary (truncated).
- Which intent list NoCrossProfileEmptyStateProvider passes to hasCrossProfileIntents.
- What the STS tests referenced in the commit message exercise.
- Why Android 17 is not listed by the bulletin while only 5/8 lines of the patched region are present at android-security-17.0.0_r3.