Android gpg-agent crashes in libgcrypt when signing, decrypting, importing secret keys
Jussi Kivilinna
jussi.kivilinna at iki.fi
Sat Jan 25 11:18:21 CET 2014
On 24.01.2014 19:08, Hans-Christoph Steiner wrote:
>
>
> On 01/20/2014 10:39 AM, Hans-Christoph Steiner wrote:
>>
>>
>> On 01/19/2014 04:25 AM, Jussi Kivilinna wrote:
>>> 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:
>>>>> <..snip..>
>>>>>> 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:
>>>>>>
>>>>>> https://dev.guardianproject.info/issues/2888
>>>>>
>>>>> 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.
>>>>>
>>> <...snip...>
>>>>> -Jussi
>>>>>
>>>>> [1] 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?
>>>
>>> -Jussi
>>
>> The crash log is here:
>>
>> https://dev.guardianproject.info/attachments/download/1130/gpg-agent-libgcrypt-mno-unaligned-access-crash-log.txt
>>
>> If you want to try running it on an Android device
>> or emulator, you can find a recent build here, but one what does not have
>> -mno-unaligned-access manually set:
>>
>> https://guardianproject.info/builds/GnuPrivacyGuard/
>>
>> .hc
>
>
> Hey,
>
> Just checking in on this. This is the last blocker before we can push our big
> new release of Gnu Privacy Guard for Android. Unfortunately, our current
> funding for the GPG work ended in December. But I'm going to keep tabs on this
> in my spare time, and do what I can to help get to the bottom of this.
Sorry for not checking the new logs and answering sooner. I did plan to do so,
but didn't quite find the time until now.
-Jussi
>
> I've never really worked in assembly, so there's not much I can do in terms of
> fixing that code.
>
> .hc
>
>
>
>
>
>
>
>
>
>
>
>
>>>> FYI, I'm gathering all these log files on our bug tracker:
>>>> https://dev.guardianproject.info/issues/2888
>>>>
>>>> Attached are the latest test logs, including the full build log for head of
>>>> master running tests on the armv7a emulator.
>>>>
>>>> .hc
>>>>
>>>>
>>>
>>
>
More information about the Gnupg-devel
mailing list