Page MenuHome GnuPG
Feed Advanced Search

Dec 7 2016

werner removed a project from T2857: gpg-agent crashes regularly, out of core in secure memory allocations: In Progress.
Dec 7 2016, 5:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Backported to LIBGCRYPT-1-7-BRANCH

Dec 7 2016, 5:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I have now pushed a change to Libgcrypt master to implement auto-extending of
secre memory pools. Commit b6870cf but there are two cother commits which this
is based upon. My test shows that I can now decrypt a message encrypted to the
test-hugekey.key.

I will port this back to Libgcrypt 1.7.

Dec 7 2016, 5:07 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
gniibe added a comment to T2860: Yubikey Sucessfully detected by Win7 but gpg --card-status fails.

Which version of GnuPG are you using? Do you have scdaemon?

Dec 7 2016, 9:38 AM · Bug Report, Windows 64, scd, Windows, gnupg, Windows 32
gniibe claimed T2860: Yubikey Sucessfully detected by Win7 but gpg --card-status fails.
Dec 7 2016, 9:38 AM · Bug Report, Windows 64, scd, Windows, gnupg, Windows 32

Dec 6 2016

werner added a project to T2857: gpg-agent crashes regularly, out of core in secure memory allocations: In Progress.
Dec 6 2016, 5:50 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I will try out the idea of extending the secmem pool even if that means no mlock.

Dec 6 2016, 5:50 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

ah right, "ulimit -l" says 64 (kbytes) on my Linux system as well. According to
mlock(2) that's since kernel 2.6.9.

So i think it's worth adopting the supplied patch as a workaround at least (i
can confirm that it resolves the specific use case described in T2857 (dkg on Dec 05 2016, 05:47 PM / Roundup)), and i
agree with you that we should extend libgcrypt to extend secure memory allocation.

it's not clear to me that swap is outside the trust boundary anyway these days,
and modern systems should prefer encrypted swap where possible.

Dec 6 2016, 5:49 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

The secmem has two goals:

  • Avoid swapping out tehse pages. Thus the mlock.
  • Making sure that on free the memory is zeroized.

mlock requires root privileges and thus a special init sequence is required
(install as setuid(root) and gpg-agent drops the privileges direct after
allocating and mlocking the secmem). In the old times, and probably still today
on non-Linux platforms, this is still required. However, Linux turned to
allowing any process to mlock a certain amount (64k on my box).

I tend to suggest that we extend Libgcrypt to extend the secure memory
allocation by not using mlocked memory but keeping the the seroization feature.
The second option from T2857 (wk on Dec 05 2016, 07:11 PM / Roundup).

Dec 6 2016, 5:38 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

is the only goal of the secure memory to keep the RAM from being written to
swap, or are there other goals of secure memory? why is it unlikely that a new
block of memory can be mlock'd? what are the consequences of the new block not
being mlock'd? will it still be treated as secure memory?

crashing in the event that we run out of secure memory is simply not acceptable
these days, especially in a model where we have persistent long-term daemons
that people expect to remain running.

Dec 6 2016, 5:18 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I just posted 0001-agent-Respect-enable-large-secmem.patch to gnupg-devel:

https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032285.html

Dec 6 2016, 5:12 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

D400: 927_0001-agent-Respect-enable-large-secmem.patch

Dec 6 2016, 5:12 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
neal added a comment to T2853: Signature Verification returning 'gpg: DBG: tofu.c:2772: strtoul failed for DB returned string (tail=): Invalid argument'.

Thanks! I tried reproducing this issue with your tofu.db (using HEAD), but I
didn't see the warning:

$ gpg --verify /tmp/TrueTimeStamp-certificate-4793.txt
gpg: Signature made Thu 24 Nov 2016 08:08:29 AM CET
gpg: using DSA key 6F3B2E6AB748A8F8
gpg: Good signature from "TrueTimeStamp <signing-department@TrueTimeStamp.org>"
[marginal]
gpg: signing-department@truetimestamp.org: Verified 2 signatures in the past

12 days.  Encrypted 0 messages.

gpg: Warning: you have yet to encrypt a message to this key!
gpg: Warning: if you think you've seen more signatures by this key and user

id, then this key might be a forgery!  Carefully examine the email address
for small variations.  If the key is suspect, then use
  gpg --tofu-policy bad 83289060F40DED088CF246B56F3B2E6AB748A8F8
to mark it as being bad.

gpg: WARNING: This key is not certified with sufficiently trusted signatures!
gpg: It is not certain that the signature belongs to the owner.
Primary key fingerprint: 8328 9060 F40D ED08 8CF2 46B5 6F3B 2E6A B748 A8F8

