commit | eda48f8f099aaf53c57ca7fbea3a0b8a1db025f1 | [log] [tgz] |
---|---|---|
author | Tianjie Xu <xunchang@google.com> | Fri Sep 07 15:24:58 2018 -0700 |
committer | Rohit Yengisetty <rngy@google.com> | Tue Oct 16 16:08:54 2018 -0700 |
tree | 7d962468955fc1d6d67f1e13a9020b9ed81c7f2b | |
parent | f1278966750d17e2be69ced79396cdd3ffab3e94 [diff] |
DO NOT MERGE: Initialize the ZipArchive to zero before parsing The fields of the ZipArchive on the stack are not initialized before we call libminzip to parse the zip file. As a result, some random memory location is freed unintentionally when we close the ZipArchive upon parsing failures. Bug: 35385357 Test: recompile and run the poc with asan. Change-Id: I7e7f8ab4816c84a158af7389e1a889f8fc65f079 (cherry picked from commit 2050579b79f495832ec8aa11655a809d87bfc8e3)
mm -j && m ramdisk-nodeps && m recoveryimage-nodeps # To boot into the new recovery image # without flashing the recovery partition: adb reboot bootloader fastboot boot $ANDROID_PRODUCT_OUT/recovery.img
# After setting up environment and lunch. mmma -j bootable/recovery # Running the tests on device. adb root adb sync data # 32-bit device adb shell /data/nativetest/recovery_unit_test/recovery_unit_test adb shell /data/nativetest/recovery_component_test/recovery_component_test # Or 64-bit device adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test adb shell /data/nativetest64/recovery_component_test/recovery_component_test