Revise the IllegalArgumentException check
Combining the two IllegalArgumentException check to mitigate the
potential information leakage.
Bug: 189858128
Test: atest ApplicationInfoTest
Test: manually using the PoC in the buganizer to ensure the symptom
no longer exists.
Change-Id: Ice6d90e2961bf58896c603df78b1493761f42ff0
This commit is contained in:
@@ -17097,10 +17097,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
callerPackageName);
|
||||
synchronized (mLock) {
|
||||
PackageSetting ps = mSettings.getPackageLPr(packageName);
|
||||
if (ps == null) {
|
||||
throw new IllegalArgumentException("Unknown target package " + packageName);
|
||||
}
|
||||
if (shouldFilterApplicationLocked(
|
||||
if (ps == null || shouldFilterApplicationLocked(
|
||||
ps, Binder.getCallingUid(), UserHandle.getCallingUserId())) {
|
||||
throw new IllegalArgumentException("Unknown target package " + packageName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user