Most likely, this is because when you verifies the message, the error was fixed.
Can you confirm this for me by trying to reproduce the error with your current
tofu.db? If there is no error, could you send me a copy of the tofu.db from
before the initial verification?

Thanks!

Dec 6 2016, 1:20 PM · Bug Report, gnupg
justus closed T2864: Assertion failure when calling gpg --export-ssh-key as Resolved.
Dec 6 2016, 12:36 PM · Bug Report, gnupg
justus claimed T2864: Assertion failure when calling gpg --export-ssh-key.
Dec 6 2016, 12:36 PM · Bug Report, gnupg
justus added a comment to T2864: Assertion failure when calling gpg --export-ssh-key.

Already fixed in 4db9a425644dccaf81b51ebc97b32a9cc21941a4. Duplicate of T2848.

Dec 6 2016, 12:36 PM · Bug Report, gnupg
Domo added projects to T2864: Assertion failure when calling gpg --export-ssh-key: gnupg, Bug Report.
Dec 6 2016, 6:09 AM · Bug Report, gnupg

Dec 5 2016

dkg added a comment to T2863: gpg --export-ssh-key dies with "ohhhh jeeee".

This is a duplicate of bug 2848

Dec 5 2016, 9:28 PM · Bug Report, gnupg
dkg closed T2863: gpg --export-ssh-key dies with "ohhhh jeeee" as Resolved.
Dec 5 2016, 9:28 PM · Bug Report, gnupg
dkg set Version to 2.1.16 on T2863: gpg --export-ssh-key dies with "ohhhh jeeee".
Dec 5 2016, 7:54 PM · Bug Report, gnupg
dkg added projects to T2863: gpg --export-ssh-key dies with "ohhhh jeeee": gnupg, Bug Report.
Dec 5 2016, 7:54 PM · Bug Report, gnupg
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Yeah, I saw the Debian bug report. Unfortunately there is no easy
solution to this except for rejecting the use of large secret keys.

The problem here is that the big number library needs to allocate from
a limited secure memory region (32 KiB by default) and terminates on
allocation failure. I know that this is sub-optimal but we are doing
this for 19 years now. Checking for an error after each low-level big
number operation would make the code unreadable and will introduce
bugs. Ideas on what to do:

  • On secure memory allocation failure, call the out-of-memory handler which may then free other memory (or purchase new memory). This can be done in the application.
  • On secure memory allocation failure, allocate a new block of secure memory and allocate from that one. There are two disadvantages: a) It is unlikely that the new block can be mlock'd. b) A free will be a a little bit slower because it needs to check the list of secure memory blocks and not just one address range. The address range check is needed so that we can figure out whether the freed address is in the secmem range and needs to zeroed out. This requires a new Libgcrypt version, though no ABI change.
  • We have a ./configure option --enable-large-secmem which sets 64k instead of 32k aside for the secmem. This is currently only used in gpg to enable gpg's --enable-large-rsa option. Given that in 2.1 we use the gpg-agent for the secret key operations we should have the same options in gpg-agent. However, it is only a kludge, but one we once agreed upon to silence some pretty vocal experts on key size.
Dec 5 2016, 7:11 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a project to T2857: gpg-agent crashes regularly, out of core in secure memory allocations: gnupg (gpg22).
Dec 5 2016, 7:11 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
Dr_IT added a comment to T2861: GpgOL: Problem decrypting inline image.

I just tried with latest gpgol (beta 204) and it now seems to work. So bug is
solved already! :)

Dec 5 2016, 6:52 PM · Unreleased, Bug Report, gpgol
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

fwiw, i'm seeing this too, over at https://bugs.debian.org/846953 , for a user
with an insanely large (10240-bit) RSA key when it is locked with a passphrase.

I'm attaching such an example secret key (with passphrase "abc123"), and you can
trigger the crash with:

gpg --batch --yes --import test-hugekey.key
echo test | gpg -r 861A97D02D4EE690A125DCC156CC9789743D4A89

--encrypt --armor --trust-model=always --batch --yes --output data.gpg

            gpg --decrypt data.gpg

While i think it's fair to say that we need to have some limits on the sizes of
keys we can handle, gpg-agent should not crash when asked to deal with
extra-large keys, it should fail gracefully and return a sensible error code.

Dec 5 2016, 5:47 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Dec 5 2016, 5:47 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2400: GnuPG 2.1 regression in unattended key generation.

