Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chicony HP Skylab error in the protocol stream #39

Closed
alsot456 opened this issue Jun 8, 2018 · 7 comments
Closed

Chicony HP Skylab error in the protocol stream #39

alsot456 opened this issue Jun 8, 2018 · 7 comments

Comments

@alsot456
Copy link

alsot456 commented Jun 8, 2018

The same problem like (#48 ccid)
Rdesktop with Athena card and Chicony HP Skylab USB Smartcard Keyboard reader.
Debian stretch amd64 with libccid 1.4.29-2, athena's idprotectclient-633.00
This configuration works properly with two other readers.
With Chicony HP Skylab I've got Windows messages from asepkcs.dll exception code: 0xc0000409, "error in the protocol stream".
Debian syslog:
syslog_1.txt

and termdd:
t1a.txt

t3a.txt

pcsc_scan looks good

@LudovicRousseau
Copy link
Owner

I can't find any error in the pcscd logs.

You have some kernel errors: xhci_hcd 0000:00:14.0: WARN Event TRB for slot 2 ep 4 with no TDs queued? but that does not prevent the reader from returning an answer.

I don't think the problem is at the PC/SC layer. Maybe in the rdesktop protocol?

@LudovicRousseau
Copy link
Owner

Duplicate of LudovicRousseau/CCID#48 ?

@alsot456
Copy link
Author

alsot456 commented Jun 11, 2018

My kernel shows this xhci_hcd error with other working reader, so maybe this is not the reason. The library asepkcs.dll crashes with incorrect data. Rdesktop works properly on this system. I can log into Windows with another reader. Even with Chicony keyboard Rdesktop provides comunication with Windows, but generates an error in the protocol stream and stack overflow.
I suspect problem beetween pcsc and libusb:

pcscd[1387]: [50.198279] [0000056f] libusb: debug [handle_bulk_completion] abnormal reap: urb status -2

I've genetated pcsc/libusb log:
syslog_Err_4_1.log

and usbmon data:
u1Chico-out.log

At the moment I really do not know where to put the problem correctly.

@alsot456
Copy link
Author

There is a bug in Athenas library ascpkcs.dll (6.5.0.1) - smartcrad reader's name cannot exceed 64 char size.
If this happens, library crashes with stackoverflow.
This keyboard name is quite long,
and pcsc delivers thru rdp protocol concatenated string:
"Chicony HP Skylab USB Smartcard Keyboard [HP Skylab Smartcard Keyboard] (serialNumber..)"
which exceeds admissible length.
Smartcard readers with shorter names works fine with the same konfiguration,
but in this special case (HP Chickony keyboard wih athena smartcard with rdp connection to Windows Terminal Server crashes)

Testing solution:

  1. In my case with environment prepared for debugging:
    I've changed in file ../ ccid-1.4.29/readers/supported_readers.txt:

Chicony USB Smart Card Keyboard
Chicony HP Skylab USB Smartcard Keyboard

into somethig short (for example: X)
then I've got something like:
"X [HP Skylab Smartcard Keyboard] (serialNumber..)"

First line is working.

    • not tested, should work:
      Edit xml file: /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
      and make a change for short names

@alsot456 alsot456 reopened this Jun 13, 2018
@LudovicRousseau
Copy link
Owner

@alsot456 why do you repopen this bug if you know the problem is in ascpkcs.dll?

@alsot456
Copy link
Author

The bug is really in ascpkcs.dll
In my opinion resolving problem on linux client side is much faster than waiting for ascpkcs.dll correctin.
Probably people with similar problem will start looking for solution in ccid/pcsc projects at first.

Maybe you'll want to decide about changes in your code

@LudovicRousseau
Copy link
Owner

Not a PCSC issue.
People could find information here by any good web search engine.
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants