Segmentation violation aka segmentation fault.
Used for all kind of crashes except for failed asserts.
Details
Jan 26 2024
For the particular issue reopened for GnuPG 2.2.41 is fixed in GnuPG 2.2.42.
Please note that we can't fix the cause itself, the hardware problem.
Nov 7 2023
Applied a patch from 2.4/master to 2.2 for SEGV when card gives bogus data. rG600e69b46149: scd:openpgp: Fix a segv for cards supporting unknown curves.
Nov 6 2023
@desultory Thank you for your report.
Please open a new ticket for your problem. If you can, please show the result of https://dev.gnupg.org/T5963#157724
Nov 5 2023
This is still an issue for me:
Jul 12 2022
And 2.3.7.
Fixed in 2.2.36.
May 11 2022
The change improve error handling for possible other errors by device: rG53eddf9b9ea0: scd: Fail when no good algorithm attribute.
May 10 2022
Applied to 2.2 branch, too.
I examined all log files you gave us, and I think that scdaemon with PC/SC fails to detect the removal of the USB device.
May 9 2022
I've applied the linked patch, but still experience the error. Most of the times, I cannot access my yubikey at all and I am not sure what is blocking it.
I've tried to include as much debugging output as I could below. Please let me know if there is anything else I can do to debug this.
The patch rG054d14887ef8: scd: Add workaround for ECC attribute on Yubikey. fixes a particular problem of Yubikey implementation where it returns bogus octet for its data object of C1, C2, and C3.
May 6 2022
With the patch and after starting a new gpg-agent, gpg --card-status now works immediately.
But when I re-plug the yubikey, gpg reports gpg: OpenPGP card not available: Card error until either gpg-agent is restarted, or pcscd is restarted.
pcsc-lite in debug mode reports no errors, but one log is obviously much shorter as gpg fails early (I've attached both, same pcscd and gpg-agent instance).
I pushed a workaround.
For my environment, it is not PC/SC-specific. It also occurs when CCID driver is used.
For bcdDevice 5.24, I can replicate the symptom, but only once. After second invocation of gpg --card-status, it works well.
May 5 2022
I've applied the patch and can confirm that the segfault is fixed, but gpg still has severe problems communicating with the Yubikey over pcsc-lite.
Ours are even newer (5.4.3). Did you the Yubico tools to switch to curve443?
In any case, is it possible that you apply my fix and test again?
Your Yubikey's firmware version is 5.2.7 - let me see what versions we have in stock to test my fix.
May 4 2022
I've taken the liberty to regenerate the valgrind report including libc and gnupg debugsyms. Maybe it'll help.
I am not sure about the crash but the unknown curve is
1.3.6.1.4.1.11591.15.1.2 which seems to be a GNU OID for curve448
It segfaults on SERIALNO. Here's what valgrind outputs:
What I would do in this case is to stop the gnupg daemon amd anything whiuch might start them and run scdaemon under valgrind.
May 2 2022
Sep 7 2021
Fixed in 2.3 and 2.2
(I closed this by accident)
Aug 30 2021
Aihhh, my fault. seems that a new version it not too far away.
Aug 13 2021
Dec 1 2020
Nov 26 2020
For ctx->exportPublicKeys returning 0 even when a failure, (with fix of gpg) error handling should be done differently.
Nov 25 2020
Well, I fixed my loopback passphrase provider and the application no longer crashes with a bad passphrase.
relatively new feature
Yes. In the mean time, I'm using a cheap workaround : validate the input passphrase by signing a dummy text before exporting. Not that ugly and can stay for long.
More specifically, in the situation of multiple calls, ->getPassphrase is called multiple times, and it should return newly allocated "char *" object each time, because it is released each time (in lower layer).
My excuse: Please note that the support of exporting secret keys by GPGME are relatively new feature (see {T5046) and the fix rM3382ecb17eb5: core: Support exporting secret keys.). The fix of rM53ac732bae46: core: Call _gpgme_passphrase_status_handler when exporting keys. is a part of the support.
I think that we need more fixes for gpg/gpgme to be fully working well.
Nov 24 2020
Currently, gpg doesn't report any errors to status line for exporting secret keys. If needed, a patch like this is needed:
Chasing this bug, I pushed a change: rM53ac732bae46: core: Call _gpgme_passphrase_status_handler when exporting keys.
Nov 23 2020
Can you try if using the overload
Error Context::exportPublicKeys(const char *patterns[], Data &keyData, unsigned int flags)
which takes an array of patterns instead of a single pattern also crashes?
Unless you need some special features of GpgSetExpiryTimeEditInteractor or you have to support gpgme <1.15, I highly recommend to use the new ChangeExpiryJob instead of the fragile (and apparently buggy) edit interactor.