Revert "Fix vulnerability in AttributionSource due to incorrect ..."
Revert submission 21778925-tm-dev-2-attribution-source Reason for revert: b/272115855 Reverted changes: /q/submissionid:21778925-tm-dev-2-attribution-source Bug: 272115855 Change-Id: Ia3d101bab6613da6515acc87af9295da664827cf
This commit is contained in:
committed by
Android (Google) Code Review
parent
7cb165f1c0
commit
5f3a3f2a4b
@@ -31,7 +31,6 @@ import android.os.Parcelable;
|
||||
import android.os.Process;
|
||||
import android.permission.PermissionManager;
|
||||
import android.util.ArraySet;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.Immutable;
|
||||
|
||||
@@ -88,8 +87,6 @@ import java.util.Set;
|
||||
*/
|
||||
@Immutable
|
||||
public final class AttributionSource implements Parcelable {
|
||||
private static final String TAG = "AttributionSource";
|
||||
|
||||
private static final String DESCRIPTOR = "android.content.AttributionSource";
|
||||
|
||||
private static final Binder sDefaultToken = new Binder(DESCRIPTOR);
|
||||
@@ -157,20 +154,9 @@ public final class AttributionSource implements Parcelable {
|
||||
AttributionSource(@NonNull Parcel in) {
|
||||
this(AttributionSourceState.CREATOR.createFromParcel(in));
|
||||
|
||||
if (!Binder.isDirectlyHandlingTransaction()) {
|
||||
Log.e(TAG, "Unable to verify calling UID #" + mAttributionSourceState.uid + " PID #"
|
||||
+ mAttributionSourceState.pid + " when not handling Binder transaction; "
|
||||
+ "clearing.");
|
||||
mAttributionSourceState.pid = -1;
|
||||
mAttributionSourceState.uid = -1;
|
||||
mAttributionSourceState.packageName = null;
|
||||
mAttributionSourceState.attributionTag = null;
|
||||
mAttributionSourceState.next = null;
|
||||
} else {
|
||||
// Since we just unpacked this object as part of it transiting a Binder
|
||||
// call, this is the perfect time to enforce that its UID and PID can be trusted
|
||||
enforceCallingUidAndPid();
|
||||
}
|
||||
// Since we just unpacked this object as part of it transiting a Binder
|
||||
// call, this is the perfect time to enforce that its UID and PID can be trusted
|
||||
enforceCallingUidAndPid();
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
|
||||
Reference in New Issue
Block a user