opendnssec / SoftHSMv2

SoftHSM version 2
http://www.softhsm.org/
Other
767 stars 339 forks source link

Fix numerous segfaults while running pkcs11test and p11-test #706

Open RickyDoug opened 1 year ago

RickyDoug commented 1 year ago

It would be really awesome if this library could run against a PKCS11 test suite without seg-faulting. I fixed several segfaults during this test: pkcs11 google test but the current one is happening somewhere in libcrypto. There are many instances where pTemplate is just being used without checking for NULL. Most of these are in SoftHSM.cpp, and can be caught at a high level. extractObjectInformation, C_FindObjectsInit, C_Encrypt so far. After those are fixed, the Google test suite fails at OSSLRSA::Encrypt. p11-test will locks up unless the C_Initialize args are NULL, but it too segfaults until the above issues are fixed.

This is just to run the tests, not to fix the failures from the tests themselves.

bharsaklemukesh975 commented 1 year ago

Can I work on this?