facebookarchive / conceal

Conceal provides easy Android APIs for performing fast encryption and authentication of data.
http://facebook.github.io/conceal/
Other
2.96k stars 431 forks source link

Fatal signal 11 (SIGSEGV), code 2 upon file decryption. #207

Open tuancoltech opened 4 years ago

tuancoltech commented 4 years ago

I just integrated Conceal into my app, and run for the first time. However, the app crashes right away when getting cipher input stream from file, using:

InputStream encryptedInputStream = crypto.getCipherInputStream( fileStream, Entity.create(file.getAbsolutePath()));

The back-trace is as below:

2019-10-06 22:52:39.798 23324-23472/one.anom.ent A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xdeadb00c in tid 23472 (pool-6-thread-7), pid 23324 (one.anom.ent) 22:52:39.947 23668-23668/? A/DEBUG: 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: Build fingerprint: 'samsung/on7xeltedd/on7xelte:8.1.0/M1AJQ/G610FDXU1CRL2:user/release-keys' 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: Revision: '3' 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: ABI: 'arm' 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: pid: 23324, tid: 23472, name: pool-6-thread-7 >>> one.anom.ent <<< 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xdeadb00c 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: r0 0000006d r1 00000000 r2 00000000 r3 deadb00c 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: r4 c679a098 r5 c4e150a4 r6 c4e150a0 r7 ecba9218 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: r8 c4e150a4 r9 cb0fd000 sl c4e151f8 fp c4e15184 2019-10-06 22:52:39.948 23668-23668/? A/DEBUG: ip c4e13f78 sp c4e15050 lr c6760e6b pc c6760e6e cpsr 600f0030 2019-10-06 22:52:39.950 23668-23668/? A/DEBUG: backtrace: 2019-10-06 22:52:39.950 23668-23668/? A/DEBUG: #00 pc 00009e6e /data/app/one.anom.ent-Nk8SIDnf1bTYiJeunz_y-Q==/lib/arm/libfb.so (facebook::assertInternal(char const*, ...)+69) 2019-10-06 22:52:39.950 23668-23668/? A/DEBUG: #01 pc 0000b6df /data/app/one.anom.ent-Nk8SIDnf1bTYiJeunz_y-Q==/lib/arm/libfb.so (facebook::jni::getJavaExceptionForCppException(std::__exception_ptr::exception_ptr)+42) 2019-10-06 22:52:39.950 23668-23668/? A/DEBUG: #02 pc 0000b77f /data/app/one.anom.ent-Nk8SIDnf1bTYiJeunz_y-Q==/lib/arm/libfb.so (facebook::jni::translatePendingCppExceptionToJavaException()+26) 2019-10-06 22:52:39.950 23668-23668/? A/DEBUG: #03 pc 0000dcdd /data/app/one.anom.ent-Nk8SIDnf1bTYiJeunz_y-Q==/lib/arm/libconcealjni.so 2019-10-06 22:52:39.950 23668-23668/? A/DEBUG: #04 pc 0006dcad /data/app/one.anom.ent-Nk8SIDnf1bTYiJeunz_y-Q==/oat/arm/base.odex (offset 0x6c000)

So please take a look at this crash. Thanks.

Device: Samsung Galaxy J7 Prime (G610F) Android version: 8.1.0