Skip to content
Snippets Groups Projects
Commit a17065fc authored by Santiago Seifert's avatar Santiago Seifert Committed by Automerger Merge Worker
Browse files

Merge "Revert^2 "Revert "Fix vulnerability in AttributionSource due to in...""...

Merge "Revert^2 "Revert "Fix vulnerability in AttributionSource due to in..."" into tm-dev am: d42b60e9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/26057828



Change-Id: I9ca5613a19482cd290a0d143a8a0393c9548243d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 818e5f38 d42b60e9
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment