CVE-2026-49922 AI-generated analysis
platform/packages/services/Telecomm, ConnectionServiceWrapper (IConnectionServiceAdapter binder implementation)
Adds an AppOpsManager.checkPackage(callingUid, callingPackage) check to the binder-facing queryRemoteConnectionServices in Telecom's ConnectionServiceWrapper (its IConnectionServiceAdapter implementation), so a bound ConnectionService can no longer pass in an arbitrary callingPackage string.
Root cause
In src/com/android/server/telecom/ConnectionServiceWrapper.java, the binder implementation of IConnectionServiceAdapter.queryRemoteConnectionServices(RemoteServiceCallback, String callingPackage, Session.Info) took the callingPackage string directly from the binder caller. It then cleared the calling identity and passed callingPackage, together with the calling user handle, to ConnectionServiceWrapper.this.queryRemoteConnectionServices. Nothing checked that callingPackage actually belonged to Binder.getCallingUid(), so a caller could present another package's name. The commit message says this could let calls be made without the app permissions that would normally be required. The material does not show exactly how callingPackage is used further down.
How the fix works
- src/com/android/server/telecom/ConnectionServiceWrapper.java, binder queryRemoteConnectionServices: captures `final int callingUid = Binder.getCallingUid()` next to the existing callingUserHandle, before any identity clearing.
- Same function: calls `mAppOpsManager.checkPackage(callingUid, callingPackage)` as the first statement inside the outer try, before `Binder.clearCallingIdentity()`. checkPackage throws SecurityException when the package is not owned by that UID (general platform knowledge), so a mismatched callingPackage never reaches the internal queryRemoteConnectionServices.
- Same function: restructures the try/finally so that clearCallingIdentity/restoreCallingIdentity form an inner try/finally that runs only after the check passes. The outer `catch (Throwable t)` still logs and rethrows, so the exception reaches the binder caller, and the outer finally still calls Log.endSession().
- The internal ConnectionServiceWrapper.this.queryRemoteConnectionServices(callingUserHandle, callingPackage, callback) is unchanged. The fix only adds a check in front of it.
Completeness
- In the shown context, this is the only adapter entry point that accepts a package name from the caller. The sibling methods visible there (onPostDialChar, setVideoState) take no callingPackage argument and are not touched.
- The check ties callingPackage to the calling UID but does not otherwise limit who may call the method. Any process holding the adapter binder can still call it with its own package name.
- The internal queryRemoteConnectionServices(UserHandle, String, RemoteServiceCallback) is not changed. The material does not show whether any other path reaches it with an unverified package.
- The per-major facts report 7/8 patched-region lines at the latest 14/15/16 security tags. However, the quoted code at android-security-14.0.0_r31 contains the full fix (callingUid, checkPackage, nested try/finally). The material does not say which line is counted as missing.
Behavior changes
- queryRemoteConnectionServices now throws SecurityException (from AppOpsManager.checkPackage) back to the binder caller when callingPackage does not belong to the calling UID. The exception is also logged with Log.e before it is rethrown.
- Binder identity is no longer cleared before the package check. It is cleared only after the check passes.
- Legitimate ConnectionService callers pass getOpPackageName() from ConnectionService.onAdapterAttached (per index search), so they should pass the check.
Per major
- Android 14: Same fix: commit 4ac0b6201cc0 in android-security-14.0.0_r29, a cherry-pick of f93b1e37858c. The code at android-security-14.0.0_r31 shows checkPackage and the nested try/finally in place (the per-major facts count 7/8 region lines).
- Android 15: Same fix: commit 8adbb86845d0 in android-security-15.0.0_r17. The diff is identical, at a different hunk offset (@@ -729). The per-major facts count 7/8 region lines at r19.
- Android 16: Same fix: commit 125c1454cbea in android-security-16.0.0_r8. The diff is identical (@@ -731). The per-major facts count 7/8 region lines at r10.
- Android 17: Per the per-major facts, Android 17 is not listed by the bulletin, although the bulletin's affected-versions list includes 17-qpr2-next. android-security-17.0.0_r3 contains 8/8 lines of the patched region.
Unknowns
- How the internal ConnectionServiceWrapper.queryRemoteConnectionServices uses callingPackage, and which permission decision it feeds. The commit message says calls could be made without the necessary app permissions, but that code is not in the material.
- Which line accounts for the 7/8 match at the latest 14/15/16 tags. The quoted 14 code shows the complete fix.
- Per index search, the Telecomm test fixture ConnectionServiceFixture.sendQueryRemoteConnectionServices passes an empty callingPackage. The material does not show whether the tests were adjusted for the new check.
- The exact PoC behaviour referenced by 'Test: verify with POC'.