diff options
| author | 2023-06-30 02:51:42 +0000 | |
|---|---|---|
| committer | 2023-06-30 02:51:42 +0000 | |
| commit | 288a184e66fd82df9ca1ff8a0e7d82866eb348d4 (patch) | |
| tree | 9a7ee3b34addb0659cd0c1564db585caa11090ff | |
| parent | 1d568e3d6cddd181e8c0b7d685890e0a40f7b570 (diff) | |
| parent | be2bf570bc491b99eff3dfb14361f6c8ce34566c (diff) | |
Merge "libbinder fuzzer driver: clear calling identity" am: be2bf570bc
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2645989
Change-Id: I61ae767b17fcaa189223838a6b51cd88bd824621
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp b/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp index 9078676031..45c3a90044 100644 --- a/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp +++ b/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp @@ -33,6 +33,10 @@ void fuzzService(const std::vector<sp<IBinder>>& binders, FuzzedDataProvider&& p .extraFds = {}, }; + // always refresh the calling identity, because we sometimes set it below, but also, + // the code we're fuzzing might reset it + IPCThreadState::self()->clearCallingIdentity(); + // Always take so that a perturbation of just the one ConsumeBool byte will always // take the same path, but with a different UID. Without this, the fuzzer needs to // guess both the change in value and the shift at the same time. |