Android security tags, read closely by Lightrion

CVE-2023-20971 AI-generated analysis

platform/frameworks/base, services/core PermissionManagerServiceImpl (permission registry)

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.

Adds a missing early return in PermissionManagerServiceImpl.removePermission() so that a non-dynamic permission is no longer removed from the registry after the "Not allowed to modify non-dynamic permission" check fails.

Root cause

In services/core/java/com/android/server/pm/permission/PermissionManagerServiceImpl.java, removePermission(String permName) looks up the Permission from mRegistry and, if !bp.isDynamic(), logs Slog.wtf("Not allowed to modify non-dynamic permission ...") but then falls through to mRegistry.removePermission(permName) and mPackageManagerInt.writeSettings(false). Per the commit message only dynamic permissions are supposed to be removable, but the code let a caller that passes mRegistry.enforcePermissionTree(permName, callingUid) remove a non-dynamic permission from the registry and persist that change.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to August 2024 · Findings