Android security tags, read closely by Lightrion

CVE-2024-0036 AI-generated analysis

platform/frameworks/base, services/core WindowManager/ActivityTaskManager (ActivityTaskManagerService.startNextMatchingActivity)

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 (7 corrections). Verify against the commit before relying on it.

In ActivityTaskManagerService.startNextMatchingActivity, the fix makes the launch use ActivityOptions with setAvoidMoveToFront() (creating basic SafeActivityOptions when none were supplied), so the replacement activity cannot bring its task to the foreground. It also wraps the start in try/finally so the cleared Binder identity is always restored.

Root cause

startNextMatchingActivity clears the Binder calling identity and starts the next matching activity through ActivityStarter with setRealCallingUid(r.launchedFromUid), the UID of whatever launched the calling activity. It passes whatever ActivityOptions the caller supplied, possibly null. Nothing prevented the started activity from moving its task to the front. A later in-tree comment at android-security-14.0.0_r29 calls this a background activity launch through #startNextMatchingActivity: launchedFromUid may have BAL privileges (e.g. the Launcher), and the start uses its identity.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to February 2024 · Findings