CVE-2025-48550 AI-generated analysis
platform/frameworks/base, system_server slice permissions (services/core/java/com/android/server/slice/SlicePermissionManager.java)
Adds package-name validation to both SlicePermissionManager.PkgUser constructors so that a malformed package string is rejected with IllegalArgumentException instead of being accepted.
Root cause
SlicePermissionManager.PkgUser stored whatever package string it was given, both in PkgUser(String pkg, int userId) and in PkgUser(String pkgUserStr), which parses a string and wraps parse failures in IllegalArgumentException. Neither constructor checked that mPkg is a well-formed package name or filename. The commit title links this to granting slice permissions. The bulletin classifies the result as a High severity DoS. The material shows neither the exact failure mode nor how mPkg is used downstream.
How the fix works
- SlicePermissionManager.java:PkgUser.enforceValidPackage (new): calls FrameworkParsingPackageUtils.validateName(mPkg, false /* requireSeparator */, true /* requireFilename */) and throws IllegalArgumentException with the returned error string when it is non-empty.
- SlicePermissionManager.java:PkgUser(String pkg, int userId): calls enforceValidPackage() after assigning mPkg and mUserId.
- SlicePermissionManager.java:PkgUser(String pkgUserStr): calls enforceValidPackage() after the existing parse/try-catch.
- New imports: android.content.pm.parsing.FrameworkParsingPackageUtils and android.text.TextUtils.
Completeness
- Both PkgUser constructors are instrumented, so every PkgUser instance is validated at construction. The material shows no other way to set mPkg.
- Validation is syntactic only (validateName with requireSeparator=false, requireFilename=true). It does not check that the package exists, is installed for the user, or belongs to the caller. Any identity or ownership check would have to come from the callers, which are not shown.
- The string-parsing constructor now also throws for invalid entries. The diff does not show how its callers handle the new IllegalArgumentException.
- Nothing changes in the userId handling or in the rest of SlicePermissionManager.
Behavior changes
- PkgUser construction now throws IllegalArgumentException for package names that fail FrameworkParsingPackageUtils.validateName.
- PkgUser(String pkgUserStr) now throws IllegalArgumentException when the parsed package component is malformed, where before it accepted it.
Per major
- Android 14: same fix: commit 54158e2925dc in android-security-14.0.0_r22; 8/8 patched lines present at android-security-14.0.0_r29.
- Android 15: same fix: commit 354820f6ec38 in android-security-15.0.0_r10, same blob hashes (343d2e353abb..27578a01959f) as on 14; 8/8 lines present at android-security-15.0.0_r17.
- Android 16: same fix: commit bae8ab23b03d in android-security-16.0.0_r1, identical hunk content at shifted line offsets (424/434 instead of 410/420); 8/8 lines present at android-security-16.0.0_r8.
- Android 17: not affected (not listed by the bulletin); the patched region is already present (8/8 lines) at android-security-17.0.0_r1.
Unknowns
- The exact DoS failure mode (which operation failed on the invalid name) is not shown.
- Which SliceManagerService entry points construct PkgUser, and what permissions their callers need, is not in the material.
- How callers of the PkgUser constructors (grant paths and persisted-state loading) handle the newly thrown IllegalArgumentException.
- Where the strings passed to PkgUser(String pkgUserStr) come from, and their format.
- Contents of the SliceManagerTest changes referenced in the commit message.
- Android 13 is listed as affected, but the material contains no Android 13 fix commit.