Crashes with gpg-agent 2.1.17

Patrick Brunschwig patrick at enigmail.net
Tue Jan 24 09:14:53 CET 2017


On 23.01.17 21:20, Daniel Kahn Gillmor wrote:
> On Mon 2017-01-23 09:04:53 -0500, Patrick Brunschwig wrote:
>> I got quite frequent crashes with gpg-agent on Mac OS X, and thus
>> started to investigate what happens.
>  [...]
>> gpg-agent[30807]: retrieving cache entry
>> 'E0935FE2D7829F0CA7580D98F58ECD6EF0A9DE25' failed: Cannot allocate memory
>> gpg-agent[30807]: DBG: agent_get_cache
>> 'E0935FE2D7829F0CA7580D98F58ECD6EF0A9DE25' (mode 2) (stored cache key) ...
>> gpg-agent[30807]: DBG: ... hit
>> gpg-agent[30807]: retrieving cache entry
>> 'E0935FE2D7829F0CA7580D98F58ECD6EF0A9DE25' failed: Cannot allocate memory
>> gpg-agent[30807]: failed to unprotect the secret key: Cannot allocate memory
>> gpg-agent[30807]: failed to read the secret key
>> gpg-agent[30807]: command 'PKDECRYPT' failed: Cannot allocate memory
>> gpg-agent[30807]: DBG: chan_19 -> ERR 67141718 Cannot allocate memory
>> <GPG Agent>
>> gpg-agent[30807]: DBG: chan_19 <- HAVEKEY
>> 06799B633E043A7665BBE85BDD883A71166B80B7
>> gpg-agent[30807]: DBG: chan_19 -> ERR 67108881 No secret key <GPG Agent>
>> gpg-agent[30807]: DBG: rsa_decrypt  res: [out of core]
>> gpg-agent[30807]: Ohhhh jeeee: ... this is a bug
>> (sexp.c:1433:do_vsexp_sscan)
>>
>> Is this a bug, or is it a config/setup error on my side?
> 
> What version of libgcrypt are you building against?  aiui, 1.7.4 and
> later include a pretty major overhaul of the secmem pool handling, which
> affects gpg-agent's ability to handle larger (or multiple) keys
> concurrently.  So if gnupg is built against newer versions of libgcrypt,
> maybe that would fix your issue?

I used libgcrypt 1.7.5.

Meanwhile I upgraded to gpg 2.1.18 and libgcrypt 1.7.6, and I still can
reproduce the issue:

gpg-agent[58725]: DBG: chan_38 -> OK
 3A 42 F2
gpg-agent[58725]: DBG: agent_get_cache
'E0935FE2D7829F0CA7580D98F58ECD6EF0A9DE25' (mode 2) ...
b7 5F
gpg-agent[58725]: DBG: agent_get_cache
'E0935FE2D7829F0CA7580D98F58ECD6EF0A9DE25' (mode 2) ...
 65 B6 42 42
gpg-agent[58725]: DBG: ... hit
 42 5A 29 5A19 42 D6
gpg-agent[58725]: DBG: ... hit
 A0 42 5A4d 42 42 F2 F294 61 5A D6
gpg-agent[58725]: DBG: ... hit
 E2
gpg-agent[58725]: DBG: ... hit
 C4 9Fb0 5A 5A 5A
gpg-agent[58725]: DBG: chan_38 <- HAVEKEY
E0935FE2D7829F0CA7580D98F58ECD6EF0A9DE25
 AA 29
gpg-agent[58725]: DBG: chan_39 -> OK Pleased to meet you
 AA82 5A 01 29 5A AAa8 5A 5A D6 D617 35 AA 01 D7 4C 32 AA AA AA BB79
 BB
gpg-agent[58725]: DBG: chan_38 -> OK
d4 AA 42 29 AA BB \
gpg-agent(58725,0x70000f710000) malloc: *** error for object
0x7f99f9703250: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

-Patrick




More information about the Gnupg-devel mailing list