The only viable solution will be to export the key secret key after key
generation, append that to the %secring given file and delete the key from
gpg-agent's store. Recall that the agent needs to know the secret key so that
gpg is abale to create the self-signatures. Adding a dedicated cache for this
would complicate the gpg-agent code a lot.

Dec 5 2016, 9:24 AM · gnupg (gpg22), Bug Report, gnupg

Dec 4 2016

archange added a comment to T2177: pinentry: Passphrase not recognized in Thunderbird/Enigmail.

Little update with latest 1.0.0 release:

– nothing new regarding pinentry-gnome3, still working nicely;
– nothing new regarding pinentry-gtk-2, but I know why it doesn’t take into
account my dead keys anymore and it’s not an issue on pinentry side;
– thanks to the new “show passphrase” button, I’ve been able to figure where the
issue lies with pinentry-qt: while invoked in the terminal, it does take into
account my dead keys, but while invoked via Thunderbird/Enigmail, it does not
(altought pinentry-gnome3 does).

So I suppose this is in fact an issue with Enigmail… Any hints on what they
could be doing wrong so that I can report this to them?

Dec 4 2016, 11:03 AM · FAQ, Bug Report, pinentry
archange changed Version from 0.9.7 to 1.0.0 on T2177: pinentry: Passphrase not recognized in Thunderbird/Enigmail.
Dec 4 2016, 11:03 AM · FAQ, Bug Report, pinentry
jcross added a comment to T1048: link to "Gnupg-commits Archives" broken.

It's been a year since last update. Still an issue. Maybe someone should send
an email to gnupg-commits-owner@gnupg.org ?

Dec 4 2016, 2:13 AM · Bug Report, gpgweb

Dec 2 2016

grempe added a comment to T2853: Signature Verification returning 'gpg: DBG: tofu.c:2772: strtoul failed for DB returned string (tail=): Invalid argument'.

tofu.db sent via encrypted email today.

Dec 2 2016, 7:46 PM · Bug Report, gnupg
Dr_IT added a comment to T2861: GpgOL: Problem decrypting inline image.

Dec 2 2016, 11:34 AM · Unreleased, Bug Report, gpgol
Dr_IT added projects to T2861: GpgOL: Problem decrypting inline image: gpgol, Bug Report.
Dec 2 2016, 11:34 AM · Unreleased, Bug Report, gpgol
neal added a comment to T2812: TOFU very slow on Windows.

In general, parallel operations aren't great, but I find that such bad
performance surprising.

If you update a key, only that key's effective policy is rechecked, not all
keys. But, the effective policy of conflicting keys is always rechecked.

Dec 2 2016, 11:22 AM · Stalled, Bug Report, gnupg, Windows 32, TOFU, Windows
aheinecke added a comment to T2859: TOFU not affected by Key deletion.

Hi,

I think that your assumption is that the local keyring is somehow trusted. In

that case, I think it make sense that deleted keys would clear conflicts.

No, not really I don't think trust plays a role here. It's just a way I think
users may resolve conflicts when they don't know about policies or how things
work internally.

I'm curious when you think people delete keys. My intuition is that it is not

a very common pattern. Do you have any thoughts on this?

As an example: You get a new lock in your front door. Would you remove the key
for the old lock from your keyring or would you paint the old one red as a
marker not to use the old key.

I know that this is not totally applicable because the old key can still be used
for verification etc. But I think that this is the intuitive behavior if a key
changes.

Maybe if GUI offers conflict resolution better this might not be such a big deal
but currently (Kleopatra does not yet have conflict resolution) but for me
during tofu testing I thought I could resolve a the conflict by deleting one of
the keys and found the behavior unexpected.

I encourage you to first try and find a consensus before implementing a

different policy at the higher level.

Indeed. Let's try :-)

Dec 2 2016, 10:51 AM · Stalled, Bug Report, gnupg
neal added a comment to T2859: TOFU not affected by Key deletion.

No need to apologize for the dup; I was just noting it here for the record.

I think that your assumption is that the local keyring is somehow trusted. In
that case, I think it make sense that deleted keys would clear conflicts.

I'm curious when you think people delete keys. My intuition is that it is not a
very common pattern. Do you have any thoughts on this?

I encourage you to first try and find a consensus before implementing a
different policy at the higher level.

Dec 2 2016, 10:29 AM · Stalled, Bug Report, gnupg
aheinecke added a comment to T2859: TOFU not affected by Key deletion.

Sorry for the duplicated bug. Although the other issue is older I got more
response here so I keep the discussion here.

