-
Notifications
You must be signed in to change notification settings - Fork 24
Core dump (corrupted double-linked list) in p11tool occurs only when no tpm2-pk11 log file specified #61
Comments
The log file path that started with
is not yet supported. |
I'm hitting this issue even with a logfile provided. For what it's worth, firefox also crashes when loading the module. |
I'm having a similar issue, but I'm not sure if I'm experiencing the same bug. The output from p11tool is:
I have compiled the library with debug symbols and run it through gdb: The crash occurs when the library tries to free the
It seems like the session that p11tool is trying to close was created erroneously. Below is the flow of session_init for the session that is later closed.
As you can see here, the I also noticed that when we fail to initialize the session, we don't free the allocated memory, but I'm not sure if that is correct or not. The funny thing here is that the library reports the error to the upper layer (i.e. returns Anyway, I hope this helps, and I can provide more information regarding this if needed. EDIT: Forgot to add the last line of the long comment. |
rc: 655370 == 0xA000A
|
Thanks for your work on this project 馃憤
Noticed a small (and strange) bug. When no log file is specified in the tpm2-pk11 config file, there is a core dump upon attempting to list the available certificates from p11tool. I have isolated the issue to the
log
key within the config file being absent.Initial config file:
Attempting to list certificates (one is created, present, and working in Firefox per wiki instructions) results in:
If a log file is defined (by adding the below to the config file):
log ~/.tpm2/logfile.txt
then there is no corrupted double-linked list, and no resulting core dump. I can reproduce this by removing and adding the above line from the config as required.
Additionally, in testing, I found the
log
parameter requires an absolute path (i.e. cannot accept~/.tpm2/log.txt
), otherwise no output is created.The text was updated successfully, but these errors were encountered: