Android security tags, read closely by Lightrion

CVE-2024-34738 AI-generated analysis

platform/frameworks/base, AppOps (services/core/java/com/android/server/appop/AppOpsService.java)

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.

AppOpsService now filters restricted-read app ops out of collectOps() results unless the caller holds GET_APP_OPS_STATS, and verifyIncomingOp() accepts any of MANAGE_APPOPS, GET_APP_OPS_STATS or MANAGE_APP_OPS_MODES instead of only MANAGE_APPOPS for restricted ops.

Root cause

Ops flagged restrictRead (AppOpsManager.opRestrictsRead) were checked in verifyIncomingOp(), which enforced MANAGE_APPOPS for a restricted op. The result builder collectOps(Ops pkgOps, int[] ops) did no permission check at all. When ops == null it added every Op of the package, and when an ops array was given it added every matching Op. So restricted-read op entries could appear in the results it built regardless of the caller's permissions. Separately, verifyIncomingOp only accepted MANAGE_APPOPS and rejected other privileged appops permission holders.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to August 2024 · Findings