Android security tags, read closely by Lightrion

CVE-2024-40657 AI-generated analysis

platform/packages/apps/Settings, accounts (AccountTypePreferenceLoader)

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 (5 corrections). Verify against the commit before relying on it.

Settings' AccountTypePreferenceLoader now neutralizes clicks on any preference inflated from an external account authenticator's accountPreferences XML whose android:fragment is not already present in the host preference group, so that external apps cannot have Settings open its internal fragments.

Root cause

AccountTypePreferenceLoader takes the preference XML that an account authenticator references through desc.accountPreferencesId (a resource owned by the external authenticator package) and inflates it into a Settings PreferenceFragmentCompat with mFragment.getPreferenceManager().inflateFromResource(themedCtx, desc.accountPreferencesId, parent). Before this fix, nothing checked the android:fragment attribute of the inflated preferences. A preference supplied by the external app could therefore name a fragment class that would open inside Settings when tapped, giving external applications access to internal Settings fragments (per the commit comment).

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2024 · Findings