[SERVER-65902] csfle library: initialization segfaults on Amazon2 arm64 Created: 22/Apr/22  Updated: 29/Oct/23  Resolved: 04/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.0-rc1
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Anna Henningsen Assignee: Sergey Galtsev (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-63703 csfle library: remove unnecessary libs Closed
Related
related to SERVER-65898 csfle library: initialization fails w... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

https://gist.github.com/addaleax/c3bdcab028a42d1f32455a9436a1c298, run on amazon2-arm64-small (note that the steps to repro are exactly the same as SERVER-65898 up to filename adjustments)

Sprint: Security 2022-05-02, Security 2022-05-16
Participants:

 Description   

This is very similar to SERVER-65898, feel free to close if it is a proper duplicate.

This only happens with Node.js, where OpenSSL is linked statically.

Thread 1 "node" received signal SIGSEGV, Segmentation fault.
0x0000ffffbf0ba5c0 in memset () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install keyutils-libs-1.5.8-3.amzn2.0.2.aarch64 krb5-libs-1.15.1-37.amzn2.2.4.aarch64 libcom_err-1.42.9-19.amzn2.aarch64 libgcc-7.3.1-13.amzn2.aarch64 libselinux-2.5-12.amzn2.0.2.aarch64 libstdc++-7.3.1-13.amzn2.aarch64 openssl-libs-1.0.2k-24.amzn2.0.2.aarch64 pcre-8.32-17.amzn2.0.2.aarch64 zlib-1.2.7-19.amzn2.0.1.aarch64
(gdb) bt
#0  0x0000ffffbf0ba5c0 in memset () from /lib64/libc.so.6
#1  0x0000ffffbc351b2c in EVP_MD_CTX_cleanup () from /lib64/libcrypto.so.10
#2  0x0000ffffb54b4134 in (anonymous namespace)::EVP_MD_CTX_free(env_md_ctx_st*) () from /tmp/lib/mongo_csfle_v1.so
#3  0x0000ffffb54b4524 in mongo::SHA256BlockTraits::computeHash(std::initializer_list<mongo::ConstDataRange>, mongo::MakeArrayType<unsigned char, 32ul, mongo::SHA256BlockTraits>*) ()
   from /tmp/lib/mongo_csfle_v1.so
#4  0x0000ffffb4407d9c in _GLOBAL__sub_I_logical_session_id_helpers.cpp () from /tmp/lib/mongo_csfle_v1.so
#5  0x0000ffffbf4ccfb4 in call_init.part () from /lib/ld-linux-aarch64.so.1
#6  0x0000ffffbf4cd0b0 in _dl_init () from /lib/ld-linux-aarch64.so.1
#7  0x0000ffffbf4d186c in dl_open_worker () from /lib/ld-linux-aarch64.so.1
#8  0x0000ffffbf14bd60 in _dl_catch_error () from /lib64/libc.so.6
#9  0x0000ffffbf4d0da8 in _dl_open () from /lib/ld-linux-aarch64.so.1
#10 0x0000ffffbf49f084 in dlopen_doit () from /lib64/libdl.so.2
#11 0x0000ffffbf14bd60 in _dl_catch_error () from /lib64/libc.so.6
#12 0x0000ffffbf49f7d0 in _dlerror_run () from /lib64/libdl.so.2
#13 0x0000ffffbf49f120 in dlopen@@GLIBC_2.17 () from /lib64/libdl.so.2
#14 0x0000ffffbc4c8080 in mcr_dll_open () from /tmp/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node
#15 0x0000ffffbc4c5844 in ?? () from /tmp/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node
#16 0x0000ffffbc4c6130 in _try_find_csfle () from /tmp/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node
#17 0x0000ffffbc4c6a88 in ?? () from /tmp/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node
#18 0x0000ffffbc4c6cf4 in mongocrypt_init () from /tmp/node_modules/mongodb-client-encryption/build/Release/mongocrypt.node



 Comments   
Comment by Sergey Galtsev (Inactive) [ 04/May/22 ]

fixed by https://jira.mongodb.org/browse/SERVER-63703

Generated at Thu Feb 08 06:03:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.