In my Optionion it's completely natural for a User to think (I thought this):

  • Oh I have two keys that are in conflict: I'll delete the bad one then I don't

have a conflict anymore.

This is very intuitive behavior.

I'm not looking for a solution that works for me but for a solution that I think
would work for other users.

So for me your response ("what you should do") would mean that in Kleopatra on
Key deletion I would need to check for conflicting keys and change their policy
to auto again. Maybe even mark the deleted key as bad before deletion. I would
much prefer it if GnuPG handled this. For me it seems just like an unhandled
state as the error messages also indicate. "Key not found" etc so It's a bug or
maybe missing feature / functionality.

Fwiw I don't see how this can be consistent with WoT behavior as I don't think
WoT has a comparable problem. Can you explain what a comparable problem in WoT is?

If you meant hat the validity of all keys is not updated immediately after key
deletion, and you had some ownertrust to the deleted key ok yes thats probably
also another issue. :-)

Dec 2 2016, 10:21 AM · Stalled, Bug Report, gnupg
werner closed T2742: tofu confused when keys are deleted from keyring as Resolved.
Dec 2 2016, 10:04 AM · Duplicate, TOFU, Bug Report, gnupg
werner added a comment to T2742: tofu confused when keys are deleted from keyring.

Duplicate of T2859

Dec 2 2016, 10:04 AM · Duplicate, TOFU, Bug Report, gnupg
werner added a project to T2742: tofu confused when keys are deleted from keyring: Duplicate.
Dec 2 2016, 10:04 AM · Duplicate, TOFU, Bug Report, gnupg
neal added a comment to T2853: Signature Verification returning 'gpg: DBG: tofu.c:2772: strtoul failed for DB returned string (tail=): Invalid argument'.

Thanks for reporting this! Unfortunately, I'm not able to reproduce this. I
hope you can help me figure out what is wrong. Would you be willing to share
your tofu.db with me? Feel free to send it to me directly
(8F17777118A33DDA9BA48E62AACB3243630052D9); it contains some privacy sensitive
information (namely, who you communicate with).

Thanks!

Dec 2 2016, 9:53 AM · Bug Report, gnupg
neal added a comment to T2742: tofu confused when keys are deleted from keyring.

This issue has also been reported in https://bugs.gnupg.org/gnupg/Issue2859

Werner replied there and I agree with his conclusion.

Dec 2 2016, 9:40 AM · Duplicate, TOFU, Bug Report, gnupg
neal added a comment to T2859: TOFU not affected by Key deletion.

Note: this is a dup of T2742

I tend to agree with Werner: if we discover a conflict, it needs to be resolved
and deleting a key is not a sufficient resolution.

Dec 2 2016, 9:39 AM · Stalled, Bug Report, gnupg
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Another user reported the same problem on IRC. It seems it is Arch Linux
specific but we don't known for sure. The latest test with re-building
Libgcrypt w/o any special options didn't changed anything.

I need top be able to replicate the problem before I can come up with a solution.

Dec 2 2016, 9:15 AM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2859: TOFU not affected by Key deletion.

That is consistent with the WoT behaviour. Deleting a key is no solution to a
faked key. It might be re-imported as any time.

What you should do instead is to disable the key so that it won't be used again.

Dec 2 2016, 9:12 AM · Stalled, Bug Report, gnupg
yeti added projects to T2860: Yubikey Sucessfully detected by Win7 but gpg --card-status fails: Windows 32, gnupg, Windows, scd, Windows 64, Bug Report.
Dec 2 2016, 12:17 AM · Bug Report, Windows 64, scd, Windows, gnupg, Windows 32

Dec 1 2016

aheinecke added projects to T2859: TOFU not affected by Key deletion: gnupg, Bug Report.
Dec 1 2016, 4:24 PM · Stalled, Bug Report, gnupg
aheinecke added a comment to T2812: TOFU very slow on Windows.

While testing with tofu enabled I sometimes see that some actions take very
long. (>1minute)

Like importing a key in Kleopatra where Kleopatra does an import and starts a
keylist afterwards / in parallel.

I'll try to reproduce this on the command line. Just doing a simple import on
the command line is quick.

Do you have any hint what can take so long?
Like a trigger that would cause a rechecks for cross signatures?

