-
Notifications
You must be signed in to change notification settings - Fork 716
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
opensc-pkcs11 driver crashes with cardos 5.0 card #547
Comments
looks like at pkcs15.c: line 427 strstr(p15card->tokeninfo->label,"D-TRUST") The routine should check that the label is not NULL. If the card has not been initialized or for some other reason the label may never have set label. I am also surprised that a card specific routine is called from pkcs15.c On 9/9/2015 9:20 AM, Laurent Bigonville wrote:
Douglas E. Engert [email protected] |
why the heck is |
Looks like the p15card->tokeninfo is not initialized at all: (gdb) p *p15card->tokeninfo
$2 = {version = 0, flags = 0, label = 0x0, serial_number = 0x0, manufacturer_id = 0x0, last_update = {gtime = 0x0, path = {value = '\000' <repeats 15 times>, len = 0, index = 0, count = 0, type = 0, aid = {
value = '\000' <repeats 15 times>, len = 0}}}, profile_indication = {oid = {value = {-1 <repeats 16 times>}}, name = 0x0}, preferred_language = 0x0, seInfo = 0x0, num_seInfo = 0, supported_algos = {{
reference = 0, mechanism = 0, operations = 0, algo_id = {value = {0 <repeats 16 times>}}, algo_ref = 0}, {reference = 0, mechanism = 0, operations = 0, algo_id = {value = {0 <repeats 16 times>}},
algo_ref = 0}, {reference = 0, mechanism = 0, operations = 0, algo_id = {value = {0 <repeats 16 times>}}, algo_ref = 0}, {reference = 0, mechanism = 0, operations = 0, algo_id = {value = {
0 <repeats 16 times>}}, algo_ref = 0}, {reference = 0, mechanism = 0, operations = 0, algo_id = {value = {0 <repeats 16 times>}}, algo_ref = 0}, {reference = 0, mechanism = 0, operations = 0,
algo_id = {value = {0 <repeats 16 times>}}, algo_ref = 0}, {reference = 0, mechanism = 0, operations = 0, algo_id = {value = {0 <repeats 16 times>}}, algo_ref = 0}, {reference = 0, mechanism = 0,
operations = 0, algo_id = {value = {0 <repeats 16 times>}}, algo_ref = 0}}} With the patch from PR #549, it's not crashing anymore |
maybe the TokenInfo file is missing on your card. I'll merge the fix. |
Hello,
When running pkcs11-tool -I with a cardos 5 card connected to it, the driver is crashing. This is annoying as it make firefox crashes when the opensc-pkcs11 driver is loaded in it.
When compiling the git HEAD and running it in gdb, I'm getting the following backtrace:
The text was updated successfully, but these errors were encountered: