]> git.ipfire.org Git - thirdparty/strongswan.git/commit
openssl: Prevent OpenSSL from using posix_memalign() if LD is enabled
authorTobias Brunner <tobias@strongswan.org>
Mon, 4 May 2026 13:06:49 +0000 (15:06 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 6 May 2026 08:46:43 +0000 (10:46 +0200)
commit8ff3238027f5774c74c8646e4226e38e8c2c6657
tree1a4d6ef53b646d8dfea2ac02191682f7ba01766f
parent374b17fe886ad1d031f429a1063e0a58847b31f3
openssl: Prevent OpenSSL from using posix_memalign() if LD is enabled

The leak detective doesn't wrap this function and calling the original
causes unknown memory frees and even segmentation faults.  This is now
triggered with OpenSSL 4 as the implementation of ECP256 uses
OPENSSL_aligned_alloc_array().

Setting a custom memory functions forces OpenSSL to implement aligned
allocations internally, using the registered allocation function.
src/libstrongswan/plugins/openssl/openssl_plugin.c