CVE-2026-55272 AI-generated analysis
platform/frameworks/base (android.app.admin.DeviceAdminInfo, android.content.pm.ComponentInfo); platform/packages/apps/Settings and platform/packages/apps/Car/Settings device admin UI
Adds a length-bounded description loader (ComponentInfo.loadDescription, exposed as DeviceAdminInfo.loadDescriptionSafe, trimming to 1024 characters) and switches the Settings and Car Settings device admin screens from DeviceAdminInfo.loadDescription() to it.
Root cause
DeviceAdminInfo.loadDescription(PackageManager) returns the text of the device admin's description resource via pm.getText() with no size limit. Its only safeguard is converting OutOfMemoryError into NotFoundException. Settings (DeviceAdminAdd.updateInterface and the DeviceAdminListItem constructor) and Car Settings (BaseEnterprisePreferenceController.getDescription and DeviceAdminAppsPreferenceController.createPreference) pass that unbounded CharSequence directly into TextView text and preference summaries. A device admin app that ships an excessively long description can therefore cause a denial of service (bulletin: DoS, High).
How the fix works
- 1. frameworks/base 8bbb435c9b25, core/java/android/content/pm/ComponentInfo.java: adds the hidden constant MAX_SAFE_DESCRIPTION_LENGTH = 1024 and a hidden method loadDescription(@NonNull PackageManager pm). The method requires a non-null pm. When descriptionRes != 0 it returns TextUtils.trimToSize(pm.getText(packageName, descriptionRes, applicationInfo), MAX_SAFE_DESCRIPTION_LENGTH). It converts OutOfMemoryError into NotFoundException, and throws NotFoundException when descriptionRes == 0, which matches the contract of the old DeviceAdminInfo.loadDescription. The remaining hunks only change whitespace.
- 2. frameworks/base 8bbb435c9b25, core/java/android/app/admin/DeviceAdminInfo.java: adds the hidden method loadDescriptionSafe(@NonNull PackageManager pm), which simply delegates to mActivityInfo.loadDescription(pm), the trimmed variant. The existing public loadDescription(pm) is unchanged.
- 3. packages/apps/Settings 8bdb3c884b6d: DeviceAdminAdd.updateInterface and the DeviceAdminListItem constructor now call loadDescriptionSafe(pm) instead of loadDescription(pm). DeviceAdminListItemTest mocks loadDescriptionSafe and verifies that loadDescription is never called.
- 4. packages/apps/Car/Settings f9b731471afb: BaseEnterprisePreferenceController.getDescription and DeviceAdminAppsPreferenceController.createPreference (preference.setSummary) now call loadDescriptionSafe(mPm). DeviceAdminAddHeaderPreferenceControllerTest is updated to match.
- The commit message of the base change says 8192 characters, but the code and the javadoc of loadDescriptionSafe use 1024 (MAX_SAFE_DESCRIPTION_LENGTH).
Completeness
- Covers the four Settings and Car Settings call sites shown in the diffs: DeviceAdminAdd.updateInterface, DeviceAdminListItem.<init>, BaseEnterprisePreferenceController.getDescription and DeviceAdminAppsPreferenceController.createPreference.
- The public DeviceAdminInfo.loadDescription(PackageManager) is untouched and still returns the untrimmed text (visible in the r19 context). Any other caller of that API is not bounded by this fix.
- The trim is applied after pm.getText() has already loaded the full resource string. The fix reduces only what is handed to the UI, not the cost of loading the string. OutOfMemoryError handling is the same as before.
- Only the description is bounded. loadLabel and the other resource loaders in the same classes are unchanged, and the material gives no evidence that they need bounding.
- DeviceAdminAppsPreferenceController.createPreference still calls loadDescriptionSafe twice (once through getDescription, once for setSummary). This is redundant but harmless.
Behavior changes
- Device admin descriptions longer than 1024 characters are truncated in the Settings device admin list, the add-device-admin screen and the Car Settings enterprise screens.
- Adds two @hide methods, ComponentInfo.loadDescription(PackageManager) and DeviceAdminInfo.loadDescriptionSafe(PackageManager), and the @hide constant ComponentInfo.MAX_SAFE_DESCRIPTION_LENGTH.
- ComponentInfo.loadDescription throws NullPointerException (Objects.requireNonNull) for a null PackageManager. The old DeviceAdminInfo.loadDescription had no explicit null check.
- No change for callers of the public DeviceAdminInfo.loadDescription API.
Per major
- Android 14: Resolved per bug_id at android-security-14.0.0_r29. The material shows only the Car/Settings change cb28e38fe137, whose blobs are identical to the 15 Car/Settings diff. 7 of 8 lines of the patched region are present at r31. No frameworks/base or Settings change for 14 is shown.
- Android 15: Three commits in android-security-15.0.0_r17: frameworks/base 8bbb435c9b25, packages/apps/Settings 8bdb3c884b6d and packages/apps/Car/Settings f9b731471afb. All 8 lines of the patched region are present at r19.
- Android 16: Same frameworks/base fix (a0bd9f4b3d53 in android-security-16.0.0_r8). The ComponentInfo hunk is identical to 15. The DeviceAdminInfo hunk has the same content at a different offset. All 8 lines are present at r10. Settings and Car Settings commits are not shown in the material.
- Android 17: Adapted frameworks/base fix (9644b7e34bb0 in android-security-17.0.0_r1) with the same logic. ComponentInfo already imports TextUtils and has FLAG_* constants, so the fix adds only the NonNull, NotFoundException and Objects imports plus the constant and method. All 8 lines are present at r3. Settings and Car Settings commits are not shown.
Unknowns
- The exact failure mode of the DoS (for example ANR, crash or OOM in Settings) is not shown. The commit says only 'potential issues with excessively long descriptions'.
- Why the commit message says 8192 while the code uses 1024.
- Whether frameworks/base and packages/apps/Settings changes exist on Android 14 (the Car/Settings change there calls loadDescriptionSafe, which suggests a framework change), and whether Settings and Car Settings changes exist on 16 and 17.
- Which line differs in the Android 14 Car/Settings region (7 of 8 lines present).
- Whether other callers of the public DeviceAdminInfo.loadDescription exist in the tree.