Android gpg-agent crashes in libgcrypt when signing, decrypting, importing secret keys
jussi.kivilinna at iki.fi
Sun Jan 19 10:25:33 CET 2014
On 19.01.2014 06:08, Hans-Christoph Steiner wrote:
> On 01/18/2014 06:31 AM, Jussi Kivilinna wrote:
>> On 17.01.2014 20:34, Hans-Christoph Steiner wrote:
>>> On GPG for Android, I've updated to the latest libgcrypt in master (or close
>>> to it, its commit 4b7db51ad5d1bf98fd08ca3048f258059eca61a4). Now it seems
>>> that any operation that needs a passphrase is crashing somewhere in libgcrypt.
>>> I've tried building with auto-detection of CPU which enables Padlock, Intelt
>>> DRNG, and NEON. I also tried with --disable-padlock-support
>>> --disable-drng-support --disable-neon-support, and seemed to get the same thing.
>>> I've also tried running gpg-agent with and without --enable-ssh-support, and
>>> same result each time.
>>> Here's the basic backtrace:
>>> From the bug report in our tracker, you can download the complete build log, a
>>> debug log from the Android app, a log from gpg-agent, and a log from gpgme:
>> Have you configured gcc flags correctly for target platform? It seems that
>> compiler (and libgcrypt assembly) are configured to allow unaligned memory
>> accesses, but target does not support them.
>>  http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
> I forget if I mentioned this before: the build flags are set by the default
> Android build system.
> So I built the whole thing again, manually adding -mno-unaligned-access to the
> libgcrypt build, and the tests seem to be failing in the same place. I tested
> head of master on the armv7a emulator, which failed a lot more, and the head
> of LIBGCRYPT-1-6-BRANCH on the Nexus 7 ARMv7 tablet, which failed in the same
> places. Any pointers for next steps?
That's a bit strange. Do you have crash logs of these?
> FYI, I'm gathering all these log files on our bug tracker:
> Attached are the latest test logs, including the full build log for head of
> master running tests on the armv7a emulator.
More information about the Gnupg-devel