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

Segmentation fault on dice_device_enrollment #1608

Closed
bbpaulvanharen opened this issue Jul 30, 2020 · 2 comments
Closed

Segmentation fault on dice_device_enrollment #1608

bbpaulvanharen opened this issue Jul 30, 2020 · 2 comments

Comments

@bbpaulvanharen
Copy link

I've build dice_device_enrollment on a Ubuntu 18.04 LTS x86 computer.
OpenSSL version is 1.1.1.

Generating a certificate for individual enrollment is okay, generating a certificate for group enrollment results in a segmentation fault.

Would you like to do Individual (i) or Group (g) enrollments: g

root cert:
-----BEGIN CERTIFICATE-----
MIIB... ...5160FA=
-----END CERTIFICATE-----

Enter the Validation Code (Press enter when finished): 49... ...26

Program received signal SIGSEGV, Segmentation fault.

The stack trace of this crash is as follows:

#0 0x0000555555582848 in mbedtls_mpi_bitlen (X=0x7fffffffd5a0)
at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/deps/RIoT/Simulation/RIoT/Core/RIoTCrypt/bignum.c:422
#1 0x00005555555828b8 in mbedtls_mpi_size (X=0x7fffffffd5a0)
at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/deps/RIoT/Simulation/RIoT/Core/RIoTCrypt/bignum.c:435
#2 0x000055555557e972 in RiotCrypt_ExportEccPub (a=0x7fffffffd5a0, b=0x7fffffffd4b0 "h\r", s=0x7fffffffd464)
at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/deps/RIoT/Simulation/RIoT/Core/RIoTCrypt/RiotCrypt.c:370
#3 0x0000555555597776 in X509GetAliasCertTBS (Tbs=0x7fffffffd640, TbsData=0x7fffffffd5f0, AliasKeyPub=0x7fffffffd5a0, DevIdKeyPub=0x5555557fa0b0,
Fwid=0x5555557be1c0 <firmware_id> "k鱄\311\067\302\216\022.\356Q+", <incomplete sequence \352\216>, FwidLen=32)
at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/deps/RIoT/Simulation/RIoT/Core/RIoTCrypt/x509bldr.c:368
#4 0x000055555557ae12 in hsm_client_riot_create_leaf_cert (handle=0x5555557fa0b0, common_name=0x5555557fe6d0 "49D1962C5A22E3F29B694FBA41B642236C701D11A288D226")
at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/adapters/hsm_client_riot.c:823
#5 0x0000555555563367 in ca_root_certificate_info (hsm_handle=0x5555557fa0b0)
at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/tools/dice_device_enrollment/dice_device_enrollment.c:161
#6 0x000055555556345c in main () at /home/nlpaha/azure/azure-iot-sdk-c/provisioning_client/tools/dice_device_enrollment/dice_device_enrollment.c:198

@ewertons
Copy link
Contributor

ewertons commented Aug 3, 2020

Hi @bbpaulvanharen ,

thanks for reporting this issue. We will investigate in from our side, but just to help us debug it could you run your application (built with debug info) under valgrind?
Valgrind will give us a view of all the memory issues during runtime.

valgrind --leak-check=full --track-origins=yes <your application>

@ericwolz
Copy link
Contributor

ericwolz commented Oct 6, 2021

Closing due to inactivity. If you have the requested logs, please open a new issue to track this.

@ericwolz ericwolz closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants