Changes regarding (debug) symbols in 3.8.x? #4868
-
|
Building against 3.8.1 required enabling backtraces via libbfd to whitelist functions in our own leak detective (instead of just using A second thing I had to change was whitelisting Can you point me to the changes between 3.7.1 and 3.8.1 that caused either or both of these things? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Any change that caused a behavioral difference in this way was not intentional. There were between 3.7.1 and 3.8.1 no change in compiler flags used (with the sole exception relating to LoongArch SIMD instructions, and only used on that architecture). Generating In comparing the behavior of 3.7.1 vs 3.8.1 are you using the same version of GCC, same options, etc? |
Beta Was this translation helpful? Give feedback.
-
|
I managed to reproduce this in the GitHub Actions in our fork of strongswan as well as using a docker container (see below). Based on the reproducer, The detected leak (72 bytes) is an error message from a caught exception, namely "PKCS #8 private key decoding failed with Unknown PKCS #8 version number", that the FFI wrapper stores in a global thread-local variable: Lines 90 to 92 in df91b27 ... my best guess: this is the reason why DetailsRelevant log message of failed GitHub ActionDockerfile used for local reproductionSimply run FROM ubuntu:24.04
RUN apt update -y && apt upgrade -y
RUN apt install -y \
autoconf \
automake \
binutils-dev \
bison \
clearsilver-dev \
flex \
git \
gperf \
libcurl4-gnutls-dev \
libfcgi-dev \
libgcrypt20-dev \
libgmp-dev \
libiptc-dev \
libjson-c-dev \
libldap2-dev \
libldns-dev \
libmysqlclient-dev \
libnm-dev \
libpam0g-dev \
libpcsclite-dev \
libselinux1-dev \
libsoup-3.0-dev \
libsqlite3-dev \
libsystemd-dev \
libtool \
libtspi-dev \
libunbound-dev \
pkgconf \
python3-build \
ruby-rubygems \
tox
RUN echo "building botan..." && \
git clone https://github.com/randombit/botan.git botan && \
cd botan && \
git checkout -qf 7322df4ff6cd4e92a8ef85040cb47f58e9dea398 && \
./configure.py --without-os-features=threads \
--disable-modules=locking_allocator \
--disable-modules=pkcs11,tls,x509,xmss \
--disable-deprecated-features \
--enable-modules=md5 \
--prefix=/usr/local \
--build-targets=static,shared && \
make -j$(nproc) libs && \
make install && \
ldconfig
RUN echo "testing strongswan..." && \
git clone https://github.com/strongswan/strongswan.git strongswan && \
cd strongswan && \
./autogen.sh && \
CC=gcc CFLAGS="-g -O2" ./configure \
--disable-defaults \
--enable-pki \
--enable-botan \
--enable-pem \
--enable-hmac \
--enable-x509 \
--enable-constraints \
--enable-drbg \
--disable-dependency-tracking \
--enable-silent-rules \
--enable-test-vectors \
--enable-monolithic=no \
--enable-leak-detective=yes \
--disable-asan && \
TESTS_SUITES=ecdsa make check |
Beta Was this translation helpful? Give feedback.
I managed to reproduce this in the GitHub Actions in our fork of strongswan as well as using a docker container (see below). Based on the reproducer,
git bisectpoints to 7322df4 as the commit that introduced this.The detected leak (72 bytes) is an error message from a caught exception, namely "PKCS #8 private key decoding failed with Unknown PKCS #8 version number", that the FFI wrapper stores in a global thread-local variable:
botan/src/lib/ffi/ffi.cpp
Lines 90 to 92 in df91b27
... my best guess: this is the reason why
botan_private_key_loadwa…