FreeRDP icon indicating copy to clipboard operation
FreeRDP copied to clipboard

smartcard: invalid report of no card readers

Open hardening opened this issue 4 years ago • 2 comments

When running certutil -v -scinfo in my windows session with no yubikey inserted, I get the following message that seems to indicate that the answer to the listReaders call is invalid:

C:\Users\Administrateur>certutil -v -scinfo
Le gestionnaire de ressource des cartes à puce est en cours d’exécution.
État de la carte/lecteur actuel :
SCardListReaders: Le relais a reçu des données incorrectes. 0x6f7 (WIN32: 1783 RPC_X_BAD_STUB_DATA)
Échec de SCardListReaders pour SCARD_ALL_READERS
Aucune liste de lecteurs de carte à puce n’a pu être déterminée.

Terminé.
CertUtil : -SCInfo ÉCHEC de la commande : 0x6f7 (WIN32: 1783 RPC_X_BAD_STUB_DATA)
CertUtil: Le relais a reçu des données incorrectes.

C:\Users\Administrateur>

I'd expect a message saying "no card reader".

Looking at the code it seems like it is related to a bad encoding of NDR pointer when the pointer is empty: there should have a pointer record with a 0 length, instead of nothing like now. Patch to come (that will also fix other smartcard related stuff).

hardening avatar Aug 04 '21 21:08 hardening

Applying #7215 I have the expected answer:

C:\Users\Administrateur>certutil -v -scinfo
Le gestionnaire de ressource des cartes à puce est en cours d’exécution.
État de la carte/lecteur actuel :
SCardListReaders: Impossible de trouver un lecteur de carte à puce. 0x8010002e (-2146435026 SCARD_E_NO_READERS_AVAILABLE)
Échec de SCardListReaders pour SCARD_ALL_READERS
Aucun lecteur de carte à puce n’est disponible actuellement.

Terminé.
CertUtil : -SCInfo ÉCHEC de la commande : 0x8010002e (-2146435026 SCARD_E_NO_READERS_AVAILABLE)
CertUtil: Impossible de trouver un lecteur de carte à puce.

C:\Users\Administrateur>

hardening avatar Aug 05 '21 08:08 hardening

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Sep 24 '24 03:09 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Oct 25 '24 03:10 github-actions[bot]