Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e98f267 authored by Rhed Jao's avatar Rhed Jao
Browse files

[DO NOT MERGE] Fix permanent denial of service via setComponentEnabledSetting

Do not update invalid component enabled settings to prevent the
malicious apps from exhausting system server memory.

Bug: 240936919
Test: atest android.security.cts.PackageManagerTest
Change-Id: I08165337895e89f13a2b9fcce1201cba9ad13d7d
parent d6670385
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -21116,6 +21116,9 @@ public class PackageManagerService extends IPackageManager.Stub
                    } else {
                        Slog.w(TAG, "Failed setComponentEnabledSetting: component class "
                                + className + " does not exist in " + packageName);
                        // Safetynet logging for b/240936919
                        EventLog.writeEvent(0x534e4554, "240936919", callingUid);
                        return;
                    }
                }
                switch (newState) {