Your message dated Sat, 13 Jun 2026 11:06:59 +0000
with message-id <[email protected]>
and subject line Bug#1139694: fixed in ccid 1.8.2-1
has caused the Debian Bug report #1139694,
regarding libccid: yubikey no longer recognized after upgrade to 1.8.1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1139694: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1139694
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libccid
Version: 1.8.1-1
Severity: normal

After upgrading libccid (and restarting pcscd), pcsc_scan no longer
finds my Yubikey. Bisection in the upstream git repository points to
a1ccc12 (Correctly close the slots of a multi-slots reader, 2026-06-03).

Building libccid with that commit and then running "pcscd --foreground
--debug" produces these log entries:

00000029 ../src/ifdhandler.c:91:CreateChannelByNameOrChannel() Lun: 10000, 
device: usb:1050/0406:libudev:1:/dev/bus/usb/001/002
00000005 ../src/utils.c:77:GetNewReaderIndex() Lun: 10000 is already used
00000004 ../src/readerfactory.c:1144:RFInitializeReader() Open Port 0x200001 
Failed (usb:1050/0406:libudev:1:/dev/bus/usb/001/002)
00000004 ../src/readerfactory.c:371:RFAddReader() Yubico YubiKey FIDO+CCID init 
failed.
00000006 ../src/readerfactory.c:627:RFRemoveReader() UnrefReader() count was: 1
00000003 ../src/readerfactory.c:1157:RFUnInitializeReader() Attempting shutdown 
of Yubico YubiKey FIDO+CCID 01 00.
00000007 ../src/hotplug_libudev.c:527:HPAddDevice() Failed adding USB device: 
Yubico YubiKey FIDO+CCID

whereas building with the parent of that commit, the "Lun: 10000 is
already used" error does not occur (and then it actually opens the
device).

The "CreateChannelByNameOrChannel(): Lun: 10000" line appears twice,
even in the working case. So I guess we open it twice while probing for
the correct driver, but the change in a1ccc12 means we do not correctly
close the channel, and the second attempt then fails.

I think we never hit the ReleaseReaderIndex() call in CloseUSB(), and
the one in FreeChannel() is now gone. Doing this:

diff --git a/src/ifdhandler.c b/src/ifdhandler.c
index 63b7cd7..03a03c1 100644
--- a/src/ifdhandler.c
+++ b/src/ifdhandler.c
@@ -203,6 +203,7 @@ error:
        if (return_value != IFD_SUCCESS)
        {
                /* release the allocated resources */
+               ReleaseReaderIndex(ccid_reader->reader_index);
                FreeChannel(ccid_reader);
        }
 

fixes it for me, but I don't know the code well enough to say if that's
a sane fix. It looks like FreeChannel() calls ClosePort(), which is
#define'd to CloseUSB(), which is where the new release code was added.
But we never hit that code, because ccid_reader->device->dev_handle is
NULL and we return early. So maybe it needs to try harder to release the
index in this case?

-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 7.0.12+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libccid depends on:
ii  libc6         2.42-16
ii  libusb-1.0-0  2:1.0.30-1

libccid recommends no packages.

Versions of packages libccid suggests:
pn  pcmciautils  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: ccid
Source-Version: 1.8.2-1
Done: Ludovic Rousseau <[email protected]>

