Skip to content
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

HandleManager 'No such file or directory', segmentation fault #773

Open
NickDarvey opened this issue Dec 2, 2024 · 0 comments
Open

HandleManager 'No such file or directory', segmentation fault #773

NickDarvey opened this issue Dec 2, 2024 · 0 comments

Comments

@NickDarvey
Copy link

I'm trying to use SoftHSMv2 in OpenSSL via pkcs11-provider. I'm building SoftHSMv2 from source, a181dae. When I try to sign something I get a seg fault.

root@d9a3a7531a3c:/# echo "test" > test.txt
   openssl pkeyutl -provider softhsm -sign -inkey "pkcs11:object=test;type=private" -in test.txt -out signature.bin
Enter pass phrase for PKCS#11 Token (Slot 479520929 - SoftHSM slot ID 0x1c94e8a1):
Segmentation fault (core dumped)

Running it under gdb, It looks like it's this line that is failing. (gdb output below.)

MutexLocker lock(handlesMutex);

This may be related, #635 (comment).

Stack trace ``` root@d9a3a7531a3c:/# gdb openssl GNU gdb (Debian 13.1-3) 13.1 [...] (gdb) run pkeyutl -provider softhsm -sign -inkey "pkcs11:object=test;type=private" -in test.txt -out signature.bin Starting program: /usr/local/bin/openssl pkeyutl -provider softhsm -sign -inkey "pkcs11:object=test;type=private" -in test.txt -out signature.bin [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". Enter pass phrase for PKCS#11 Token (Slot 479520929 - SoftHSM slot ID 0x1c94e8a1):

Program received signal SIGSEGV, Segmentation fault.
0x0000fffff77018c8 in HandleManager::getSession (this=0x0, hSession=hSession@entry=1) at HandleManager.cpp:75
75 HandleManager.cpp: No such file or directory.


</details>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant