CVE-2026-58969 AI-generated analysis
platform/frameworks/base, services/core media quality service (MediaQualityService, system_server)
Adds MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE / MANAGE_GLOBAL_SOUND_QUALITY_SERVICE caller checks to eight Binder methods of MediaQualityService so unprivileged callers can no longer read system picture and sound profile handles and related data.
Root cause
Eight Binder methods of the MediaQualityService inner binder implementation (changeStreamStatus, getPictureProfileHandle, getPictureProfileHandles, getPictureProfileForTvInput, getCurrentPictureProfileHandleForTvInput, getCurrentPictureProfileForTvInput, getSoundProfileHandle, getSoundProfileHandles) did no caller permission check before resolving profile ids to handles, querying the picture quality database, or forwarding stream status to the HAL listener. The commit message says this let unprivileged apps read signature-gated TYPE_SYSTEM picture and sound profiles, which include device configuration parameters and unique UUIDs. Per index search, the client wrapper MediaQualityManager.getPictureProfileHandles is annotated @RequiresPermission(MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE) but the service did not enforce it, and the indexed snippet of MediaQualityManager.getPictureProfileHandle shows no permission annotation.
How the fix works
- services/core/java/com/android/server/media/quality/MediaQualityService.java:changeStreamStatus: at method entry, reads Binder.getCallingUid()/getCallingPid(). If hasGlobalPictureQualityServicePermission(uid, pid) is false, it calls mMqManagerNotifier.notifyOnPictureProfileError(null, PictureProfile.ERROR_NO_PERMISSION, uid, pid), logs 'changeStreamStatus: no permission' and returns before it touches mPictureProfileTempIdMap or mPictureProfileAdjListener.onStreamStatusChanged.
- MediaQualityService.java:getPictureProfileHandle and getPictureProfileHandles: the same picture permission gate. On failure they report ERROR_NO_PERMISSION and return new ArrayList<>() instead of resolving ids under mPictureProfileLock.
- MediaQualityService.java:getPictureProfileForTvInput: the same gate, placed after the DEBUG log and before the database query. Returns -1 on failure.
- MediaQualityService.java:getCurrentPictureProfileHandleForTvInput: the same gate. Returns PictureProfileHandle.NONE on failure.
- MediaQualityService.java:getCurrentPictureProfileForTvInput: the same gate. Returns null on failure. Otherwise it delegates to getPictureProfileForTvInput, which is now also gated.
- MediaQualityService.java:getSoundProfileHandle and getSoundProfileHandles: gate on hasGlobalSoundQualityServicePermission(uid, pid). On failure they report through mMqManagerNotifier.notifyOnSoundProfileError(null, SoundProfile.ERROR_NO_PERMISSION, uid, pid), log, and return new ArrayList<>().
- The diff does not add hasGlobalPictureQualityServicePermission or hasGlobalSoundQualityServicePermission, so they already existed. The commit only inserts 8 call sites: 64 added lines, no deletions.
Completeness
- Covers eight Binder methods: one picture-profile method that forwards state to the HAL (changeStreamStatus), five picture-profile readers and two sound-profile readers.
- Uses the existing hasGlobal*QualityServicePermission helpers. The diff does not show how they are implemented, so the exact permission semantics are not visible in the material.
- Per index search, frameworks/av MediaCodec.cpp also calls other Binder methods of the same service (getPictureProfileHandleValue and notifyPictureProfileHandleSelection). This diff does not touch them, and the material does not show whether they already had checks.
- The fix gates on caller identity only. It does not change what the queries return to authorized callers.
Behavior changes
- Callers without MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE now get an empty list from getPictureProfileHandle/getPictureProfileHandles, -1 from getPictureProfileForTvInput, PictureProfileHandle.NONE from getCurrentPictureProfileHandleForTvInput and null from getCurrentPictureProfileForTvInput, and changeStreamStatus does nothing for them. No SecurityException is thrown.
- Callers without MANAGE_GLOBAL_SOUND_QUALITY_SERVICE get an empty list from getSoundProfileHandle/getSoundProfileHandles.
- Each denied call now sends an error callback (notifyOnPictureProfileError / notifyOnSoundProfileError with ERROR_NO_PERMISSION and a null profile id) and logs one Slog.e line.
- For unprivileged callers, changeStreamStatus no longer forwards stream status to the HAL IPictureProfileAdjustmentListener.
Per major
- Android 14: code absent: MediaQualityService.java does not exist at android-security-14.0.0_r31. Not listed by the bulletin.
- Android 15: code absent: MediaQualityService.java does not exist at android-security-15.0.0_r19. Not listed by the bulletin.
- Android 16: not listed by the bulletin (not affected per the bulletin). At android-security-16.0.0_r10 the file exists and 4/8 lines of the patched region are present. The material has no fix commit for 16.
- Android 17: same fix: commit 97984663fccf in android-security-17.0.0_r3, with 8/8 patched lines present. It is a cherry-pick of commit 1c17b5292079 (Change-Id Ic8d9f4472b4a1c114aa105491c4f7182e5c47de9).
Unknowns
- How hasGlobalPictureQualityServicePermission / hasGlobalSoundQualityServicePermission are implemented, and which UIDs pass them.
- Whether the other MediaQualityService Binder methods that frameworks/av calls (getPictureProfileHandleValue, notifyPictureProfileHandleSelection) already have permission checks.
- The bulletin/OSV affected-versions list includes '16-qpr2', but the per-major facts treat Android 16 as not listed. Whether a 16-qpr2 branch needs or received this fix, and which of the eight methods exist at 16.0.0_r10, is not shown.
- Which fields of TYPE_SYSTEM profiles are exposed, beyond the commit message's 'configuration parameters and unique UUIDs'.