We believe that the bug you reported is fixed in the latest version of
ccid, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ludovic Rousseau <[email protected]> (supplier of updated ccid package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 13 Jun 2026 12:52:39 +0200
Source: ccid
Architecture: source
Version: 1.8.2-1
Distribution: unstable
Urgency: medium
Maintainer: Ludovic Rousseau <[email protected]>
Changed-By: Ludovic Rousseau <[email protected]>
Closes: 1139694
Changes:
 ccid (1.8.2-1) unstable; urgency=medium
 .
   * New upstream release
   * Fix "yubikey no longer recognized after upgrade to 1.8.1"
     (Closes: #1139694)
Checksums-Sha1:
 82d2037bff2dd2bcc51e04ef688f4ed7c5d1e0ea 2136 ccid_1.8.2-1.dsc
 da3ae06f344fff807dcbd7d9f83683db22b0e647 197268 ccid_1.8.2.orig.tar.xz
 edb2e58349e41487c441baa184495cf90d5126da 833 ccid_1.8.2.orig.tar.xz.asc
 4356133e6a1165447c45d1396c49167e67a7a7f6 11272 ccid_1.8.2-1.debian.tar.xz
 6fe5ab4279a1748baba3faa19acb162f8f30f62d 7200 ccid_1.8.2-1_amd64.buildinfo
Checksums-Sha256:
 de71905026f94b2147a285b9c72e0a285db7907f7ae261418e4b07f1b1adeab0 2136 
ccid_1.8.2-1.dsc
 d74294e23d436546c3e719c95a4da180b17f5e7ffdd36efca53f75351cb0de75 197268 
ccid_1.8.2.orig.tar.xz
 4d7c6daeb0149cc630e59fe0de691ceddf4543a9244d9241ed7d5b76404ca7d5 833 
ccid_1.8.2.orig.tar.xz.asc
 53b8b7e3c97e77f670d3b10a9534614dde6f06fe8f0d2028eef4e283b5d2e28a 11272 
ccid_1.8.2-1.debian.tar.xz
 d23f5ca5fd8de82aef23cd36a0f86218a60f2e3cd914cd2db9ded1fd2e26b392 7200 
ccid_1.8.2-1_amd64.buildinfo
Files:
 2cbaf01b0c1179b3fd9d6604b5226a45 2136 libs optional ccid_1.8.2-1.dsc
 b76c11836fca4f21684a7b2a2f181d46 197268 libs optional ccid_1.8.2.orig.tar.xz
 3d3dded16ec50ceab1422be31c477a29 833 libs optional ccid_1.8.2.orig.tar.xz.asc
 679ed2caec16d00f5b130bd2e6794156 11272 libs optional ccid_1.8.2-1.debian.tar.xz
 d350bc1705e6af001528e9c6e48d256b 7200 libs optional 
ccid_1.8.2-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEE9eEbn/6REUb0HZU9eKG03+j5xX4FAmotN38UHHJvdXNzZWF1
QGRlYmlhbi5vcmcACgkQeKG03+j5xX7TBA//SER2PZ7muacNAHFwYNVckt2L9NeH
VWGQ5QLAfMXV3MqNuqCaZoDL6CH1mNmLfBBHasSYmw11DJl9ODjEj2Nzn2W5f1Fh
/AwIWpGnlga/prm7lgxuY2cKYjle6knD4eLb7c+LlzdBMxDLaDFmGgfb04YGpHRa
EYHgf/zB5uTgfKL7NAN/F0phC6KdCnOETbqJknyG2kKnUZA+TEs5IO3AOs7ECIl3
iQfCoxHn3iT/Ry/MyjhCtqe9lA6zF1qVq7RAGRgKFcm9Iyx7nuK8HeYZzrHJcHEH
nLE1h8dZQ1y3V09r1lR6XqoO67VnKNg89LbToymYMqbXtA0r1QhNorXnhK5EkJD1
nZlWjfxXfl6WE+5LoXz7Y98/GVr1wnlMd6o9Kd1kZRcB+QLEhg1f6UvhStGcCobo
R85uoB2F0DPFgCnqug2oizKbJUolOQu4JbeLtP2T9iHRZzgUs4eZEruk5HZcDT0E
9hsshwjf2hZP2mtQnmtLNWV+gLoirRfh4p/1OF2ZBbOp+Jn7/eS22KCDnF80LRVy
RkBYJ0XfUZq+Ys+3ecseCJV5hyfezwUf70sdGfy0l1kO4nujqbzmcP9l2/P3yJR4
cqCRdG5/w9VVyHTzRQ/C4ewyI6H6ZP9+KgnA+4fklsH8ABA/cyGH5x251/vHDbqC
EcXfkBCG18+Zaao=
=by9J
-----END PGP SIGNATURE-----

Attachment: pgpDKPdGmZvG9.pgp
Description: PGP signature


--- End Message ---

Reply via email to