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

MbedTLS linking issues with HashLink binaries on Linux #595

Open
tobil4sk opened this issue Mar 21, 2023 · 2 comments
Open

MbedTLS linking issues with HashLink binaries on Linux #595

tobil4sk opened this issue Mar 21, 2023 · 2 comments

Comments

@tobil4sk
Copy link
Member

Since the binaries are currently compiled on Ubuntu 18.04 which has mbedtls 2.8.0, ssl.hdll is linked to libmbedtls.so.10. Ubuntu 20.04 has libmbedtls.so.12, and Ubuntu 22.04 has libmbedtls.so.14, which is the current version for MbedTLS 2. This means that if hashlink continues to link mbedtls dynamically, the binaries cannot work on all versions of Linux at once. Even MbedTLS 3 seems to change the .so name with every minor release: https://abi-laboratory.pro/?view=timeline&l=mbedtls

We could start linking mbedtls statically, but that means the mbedtls version will be stuck at whatever hashlink was compiled with, which is a security concern.

This is possibly the root cause of issues like #590.

@ncannasse
Copy link
Member

ncannasse commented Mar 21, 2023 via email

@tobil4sk
Copy link
Member Author

Every time the .so.x number changes, it signifies that the abi compatibility has been broken. This prevents old binaries from trying to load the new incompatible library. MbedTLS seems to break compatibility very often (or at least, they change the .so number very often).

https://unix.stackexchange.com/questions/475/how-do-so-shared-object-numbers-work

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

2 participants