Add creator tokens to intents in ActivityClientController
In `ActivityClientController.navigateUpTo`, the `resultData` and `destIntent` were previously forwarded without stamping nested `Intent` extras with creator tokens. This allowed an attacker to supply nested intents without creator tokens that were erroneously marked as trusted by the receiving victim application. Consequently, this could bypass intent redirection mitigations (such as `prevent_intent_redirect` creator checks) to launch non-exported activities or grant unauthorized URI permissions.
This commit resolves the vulnerability by explicitly calling `ActivityManagerInternal.addCreatorToken()` on both `destIntent` and `resultData` using the calling activity's package name before proceeding with the task up-navigation. This ensures that nested intents contain the appropriate tokens and are correctly validated.
Test: m WmTests
Bug: 527034642
Flag: EXEMPT BUGFIX
This was autogenerated by MendIt (go/androidmendit)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:251949ef9f045abc67c169dd0cceb076ad9d9c7e
Merged-In: I29788473cc535161aa90a4259bcfa3c013f2359b
Change-Id: I29788473cc535161aa90a4259bcfa3c013f2359b
1 file changed