Android security tags, read closely by Lightrion

CVE-2024-0047 AI-generated analysis

platform/frameworks/base, UserManagerService (services/core pm) and DevicePolicyEngine (services/devicepolicy)

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

Three frameworks/base commits make UserManagerService persist device policy global and local user restrictions under distinct XML tags, read the pre-userVersion-10 local restriction format correctly on upgrade, and force DevicePolicyEngine to re-sync global and per-user restriction state into UserManager whenever a DPC sets or clears a user restriction.

Root cause

In UserManagerService.writeUserLP, both mDevicePolicyUserRestrictions.getRestrictions(UserHandle.USER_ALL) (global) and getRestrictions(userInfo.id) (local) were serialized under TAG_DEVICE_POLICY_RESTRICTIONS. readUserLP parses that tag as legacyLocalRestrictions rather than as globalRestrictions/localRestrictions. The commit message of f51673939874 states that on certain Android 14 builds global restrictions set by the DPC can go into UserManager's local restriction store, a state where they "cannot be unset in future". Separately, when upgrading from userVersion 9 (Android 13), readUserLP parsed TAG_DEVICE_POLICY_LOCAL_RESTRICTIONS with UserRestrictionsUtils.readRestrictions, but the v9 format stores local restrictions as restrictions_user sub tags grouped by source user id, so they were misread (commit message: read as base restrictions).

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2024 · Findings