Android security tags, read closely by Lightrion

CVE-2025-0077 AI-generated analysis

platform/frameworks/base, ActivityManager multi-user switching (services/core/java/com/android/server/am/UserController.java, core/java/android/app/IUserSwitchObserver.aidl)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (4 corrections). Verify against the commit before relying on it.

Restores locking the device (keyguard shown and waited for) at the beginning of a foreground user switch in UserController.startUser, moves the IUserSwitchObserver.onBeforeUserSwitching dispatch to that same early point, and makes onBeforeUserSwitching a synchronous binder call so observers (SystemUI user tracking) have updated the current user before the keyguard is locked.

Root cause

Android 15 carried commit ad64f73046717374d4f9bc613307d01e93e19ebe ("Move showing keyguard after the UserSwitchObservers"), which removed the lock at the start of UserController.startUser (foreground path) and instead called showKeyguard()/dismissKeyguard() from completeUserSwitch via runWithTimeout, i.e. only at the end of the switch after the observers. The revert's message states this caused b/360838273 and can cause security issues, and that the keyguard must be shown at the beginning of the user switch as before. In addition, IUserSwitchObserver was a fully oneway interface, so onBeforeUserSwitching returned before SystemUI's UserTrackerImpl updated its notion of the current user. When switching from a user with lock "None" to a user with credentials, the keyguard could believe the current user was the old unlocked user and skip showing (per commit 3b04c948727c message). The onBeforeUserSwitching loop also lived in dispatchUserSwitch, after setCurrentUser and the lock point.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to May 2025 · Findings