scdaemon timeout (suspected IPC bug): guru logs included
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnupg2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Resetting my (YubiKey 5 NFC) PIN stopped working. I believe I was on Impish (now Jammy) when I last reset it. Based on the scdaemon logs it looks like my initial admin PIN is received and scdaemon makes a second INQUIRE NEEDPIN request for the updated password. However, scdaemon never receives a response to the second request.
$ export GPG_TTY=$(tty)
$ echo $GPG_TTY
/dev/pts/8
$ tty
/dev/pts/8
$ gpg --edit-c
Application type .: OpenPGP
PIN retry counter : 0 0 3
<snip>
gpg/card> passwd
gpg: OpenPGP card no. <snip> detected
Enter passphrase: <- hangs indefinitely
I enabled scdaemon logging in guru mode and here are the bits that look relevant to me (the last 8 lines):
2022-06-24 20:15:24 scdaemon[305860] DBG: chan_14 -> OK
2022-06-24 20:15:24 scdaemon[305860] DBG: chan_14 <- PASSWD 1
2022-06-24 20:15:24 scdaemon[305860] DBG: asking for PIN '||Please enter the PIN'
2022-06-24 20:15:24 scdaemon[305860] DBG: chan_14 -> INQUIRE NEEDPIN ||Please enter the PIN
2022-06-24 20:15:29 scdaemon[305860] DBG: chan_14 <- [ <snip> ...(<snip> byte(s) skipped) ]
2022-06-24 20:15:29 scdaemon[305860] DBG: chan_14 <- END
2022-06-24 20:15:29 scdaemon[305860] DBG: asking for PIN '|N|New PIN'
2022-06-24 20:15:29 scdaemon[305860] DBG: chan_14 -> INQUIRE NEEDPIN |N|New PIN
To me it looks like whatever is on the other end of chan_14 never received the message, because the prompt "Enter passphrase:" is never updated (I think it's supposed to say "Enter new passphrase" or similar after the second INQUIRE NEEDPIN is sent from scdaemon).
Please let me know if further information is needed. I can share more logs if required and potentially test a fix (depending on the timeline).
Obligatory:
----------
Description: Ubuntu 22.04 LTS
Release: 22.04
ii gpg-agent 2.2.27-3ubuntu2 amd64 GNU privacy guard - cryptographic agent
ii scdaemon 2.2.27-3ubuntu2 amd64 GNU privacy guard - smart card support
summary: |
- scdaemon: PIN Reset Fails On Second PIN Entry (guru logs included) + scdaemon IPC bug: guru logs included |
Is this the correct place to file the bug?