-
Notifications
You must be signed in to change notification settings - Fork 711
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
Minidriver crash if p15card->app is not set #3084
Comments
Can you propose the change as a PR? |
I think this part is not fixed in #3077 as it is not completely related. Can you open a separate PR for this fix? |
jozsefd
added a commit
to jozsefd/OpenSC
that referenced
this issue
Apr 2, 2024
1 task
Opened PR #3095 with the suggested fix. |
xhanulik
pushed a commit
to xhanulik/OpenSC
that referenced
this issue
Apr 4, 2024
Jakuje
pushed a commit
that referenced
this issue
Apr 4, 2024
xhanulik
pushed a commit
to xhanulik/OpenSC
that referenced
this issue
Apr 4, 2024
xhanulik
pushed a commit
to xhanulik/OpenSC
that referenced
this issue
Apr 4, 2024
(cherry picked from commit 1f0af54)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Description
If the card is using a PKCS15 Emulator where the optional pointer to the sc_app_info in the sc_pkcs15_card structure is not set then the minidriver crashes. The function get_pin_by_name will crash, the log will look like:
P:10156; T:9336 2024-03-20 15:48:59.567 [cardmod] MD_Function:md_get_pin_by_role:541 called
P:10156; T:9336 2024-03-20 15:48:59.567 [cardmod] MD_Function:get_pin_by_name:499 called
Proposed Resolution
Add a check for the pointer. All other references to this pointer check it already.
Steps to reproduce
Insert a card which uses an emulator, not setting the p15card->app (e.g. nqApplet) and try to load the minidriver, like "certutil /scinfo".
Logs
P:10156; T:9336 2024-03-20 15:48:59.567 [cardmod] MD_Function:md_get_pin_by_role:541 called
P:10156; T:9336 2024-03-20 15:48:59.567 [cardmod] MD_Function:get_pin_by_name:499 called
The text was updated successfully, but these errors were encountered: