Friday, December 12, 2014

OS X Yosemite and smart cards: known bugs

Yosemite: OS X 10.10

Yosemite contains a rewrite of pcsc-lite. See "OS X Yosemite and smart cards status". The problem is that the rewrite introduced (many) bugs.

Bug list

I will list known (by me) bugs and will try to maintain the list in the future if/when the bugs are fixed.

  1. SCardDisconnect

Fixed in OS X 10.10.2

  1. SCardReconnect(..., SCARD_RESET_CARD, ...)
  2. SCardBeginTransaction() after a card reset
  3. SCardStatus() after a card reset
  4. SCardStatus returns SCARD_E_INSUFFICIENT_BUFFER
  5. SCARD_E_PROTO_MISMATCH not returned
  6. T=0 is used instead of T=1 on dual protocol cards

Fixed in OS X 10.10.3

  1. SCardTransmit returns SCARD_W_UNPOWERED_CARD

Fixed in El Capitan 10.11.0

  1. SCardGetAttrib
  2. SCardTransmit (pioSendPci not checked)
  3. SCardGetStatusChange blocks forever
  4. OS X Yosemite bug: SCardConnect blocks in SCARD_SHARE_SHARED mode

Bugs that will not be fixed

  1. PC/SC functions crash after a fork(2)

Conclusion

I hope the bugs will be fixed during Yosemite lifetime. But I am afraid it will not happen before the next major version of OS X (OS X 10.11) is out.

This reminds me when Mac OS X 10.5 Leopard has been released in 2007 with lots of important bugs like ATR corruption. At that time it was also a major deviation from pcsc-lite. See "Evolution of Apple pcsc-lite (from Jaguar to Mavericks)".