Dec 1 2016, 1:23 PM · Stalled, Bug Report, gnupg, Windows 32, TOFU, Windows
aheinecke removed a project from T2812: TOFU very slow on Windows: Restricted Project.
Dec 1 2016, 1:23 PM · Stalled, Bug Report, gnupg, Windows 32, TOFU, Windows
werner added a project to T2829: dirmngr: Timeouts are too long: gnupg.
Dec 1 2016, 10:39 AM · gnupg, Bug Report, dirmngr
werner added a project to T2836: dirmngr: wakes up periodically: gnupg.
Dec 1 2016, 10:39 AM · gnupg, gnupg (gpg23), Bug Report, dirmngr
werner added a project to T2438: dirmngr fails repeatedly with "invalid argument", without kicking the host from its list: gnupg.
Dec 1 2016, 10:39 AM · gnupg, Bug Report, dirmngr
werner added a project to T2745: gpg 2.1.15, *no* keyservers found for submit/recv, "DNS query returned an error or no records: No such domain (nxdomain)": gnupg.
Dec 1 2016, 10:38 AM · gnupg, Bug Report, dirmngr
werner added a project to T2827: dirmngr should mark hkps hosts as dead on TLS failures: gnupg.
Dec 1 2016, 10:38 AM · gnupg, Bug Report, dirmngr
werner added a project to T2740: dirmngr fails (and gets stuck failing) when network changes: gnupg.
Dec 1 2016, 10:37 AM · Too Old, gnupg, Bug Report, dirmngr
werner removed a project from T2448: dirmngr fails to load crl when imported manually: dirmngr.
Dec 1 2016, 10:37 AM · gnupg, Windows 32, Windows, Bug Report
werner added a project to T2448: dirmngr fails to load crl when imported manually: gnupg.
Dec 1 2016, 10:37 AM · gnupg, Windows 32, Windows, Bug Report
werner removed a project from T2448: dirmngr fails to load crl when imported manually: Unreleased.
Dec 1 2016, 10:36 AM · gnupg, Windows 32, Windows, Bug Report
werner added a project to T2451: _hkp_tcp SRV record doesn't work: gnupg.
Dec 1 2016, 10:36 AM · gnupg, Bug Report, dirmngr
werner added a project to T2433: dirmngr: hkps connections should default to system trust if --hkp-cacert is not given: gnupg.
Dec 1 2016, 10:35 AM · gnupg, Bug Report, dirmngr

Nov 30 2016

Pazuzu added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Thanks for your fast reply.
Sadly I have not much time these days... but I have done what you suggested.
Honestly the log files dont tell me much. One thing I recognised is sometimes the logfiles end with "Fatal: libgcrypt
problem: out of core in secure memory" and sometimes they dont (I have not copied every log file here, this might
be to much).

This is what I got with debug memstat and the recent version of gnupg in Arch.

2016-11-30 21:18:35 gpg-agent[5516] listening on socket '/run/user/1000/gnupg/S.gpg-agent'
2016-11-30 21:18:35 gpg-agent[5517] gpg-agent (GnuPG) 2.1.15 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe1d0e5700 for fd 5 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe1c8e4700 for fd 6 started
2016-11-30 21:18:45 gpg-agent[5517] starting a new PIN Entry
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe17fff700 for fd 8 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe177fe700 for fd 9 started
2016-11-30 21:18:51 gpg-agent[5517] handler 0x7efe1d0e5700 for fd 5 terminated
2016-11-30 21:18:52 gpg-agent[5517] Fatal: out of core in secure memory while allocating 512 bytes

2016-11-30 21:18:52 gpg-agent[5517] Fatal: libgcrypt problem: out of core in secure memory
2016-11-30 21:18:35 gpg-agent[5516] listening on socket '/run/user/1000/gnupg/S.gpg-agent'
2016-11-30 21:18:35 gpg-agent[5517] gpg-agent (GnuPG) 2.1.15 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe1d0e5700 for fd 5 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe1c8e4700 for fd 6 started
2016-11-30 21:18:45 gpg-agent[5517] starting a new PIN Entry
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe17fff700 for fd 8 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe177fe700 for fd 9 started
2016-11-30 21:18:51 gpg-agent[5517] handler 0x7efe1d0e5700 for fd 5 terminated
2016-11-30 21:18:52 gpg-agent[5517] Fatal: out of core in secure memory while allocating 512 bytes

2016-11-30 21:18:52 gpg-agent[5517] Fatal: libgcrypt problem: out of core in secure memory
v2016-11-30 21:18:35 gpg-agent[5516] listening on socket '/run/user/1000/gnupg/S.gpg-agent'
2016-11-30 21:18:35 gpg-agent[5517] gpg-agent (GnuPG) 2.1.15 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe1d0e5700 for fd 5 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe1c8e4700 for fd 6 started
2016-11-30 21:18:45 gpg-agent[5517] starting a new PIN Entry
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe17fff700 for fd 8 started
2016-11-30 21:18:45 gpg-agent[5517] handler 0x7efe177fe700 for fd 9 started
2016-11-30 21:18:51 gpg-agent[5517] handler 0x7efe1d0e5700 for fd 5 terminated
2016-11-30 21:18:52 gpg-agent[5517] Fatal: out of core in secure memory while allocating 512 bytes

2016-11-30 21:18:52 gpg-agent[5517] Fatal: libgcrypt problem: out of core in secure memory

This is what I got with debuging memstat and downgraded gnupg to gnupg-2.1.15-2-x86_64.pkg.tar.xz

2016-11-30 21:28:30 gpg-agent[5953] listening on socket '/run/user/1000/gnupg/S.gpg-agent'
2016-11-30 21:28:30 gpg-agent[5954] gpg-agent (GnuPG) 2.1.15 started
2016-11-30 21:28:37 gpg-agent[5954] handler 0x7fd6fedca700 for fd 5 started
2016-11-30 21:28:37 gpg-agent[5954] starting a new PIN Entry
2016-11-30 21:28:42 gpg-agent[5954] handler 0x7fd6fedca700 for fd 5 terminated
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fedca700 for fd 5 started
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fe5c9700 for fd 7 started
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fddc8700 for fd 8 started
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fd5c7700 for fd 9 started
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fedca700 for fd 5 terminated
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fddc8700 for fd 8 terminated
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fe5c9700 for fd 7 terminated
2016-11-30 21:28:47 gpg-agent[5954] handler 0x7fd6fd5c7700 for fd 9 terminated
2016-11-30 21:29:32 gpg-agent[5954] handler 0x7fd6fe5c9700 for fd 7 started
2016-11-30 21:29:32 gpg-agent[5954] handler 0x7fd6fe5c9700 for fd 7 terminated
2016-11-30 21:30:10 gpg-agent[5954] handler 0x7fd6fe5c9700 for fd 5 started
2016-11-30 21:30:10 gpg-agent[5954] handler 0x7fd6fd5c7700 for fd 7 started
2016-11-30 21:30:10 gpg-agent[5954] handler 0x7fd6fddc8700 for fd 8 started
2016-11-30 21:30:10 gpg-agent[5954] handler 0x7fd6fedca700 for fd 9 started
2016-11-30 21:30:10 gpg-agent[5954] Fatal: out of core in secure memory while allocating 512 bytes

2016-11-30 21:30:10 gpg-agent[5954] Fatal: libgcrypt problem: out of core in secure memory

And this is what I got from gdb (I am quite unfamiliar with gdb, so maybe i done something wrong)

Reading symbols from gpg-agent...(no debugging symbols found)...done.
Attaching to program: /usr/bin/gpg-agent, process 3492
Reading symbols from /usr/lib/libgcrypt.so.20...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libgpg-error.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libassuan.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnpth.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
0x00007f05452cd18c in pselect () from /usr/lib/libc.so.6
(gdb) break log_fatal
Function "log_fatal" not defined.
Make breakpoint pending on future shared library load? (y or [n])
(gdb) c
Continuing.
[New Thread 0x7f053ffff700 (LWP 4687)]
[New Thread 0x7f05449ea700 (LWP 4698)]
[New Thread 0x7f053f7fe700 (LWP 4699)]
[New Thread 0x7f05451eb700 (LWP 4700)]
[Thread 0x7f053ffff700 (LWP 4687) exited]
[Thread 0x7f053f7fe700 (LWP 4699) exited]
[Thread 0x7f05451eb700 (LWP 4700) exited]
[Thread 0x7f05449ea700 (LWP 4698) exited]
[New Thread 0x7f05449ea700 (LWP 4733)]
[New Thread 0x7f05451eb700 (LWP 4745)]
[New Thread 0x7f053f7fe700 (LWP 4746)]
[New Thread 0x7f053ffff700 (LWP 4747)]
[Thread 0x7f053f7fe700 (LWP 4746) exited]
[Thread 0x7f05449ea700 (LWP 4733) exited]
[Thread 0x7f05451eb700 (LWP 4745) exited]
[Thread 0x7f053ffff700 (LWP 4747) exited]
[New Thread 0x7f053ffff700 (LWP 4775)]
[New Thread 0x7f05451eb700 (LWP 4776)]
[Thread 0x7f053ffff700 (LWP 4775) exited]

