MbedTLS linking issues with HashLink binaries on Linux

Open
#595 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, linux

Research direction

Start with the build and linking setup for ssl.hdll and the binaries compiled on Ubuntu 18.04; compare their MbedTLS dependencies with Ubuntu 20.04 and 22.04. Determine whether a portable dynamic-linking approach can preserve security updates; done means the binaries work across the stated Linux versions without obscuring the MbedTLS security concern.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C
Stars
911
Forks
207
Avg merge
1d 21h
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hashlink

All issues in HaxeFoundation/hashlink

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.