summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2024-10-02 18:37:18 +0000
committer Steven Moreland <smoreland@google.com> 2024-10-02 18:38:10 +0000
commit3b685aa34bc16feec26a5f0cdfcd64f01c8cf4cc (patch)
tree5c204424eac043a00fd0091a9e24edc0910e482b /libs
parentff7e4543c2a715cf0931f8bf95bbaaf6a6ad221e (diff)
libbinder: better object logs
Separate patch, b/c won't be backported Bug: 370840874 Test: N/A Ignore-AOSP-First: security related Change-Id: Iefc49398bab70e7255346dd4a0375b11edc1c159
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/Parcel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 37113629a8..734b4b6129 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -180,7 +180,7 @@ static void acquire_object(const sp<ProcessState>& proc, const flat_binder_objec
}
}
- ALOGD("Invalid object type 0x%08x", obj.hdr.type);
+ ALOGE("Invalid object type 0x%08x to acquire", obj.hdr.type);
}
static void release_object(const sp<ProcessState>& proc, const flat_binder_object& obj,
@@ -210,7 +210,7 @@ static void release_object(const sp<ProcessState>& proc, const flat_binder_objec
}
}
- ALOGE("Invalid object type 0x%08x", obj.hdr.type);
+ ALOGE("Invalid object type 0x%08x to release", obj.hdr.type);
}
#endif // BINDER_WITH_KERNEL_IPC
@@ -1874,7 +1874,10 @@ status_t Parcel::validateReadData(size_t upperBound) const
if (mDataPos < kernelFields->mObjects[nextObject] + sizeof(flat_binder_object)) {
// Requested info overlaps with an object
if (!mServiceFuzzing) {
- ALOGE("Attempt to read from protected data in Parcel %p", this);
+ ALOGE("Attempt to read or write from protected data in Parcel %p. pos: "
+ "%zu, nextObject: %zu, object offset: %llu, object size: %zu",
+ this, mDataPos, nextObject, kernelFields->mObjects[nextObject],
+ sizeof(flat_binder_object));
}
return PERMISSION_DENIED;
}