Thread 11 "gpg-agent" received signal SIGPIPE, Broken pipe.
[Switching to Thread 0x7f05451eb700 (LWP 4776)]

0x00007f054559a16d in write () from /usr/lib/libpthread.so.0

Nov 30 2016, 9:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
Pazuzu added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Nov 30 2016, 9:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
neal added a project to T2817: TOFU validity conflict not set on conflict: Restricted Project.
Nov 30 2016, 11:44 AM · Restricted Project, Bug Report, gnupg, TOFU
neal added a comment to T2817: TOFU validity conflict not set on conflict.

This should be fixed in: 2f27cb12e30c9f6e780354eecc3ff0039ed52c63 .

Nov 30 2016, 11:44 AM · Restricted Project, Bug Report, gnupg, TOFU
gniibe removed a project from T2386: scdaemon wants to accept --homedir, but it doesn't: Restricted Project.
Nov 30 2016, 3:16 AM · Bug Report, gnupg
gniibe closed T2386: scdaemon wants to accept --homedir, but it doesn't as Resolved.
Nov 30 2016, 3:16 AM · Bug Report, gnupg
gniibe added a comment to T2386: scdaemon wants to accept --homedir, but it doesn't.

Applied to 2.0, too. Will be in 2.0.31.

Nov 30 2016, 3:16 AM · Bug Report, gnupg
gniibe claimed T2053: scdaemon over pcsclite holds the card even with "--card-timeout 5".
Nov 30 2016, 3:14 AM · Bug Report, gnupg
gniibe claimed T2738: gpg crashes when attempting to write a key to a card.
Nov 30 2016, 3:12 AM · Fedora, Bug Report, gnupg (gpg14)
gniibe added a comment to T2449: Smartcard reinsert fails with gnupg 2.1.15 (gpg-agent/scdaemon).

Fixed in 2.1.16.

Nov 30 2016, 2:46 AM · Bug Report, gnupg
gniibe closed T2449: Smartcard reinsert fails with gnupg 2.1.15 (gpg-agent/scdaemon) as Resolved.
Nov 30 2016, 2:46 AM · Bug Report, gnupg
gniibe removed a project from T2449: Smartcard reinsert fails with gnupg 2.1.15 (gpg-agent/scdaemon): Restricted Project.
Nov 30 2016, 2:46 AM · Bug Report, gnupg
gniibe closed T1686: GPG Smartcard daemons not detecting card change Windows 8.1 as Resolved.
Nov 30 2016, 2:44 AM · gnupg, Windows 32, gnupg (gpg20), Windows, Bug Report
gniibe removed a project from T1686: GPG Smartcard daemons not detecting card change Windows 8.1: Restricted Project.
Nov 30 2016, 2:44 AM · gnupg, Windows 32, gnupg (gpg20), Windows, Bug Report
gniibe added a comment to T1686: GPG Smartcard daemons not detecting card change Windows 8.1.

Fixed in 2.1.11 and 2.0.30.

Nov 30 2016, 2:44 AM · gnupg, Windows 32, gnupg (gpg20), Windows, Bug Report
gniibe removed a project from T2698: Building static GnuPG fails with 2.1.15 (works with 2.1.14): Restricted Project.
Nov 30 2016, 2:42 AM · Bug Report, gnupg
gniibe closed T2698: Building static GnuPG fails with 2.1.15 (works with 2.1.14) as Resolved.
Nov 30 2016, 2:42 AM · Bug Report, gnupg
gniibe added a comment to T2698: Building static GnuPG fails with 2.1.15 (works with 2.1.14).

Fixed in 2.1.16.

Nov 30 2016, 2:42 AM · Bug Report, gnupg
gniibe closed T2651: scdaemon should free the reader after card removal as Resolved.
Nov 30 2016, 2:41 AM · Bug Report, gnupg, scd
gniibe added a comment to T2651: scdaemon should free the reader after card removal.

Fixed in 2.1.16. Will be in 2.0.31 as the fix is in the git repo already.

Nov 30 2016, 2:41 AM · Bug Report, gnupg, scd
gniibe removed a project from T2651: scdaemon should free the reader after card removal: Restricted Project.
Nov 30 2016, 2:41 AM · Bug Report, gnupg, scd
gniibe removed a project from T1779: AIX & GCC 4.7.4: 27 of 30 tests failed Please report to http://bugs.gnupg.org: Restricted Project.
Nov 30 2016, 2:38 AM · gnupg, Bug Report
gniibe added a comment to T1779: AIX & GCC 4.7.4: 27 of 30 tests failed Please report to http://bugs.gnupg.org.

