Android security tags, read closely by Lightrion

CVE-2024-0022 AI-generated analysis

platform/frameworks/base, CompanionDeviceManagerService (system_server companion service)

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.

CompanionDeviceManagerService.requestNotificationAccess now passes the caller-supplied userId into checkCanCallNotificationApi/enforceCallerIsSystemOr instead of ignoring it. Per the commit message, this makes sure the calling user id matches the passed user id, so notification access can no longer be requested across users.

Root cause

The binder method requestNotificationAccess(ComponentName component, int userId) took a userId from the caller. However, its permission check checkCanCallNotificationApi(callingPackage) worked out its own userId from getCallingUserId() and never compared it with the passed one (the code carried a "TODO: check userId" comment). The passed userId was still used to build the NotificationAccessConfirmationActivityContract launcher intent and the PendingIntent via getActivityAsUser(..., new UserHandle(userId)), with the calling identity cleared. So the caller checks ran against the calling user while the resulting action targeted the user id the caller supplied.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to April 2024 · Findings