-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
Description
After a reader disappears, RFReaderInfoById() (for example, called from SCardDisconnect()) might try dereferencing an READER_CONTEXT::handlesList value that's already destroyed by the hotplug thread in removeReader().
UAF place:
Line 860 in c35130f
| currentHandle = list_seek(&sReadersContexts[i]->handlesList, |
Deallocation place:
Line 699 in c35130f
| list_destroy(&sContext->handlesList); |
P.S. It should supposedly be a very rare corner case, since normally readers aren't plugged and unplugged very often, and the overlap with another SCard operation on another thread should have right timing in order to trigger the issue.