Fixed with nPth 1.3.

Nov 30 2016, 2:38 AM · gnupg, Bug Report
gniibe closed T1779: AIX & GCC 4.7.4: 27 of 30 tests failed Please report to http://bugs.gnupg.org as Resolved.
Nov 30 2016, 2:38 AM · gnupg, Bug Report
gniibe closed T2260: npth resource locking not working on AIX as Resolved.
Nov 30 2016, 2:36 AM · Bug Report, npth
gniibe added a comment to T2260: npth resource locking not working on AIX.

Fixed in 1.3.

Nov 30 2016, 2:36 AM · Bug Report, npth
gniibe removed a project from T2403: make check failed for t-stringhelp (AIX 7.1): Restricted Project.
Nov 30 2016, 2:36 AM · Bug Report, gnupg
gniibe added a comment to T2403: make check failed for t-stringhelp (AIX 7.1).

Fixed with nPth 1.3.

Nov 30 2016, 2:36 AM · Bug Report, gnupg
gniibe closed T2403: make check failed for t-stringhelp (AIX 7.1) as Resolved.
Nov 30 2016, 2:36 AM · Bug Report, gnupg
gniibe added a project to T2852: scdaemon + forwarded ssh agent: 100% reproducible crash: Restricted Project.
Nov 30 2016, 2:22 AM · Unreleased, gnupg (gpg20), Bug Report, gnupg
gniibe added a comment to T2852: scdaemon + forwarded ssh agent: 100% reproducible crash.

Fixed in STABLE-BRANCH-2-0 branch of git repo, as of the commit:
5c599e4f6edd288f4759c9fc2bcf9fe87dee1836

Nov 30 2016, 2:22 AM · Unreleased, gnupg (gpg20), Bug Report, gnupg

Nov 29 2016

werner added a comment to T2849: dirmngr fails to terminate on SIGTERM if an existing connection is open.

While looking at the problem I found a corner case related to a shutdown and
fixed that.

I also tried to close the listening socket after the first shutdown event. I
reverted that because the effect is that a client trying to connect immediately
gets a failure and then starts a new dirmngr - which is not the idea of a shutdown.

Nov 29 2016, 8:40 PM · Too Old, gnupg, Bug Report, dirmngr
werner added a project to T2849: dirmngr fails to terminate on SIGTERM if an existing connection is open: gnupg.
Nov 29 2016, 7:59 PM · Too Old, gnupg, Bug Report, dirmngr
werner claimed T2849: dirmngr fails to terminate on SIGTERM if an existing connection is open.
Nov 29 2016, 7:59 PM · Too Old, gnupg, Bug Report, dirmngr
werner added a comment to T2849: dirmngr fails to terminate on SIGTERM if an existing connection is open.

The man pages notes:

SIGTERM

   Shuts down the process but waits until all current requests are
   fulfilled.  If the process has received 3  of these signals
   and requests are still pending, a shutdown is forced.  You may
   also use
         gpgconf --kill dirmngr
   instead of this signal

thus this is by design and identical to what gpg-agent does. IIRC, there was a
regression for some time, fixed in 2.1.16. So this fixed regression is what you
see as a bug.

However, the process should not anymore listen for new connections as soon as a
shutdown is pending. That needs to be fixed.

Nov 29 2016, 7:59 PM · Too Old, gnupg, Bug Report, dirmngr
werner added a comment to T2230: gpgsm decryption with smartcard fails with "Invalid session key".

Yeah, lets do that. Commit 8489b12 to go into 2.1.17. Thanks.

Nov 29 2016, 7:51 PM · Restricted Project, gnupg, scd, S/MIME, Bug Report
werner added a project to T2230: gpgsm decryption with smartcard fails with "Invalid session key": Restricted Project.
Nov 29 2016, 7:51 PM · Restricted Project, gnupg, scd, S/MIME, Bug Report
cpaelzer added projects to T2858: way to not spawn (or despawn) gpg-agent and dirmngr: dirmngr, Bug Report.
Nov 29 2016, 5:53 PM · gnupg, dirmngr, Feature Request
werner added a project to T2677: enable-special-filenames does not work with --output: Unreleased.
Nov 29 2016, 5:03 PM · Bug Report, gnupg
werner added a comment to T2677: enable-special-filenames does not work with --output.

commit a5910e00ace882b8a17169faf4607163ab454af9 should fix that. Will go into
2.1.17.

Nov 29 2016, 5:03 PM · Bug Report, gnupg