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

Unverified Commit 4bb2fcc8 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-13.0.0_r22' into staging/lineage-20.0_android-security-13.0.0_r22

Android Security 13.0.0 Release 22 (12199512)

* tag 'android-security-13.0.0_r22':
  [RESTRICT AUTOMERGE] Check whether installerPackageName contains only valid characters
  Prevent Sharing when FRP enforcement is in effect
  Update AccountManagerService checkKeyIntent.
  Fail parseUri if end is missing

Change-Id: Iccd749146efb9d31b6f4caba8817f07038dffe4f
parents 372c4384 47a983c5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7656,6 +7656,9 @@ public class Intent implements Parcelable, Cloneable {
                int eq = uri.indexOf('=', i);
                if (eq < 0) eq = i-1;
                int semi = uri.indexOf(';', i);
                if (semi < 0) {
                    throw new URISyntaxException(uri, "uri end not found");
                }
                String value = eq < semi ? Uri.decode(uri.substring(eq + 1, semi)) : "";

                // action
+8 −0
Original line number Diff line number Diff line
@@ -542,6 +542,14 @@ public class ChooserActivity extends ResolverActivity implements

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        if (Settings.Secure.getIntForUser(getContentResolver(),
                Settings.Secure.SECURE_FRP_MODE, 0,
                getUserId()) == 1) {
            Log.e(TAG, "Sharing disabled due to active FRP lock.");
            super.onCreate(savedInstanceState);
            finish();
            return;
        }
        final long intentReceivedTime = System.currentTimeMillis();
        mLatencyTracker.onActionStart(ACTION_LOAD_SHARE_SHEET);

+3 −0
Original line number Diff line number Diff line
@@ -4907,6 +4907,9 @@ public class AccountManagerService
                if (resolveInfo == null) {
                    return false;
                }
                if ("content".equals(intent.getScheme())) {
                    return false;
                }
                ActivityInfo targetActivityInfo = resolveInfo.activityInfo;
                int targetUid = targetActivityInfo.applicationInfo.uid;
                PackageManagerInternal pmi = LocalServices.getService(PackageManagerInternal.class);
+7 −2
Original line number Diff line number Diff line
@@ -640,13 +640,18 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
        params.appLabel = TextUtils.trimToSize(params.appLabel,
                PackageItemInfo.MAX_SAFE_LABEL_LENGTH);

        // Validate installer package name.
        // Validate requested installer package name.
        if (params.installerPackageName != null && !isValidPackageName(
                params.installerPackageName)) {
            params.installerPackageName = null;
        }

        var requestedInstallerPackageName =
        // Validate installer package name.
        if (installerPackageName != null && !isValidPackageName(installerPackageName)) {
            installerPackageName = null;
        }

        String requestedInstallerPackageName =
                params.installerPackageName != null ? params.installerPackageName
                        : installerPackageName;