Thanks for the quick analysis.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Oct 12 2020
Oct 9 2020
Oct 7 2020
Oct 6 2020
Oct 4 2020
OK I found a very interesting thing here, @werner and finally I can reproduce this problem:
Oct 1 2020
Actually I don't use systemd unit to start gpg-agent (creating that service file in systemd and make it start automatically) but I run it manually within the script. Also the script has selfcheck not to run multiple gpg-agent like below:
Sep 30 2020
There is a conflict between the systemd based launching of gpg-agent and gpg's own launching of the agent. Further systemd seems to remove the /run/user/UID directory which unlinks gpg-agent's socket. gpg-agent's self-check notices this after a minute and termintates itself.
I observed that the card reader's going erroneous state when I removed a card during its communication.
In this state, it never reports the card removal by the interrupt transfer.
I applied rG920f258eb601: scd: Internal CCID driver: More fix for SPR532. for this problem.
Sep 29 2020
Update found out the answer for this mystery but I need to know why from you guys:
Sep 28 2020
With all respect. Should I wait for a follow-up or I should consider this case as closed?
The patch rG684a52dffa8b: scd: Change handling of SPR532 card reader. makes me happier. It is more stable.
This is also what I found out with my tests with the libvirt usb: removing and redirecting back the device got it working again.
Testing more, I managed to encounter failure with physical usb.
Once in this failure mode, I need to remove the card reader from USB and reinsert again.
I need to figure out a sequence to avoid this situation and to reset the card reader correctly.
I tested with physical usb, did multiple operations with external events (insert/remove/etc. for card). I haven't seen any problem (if so, I were doing more fixes), so far.
Sep 26 2020
That code in gnupg has not been touched in a very long time so this may be caused by some side effect.
Ok. Tried to test this with master, but failed. I got it compiled and installed, and it actually detected the first removal after reboot/suspend/reader attach/whatever reason, but after that when I inserted the card back, it didn't function anymore. I suppose you also tried that? I mean that's the use case, I suppose: to be able to remove/insert the card reliably all day long.
Sep 25 2020
Currently, yes. After some testing, I'll backport it to 2.2.
Sep 24 2020
Nice, thanks! If I want to try this fix, should I just compile the master tree?
Sep 22 2020
Sep 21 2020
Update: Using --use-standard-socket argument to run this does not work and gpg-agent still create new process. New findings:
Just to acknowledge here: I notice that the new gpg-agent random process respawn with an obsolete argument using --use-standard-socket. I will run my gpg daemon using this absolete argument to see if it can block this random process. [updated the script]
Thanks for your reply. I can confirm from my observation from the log this is a bug where I'm able to reproduce this every day. I will post this to mailing lists.
Sep 20 2020
FWIW: You may get a faster answer if you post to gnupg-users mailing lists. Bug reports are a tool to fix bugs and usually are only seen by a few developers.
I'm now able to kill the respawn process in the script (updated the script). But I need confirmation if this is a known bug ?
Sep 19 2020
I can create a script to manually kill the 2nd process, but can u guys confirm with me that this is a known bug ?
Just to let you know that , using --homedir option also has the same problem I noticed today. I got email each minute like this:
Ok let me update what I did next:
Sep 18 2020
Sep 17 2020
This is everything lsusb knows about the device:
And please report the output of lsusb -d 04e6:e003 for the information of the card reader.
@turkja Thanks for your information.
May I ask you one thing?
Please show me the usb VID:PID of your card reader.
Is it 04e6:e003?
You can examine a line of the output by lsusb.
Just wanted to add to my initial findings:
- I was not using proprietary drivers (libscmccid.so.5.0.35), because the installer script fails to install on default CentOS 8 pcsc-lite. So the distribution pcsc-lite also doesn't have this issue.
- Fastest way to test this condition is to just detach/attach the reader device.
- Proprietary drivers doesn't support secure pin entry!
Sep 16 2020
Please note that:
- There is a single user accessing the socket dir (which is the same as the homedir).
- The socketdir (homedir) is not in a local directory. It is in another file system accessed via the SMB protocol, with a command such as:
gpg --homedir "//192.168.32.211/c$/gpghomedir" ...
From the '&ovl' I assume that the lock file has been opened for overlapped IO.
Please see an extract from MSDN for the LockFileEx function:
We need to figure out why the file locks seem not to work. gpg-agent processes whatch there own socket and terminate if that socket does not belong to them anymore.
Thanks for sending.
Here is the output for an SCM SPR532
Bus 001 Device 123: ID 04e6:e003 SCM Microsystems, Inc. SPR532 PinPad SmartCard Reader
Is it an alias of SPR532? Please show me the USB vendor ID and product ID.
Yes it is the windows version. It occurs both in Windows 10 and Windows Server 2016.
What I notice is that a gpg-agent is started, then after some time another one is started and the previous ends (presumably because it has lost the socket), etc. At any point in time, I can see only one agent instance running in the task manager, but with different process ids.
Sep 15 2020
Okay, I have the same problem at my office and thus I should be able to figure out the reason. I have ignored the problem until now because the wokraround is easy enough and in most cases I authenticate with my token anyway. But yes, this needs to be fixed.
I assume this is the Windows version. gpg uses a locking mechanism to avoid creating several gpg-agent processes. In the worst case this may take quite some time until one of the processes can get the lock. There is an exponential backoff scheme in use and I have not yet found a way to replicate the full deadlock you describe. It would be helpful if you could describe in more detail how you run into this case.
Sep 14 2020
Thanks for prompt answer!
Thanks for the detailed report. Does the green LED blink fast when it does not work?
Sep 9 2020
@gniibe I wonder, if file --export with following --import would do the trick!?
@gniibe: Actually I implemented this recently. Support for this is in gpg-card
@leder I agree that it is useful if OpenPGP public key can be (directly or indirectly) retrieved from a card.
One more idea: It is a riddle to me why I can configure keyserver http://pool.sks-keyservers.net/ and then do a --search-keys, but it is impossible to do --receive-keys with the following error:
Thank you, gniibe!
Please note that your private keys are on your card, together with finger print information. But there is no place to have OpenPGP public keys on the card. I guess that this is a possible cause of confusion.
Sep 8 2020
Now I am even more confused! This is key No. 1 - the number on the keyserver w/ --search-keys:
On an OpenPGP card the key no 1 (OPENPGP.1) is a sign-only key - you can't use it for decryption even if you somehow managed to encrypt to that key. That restriction is enforced by the card.
Hello Werner,
Your problem seems to be that you don't have a copy of your public key anymore. The uni-mainz keyserver might be configured not to return expired keys (if I read the output above correctly). I was able to to retrieve your key using the standard pool (in particular from the server sks.pod02.fleetstreetops.com). The key is expired but that does hinder you to decrypt. Run "gpg --card-status" once tomake sure a stub file is available.
Sep 7 2020
Now I changed the gpg2 keyserver and can see my public keys on the public key server:
Sep 4 2020
Gpg4win 3.113 has also been released. Thus closing this issue.
Small correction: The fixed byte I talked about may have the values 1, 2, 3, or 4.
Sep 3 2020
This has CVE-2020-25125
2.2.23 has been released and announced.
The fix will be in the 2.2.23 release (T5045).
After randomly finding this issue I wonder: Is it possible (and does it make sense) to change the title of this bus to something like "big key causes massive CPU usage" (if I understood it all correctly)?
It's a different issue: Gnuk doesn't support length of 3072, only 2048 and 4096.
Sep 2 2020
A bug was reported against this version which could happen also to older versions of GnuPG 2.2. In case of a crash please apply the patch over at rG8ec9573e57866dda5efb4677d4454161517484bc or wait for 2.2.23
Hi,
I have tested a GnuPG Token with Gpg4win-3.1.12 and generating a key with Kleopatra did not work
With 2.2.23-beta4 that contains: 0a9665187a7cbf68933b7162fb5f974177684a50 I have repeated the test on Linux and first the key-attr change that Kleopatra sends fails:
Sep 1 2020
I should add a test with Gnuk to my Windows quick test after a release.
Thanks a lot. Applied and pushed.
I can confirm that the patch seems to resolve the issue for me.
I think that following patch can solve the issue:
Aug 31 2020
As a workaround please run
There seems to be a problem with Gnuk and thus Nitrokey tokens with 2.2.22. We are investigating this. See T5039.
Aug 27 2020
Aug 25 2020
The CRL states how long it is valid and we cache it for about that time.
OCSP responses are by definition not cachable but we allow for a clock skew of 10 minutes.