Exploit database

GH-5f8101aebf9f68f19f227a3c3c95b21b

satheesh575555/packages_apps_settings_aosp10_r33_cve-2020-0416

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-0416

2 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files13

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/com/android/settings/vpn2/AppVpnInfo.java

Java · 1,179 bytes
package com.android.settings.vpn2;

import android.annotation.NonNull;

import com.android.internal.util.Preconditions;

import java.util.Objects;

/**
 * Holds packageName:userId pairs without any heavyweight fields.
 * {@see ApplicationInfo}
 */
class AppVpnInfo implements Comparable {
    public final int userId;
    public final String packageName;

    public AppVpnInfo(int userId, @NonNull String packageName) {
        this.userId = userId;
        this.packageName = Preconditions.checkNotNull(packageName);
    }

    @Override
    public int compareTo(Object other) {
        AppVpnInfo that = (AppVpnInfo) other;

        int result = packageName.compareTo(that.packageName);
        if (result == 0) {
            result = that.userId - userId;
        }
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other instanceof AppVpnInfo) {
            AppVpnInfo that = (AppVpnInfo) other;
            return userId == that.userId && Objects.equals(packageName, that.packageName);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(packageName, userId);
    }
}