CVE-2026-45522 AI-generated analysis
platform/packages/apps/ManagedProvisioning, preprovisioning (PreProvisioningActivityController)
ManagedProvisioning now rejects ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE and ACTION_PROVISION_FINANCED_DEVICE requests whose calling package is com.google.android.setupwizard when the device has already completed provisioning.
Root cause
In PreProvisioningActivityController, the caller-verification method that branches on the intent action (its name is not shown in the hunk) handled ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE and ACTION_PROVISION_FINANCED_DEVICE by returning only verifyActivityAlias(intent, "PreProvisioningActivityViaTrustedApp"). That branch did not check whether the device was already provisioned and did not check callingPackage. As a result, Setup Wizard could start device owner or financed device provisioning on a device that had already finished initial setup. The bulletin rates this as a High EoP.
How the fix works
- src/com/android/managedprovisioning/common/Globals.java: adds the constant SETUP_WIZARD_PACKAGE_NAME = "com.google.android.setupwizard".
- src/com/android/managedprovisioning/preprovisioning/PreProvisioningActivityController.java: adds private boolean verifyTrustedSource(String callingPackage). If mSettingsFacade.isDeviceProvisioned(mContext) is false, it returns true, so all trusted sources are allowed before provisioning. Otherwise it calls ProvisionLogger.logd and returns !SETUP_WIZARD_PACKAGE_NAME.equals(callingPackage), which is false only for the Setup Wizard package.
- src/com/android/managedprovisioning/preprovisioning/PreProvisioningActivityController.java: the ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE / ACTION_PROVISION_FINANCED_DEVICE branch now returns verifyTrustedSource(callingPackage) && verifyActivityAlias(intent, "PreProvisioningActivityViaTrustedApp"). The new check runs first, and if it fails the alias check is skipped.
- tests/instrumentation/.../PreProvisioningActivityControllerTest.java: adds three tests. (1) Setup Wizard on a provisioned device expects showErrorAndClose with R.string.cant_set_up_device and R.string.contact_your_admin_for_help. (2) Setup Wizard on an unprovisioned device expects onParamsValidated. (3) A trusted source other than Setup Wizard on a provisioned device expects onParamsValidated.
Completeness
- Covers both trusted-source actions (ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE and ACTION_PROVISION_FINANCED_DEVICE). They share the one branch that previously only called verifyActivityAlias.
- The block is a deny-list keyed on one hardcoded package name, com.google.android.setupwizard. Any other calling package on a provisioned device still passes verifyTrustedSource, and the test testTrustedSource_nonSetupWizardCallsWhenDeviceProvisioned_succeeds asserts this. This check does not cover a Setup Wizard shipped under a different package name.
- The decision depends entirely on the callingPackage string passed into initiateProvisioning. The material does not show how that value is derived or whether it can be influenced.
- The other branches of the caller-verification method are unchanged: the branch that returns the PreProvisioningActivityAfterEncryption alias check, and the else branch that calls verifyCaller(callingPackage). The hunk does not fully show which actions map to these branches.
Behavior changes
- On a provisioned device, a trusted-source or financed-device provisioning intent from com.google.android.setupwizard now fails validation. Per the new test, the UI receives showErrorAndClose(R.string.cant_set_up_device, R.string.contact_your_admin_for_help, ...).
- A ProvisionLogger.logd call is made whenever a trusted-source request arrives on a provisioned device.
- No change for unprovisioned devices or for trusted-source callers other than the Setup Wizard package.
Per major
- Android 14: same fix: commit 65cfe16ed60d in android-security-14.0.0_r29; controller hunk at line 947; 8/8 lines present at android-security-14.0.0_r31.
- Android 15: same fix: commit fc97ea693501 in android-security-15.0.0_r17; identical content, controller hunk at line 956; 8/8 lines present at android-security-15.0.0_r19.
- Android 16: same fix: commit 13d3d66532b1 in android-security-16.0.0_r8; identical content, controller hunk at line 985, test hunk at line 864; 8/8 lines present at android-security-16.0.0_r10.
- Android 17: same fix: commit eca98dac86d9 in android-security-17.0.0_r3; identical content and offsets to 16; 8/8 lines present at android-security-17.0.0_r3.
Unknowns
- The name of the enclosing caller-verification method is not visible in the diff hunk.
- The material does not show how initiateProvisioning obtains callingPackage, or whether that value comes from a trusted source such as the activity's calling package.
- The material does not describe the concrete trigger (how Setup Wizard is made to start provisioning after setup) or the privilege gained. It only gives the bulletin's High EoP rating.
- The hunk does not fully show which other actions map to the AfterEncryption and verifyCaller branches.
- Whether ProvisionLogger.logd output is gated by a debug flag.