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

Commit 0e91977c authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Don't allow non-system uids to use "android" as calling package.

Bug: 310632322
Test: atest ./BroadcastsSecurityTest/src/android/app/cts/broadcasts/BroadcastRegistrationTest.java
Flag: EXEMPT bugfix
Change-Id: I3e08f85d8d6c5de119f024a518d499dcd86f6006
parent 5315c21b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -303,8 +303,7 @@ class BroadcastController {
                return null;
            }
            if (callerApp.info.uid != SYSTEM_UID
                    && !callerApp.getPkgList().containsKey(callerPackage)
                    && !"android".equals(callerPackage)) {
                    && !callerApp.getPkgList().containsKey(callerPackage)) {
                throw new SecurityException("Given caller package " + callerPackage
                        + " is not running in process " + callerApp);
            }