-
Notifications
You must be signed in to change notification settings - Fork 712
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
Memory corruption with firefox (reopen the bug #232) #409
Comments
frankmorgner
pushed a commit
to frankmorgner/OpenSC
that referenced
this issue
Mar 28, 2015
Unfortunately the pkcs11 module is really missing some parameter checks... Could you check if #410 fixes your problem? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I was able to reproduce the problem outlined in the bug #232
I'm running Firefox 36.0.4 on Windows 7 x64 with OpenSC 0.14.0 with a card for which I'm beginning to write a driver.
Insert the card triggers a crash few seconds after the insertion.
Tested with the binary version available on the website.
After an analysis, the crash occured when calling sc_pkcs11_get_mechanism_list from C_GetMechanismList as outline in the following capture
![bug](https://cloud.githubusercontent.com/assets/10632326/6872756/77c040e4-d4ab-11e4-8dc5-f7307e244dab.png)
Because slot->card is null, the application crashes in the line:
![sans titre](https://cloud.githubusercontent.com/assets/10632326/6872879/7f0546b4-d4ac-11e4-9628-a67a310dc2ec.png)
for (n = 0; n < p11card->nmechanisms; n++) { of the function sc_pkcs11_get_mechanism_list
I saw your comment about a probable defect in the NSS interface, but it should be possible to introduce a defense programming check and return an error if there is no card.
for example:
if (slot->card == NULL)
return CKR_TOKEN_NOT_PRESENT;
The bug is still present in the source code
regards,
Vincent LE TOUX
http:https://www.mysmartlogon.com
The text was updated successfully, but these errors were encountered: