package/libressl: bump version to 4.4.0
PATCH v3 1/1 package/libressl: bump version to 4.4.0
- bump version to 4.4.0 (for details see [1])
- enable 'ENABLE_ASM=OFF' for aarch64, fixes (for some combinations of
gcc/binutils/target-cpu):
bootlin-aarch64-glibc-old/build/libressl-4.4.0/crypto/sha/sha1_aarch64_ce.S:105: Error: unknown architectural extension sha2' bootlin-aarch64-glibc-old/build/libressl-4.4.0/crypto/sha/sha1_aarch64_ce.S:156: Error: selected processor does not support sha1c q18,s19,v28.4s'
- handle stack protector/ENABLE_HARDENING flag, fixes "undefined reference to `__stack_chk_fail_local'"
[1] https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.4.0-relnotes.txt
---
Changes v2 -> v3:
- fix 'ENABLE_ASM=OFF' comment formating
Changes v1 -> v2:
- enable 'ENABLE_ASM=OFF' for aarch64
- handle stack protector/ENABLE_HARDENING flag
--- package/libressl/libressl.hash | 2 +- package/libressl/libressl.mk | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-)
package/libressl/libressl.hash +1 -1
@@ -1,4 +1,4 @@ # From https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/SHA256 -sha256 57c8b2f8c6f9505587abaeddab003ea243d615edb7ed71957968121fc6316bd6 libressl-4.3.4.tar.gz +sha256 7d02522ad5070b9adb32eb253ecabce181184a3750cf65abac0675ee908687c1 libressl-4.4.0.tar.gz # Locally computed sha256 9853507b8821c3f277aa60bf554eade41441ef06b2df538d247183ad28789b7f COPYING
package/libressl/libressl.mk +11 -3
@@ -4,7 +4,7 @@ # ################################################################################ -LIBRESSL_VERSION = 4.3.4 +LIBRESSL_VERSION = 4.4.0 LIBRESSL_SITE = https://ftp.openbsd.org/pub/OpenBSD/LibreSSL LIBRESSL_LICENSE = ISC (new additions), OpenSSL or SSLeay (original OpenSSL code) LIBRESSL_LICENSE_FILES = COPYING
@@ -13,11 +13,19 @@ LIBRESSL_INSTALL_STAGING = YES LIBRESSL_CONF_OPTS = -DLIBRESSL_TESTS=OFF -DOPENSSLDIR="/etc/ssl" # Otherwise fails to build with undefined reference to -# `bn_mul_add_words' -ifeq ($(BR2_powerpc)$(BR2_mips64)$(BR2_mips64el),y) +# `bn_mul_add_words' or for some aarch64 combinations (gcc/binutils/target-cpu) +# with "Error: unknown architectural extension `sha2' +ifeq ($(BR2_aarch64)$(BR2_powerpc)$(BR2_mips64)$(BR2_mips64el),y) LIBRESSL_CONF_OPTS += -DENABLE_ASM=OFF endif +# Avoid linking problem: "undefined reference to `__stack_chk_fail_local'" +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) +LIBRESSL_CONF_OPTS += -DENABLE_HARDENING=ON +else +LIBRESSL_CONF_OPTS += -DENABLE_HARDENING=OFF +endif + ifeq ($(BR2_PACKAGE_LIBRESSL_BIN),) define LIBRESSL_REMOVE_BIN $(RM) -f $(TARGET_DIR)/usr/bin/openssl
Signature · 6 lines
2.56.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
package/libressl/libressl.mk LIBRESSL_INSTALL_STAGING = YES · line 27
Quoted 6 lines · Peter Seiderer via buildroot
package/libressl/libressl.mk +6
-0+# Avoid linking problem: "undefined reference to `__stack_chk_fail_local'" +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) +LIBRESSL_CONF_OPTS += -DENABLE_HARDENING=ON +else +LIBRESSL_CONF_OPTS += -DENABLE_HARDENING=OFF +endif
This should most likely be an unconditional -DENABLE_HARDENING=OFF. Indeed, we have a global BR2_SSP_NONE / BR2_SSP_REGULAR / BR2_SSP_STRONG / BR2_SSP_ALL that decides whether we want SSP or not.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
Quoted 13 lines · Thomas Petazzoni
package/libressl/libressl.mk LIBRESSL_INSTALL_STAGING = YES · line 27
Quoted 6 lines · Peter Seiderer via buildroot
package/libressl/libressl.mk +6
-0+# Avoid linking problem: "undefined reference to `__stack_chk_fail_local'" +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) +LIBRESSL_CONF_OPTS += -DENABLE_HARDENING=ON +else +LIBRESSL_CONF_OPTS += -DENABLE_HARDENING=OFF +endifThis should most likely be an unconditional -DENABLE_HARDENING=OFF. Indeed, we have a global
BR2_SSP_NONE/BR2_SSP_REGULAR/BR2_SSP_STRONG/BR2_SSP_ALLthat decides whether we want SSP or not.
Same for all other packages?
package/aircrack-ng/aircrack-ng.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
package/botan/botan.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
package/btop/btop.mk:ifneq ($(BR2_TOOLCHAIN_HAS_SSP),y) package/linux-tools/linux-tool-rtla.mk.in:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),) package/linux-tools/linux-tool-tmon.mk.in:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)package/monit/monit.mk: ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) \
package/mosh/mosh.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
package/ntp/ntp.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)package/powerpc-utils/powerpc-utils.mk: ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) package/psmisc/psmisc.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
package/radvd/radvd.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
package/ruby/ruby.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
package/stunnel/stunnel.mk: ax_cv_check_cflags___fstack_protector_strong=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) \ package/vlc/vlc.mk: ax_cv_check_cflags___fstack_protector_strong=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)
Regards,
Peter
Quoted 4 lines
Thanks!
Thomas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 12 lines · Peter Seiderer
package/aircrack-ng/aircrack-ng.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
package/botan/botan.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
package/btop/btop.mk:ifneq ($(BR2_TOOLCHAIN_HAS_SSP),y) package/linux-tools/linux-tool-rtla.mk.in:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),) package/linux-tools/linux-tool-tmon.mk.in:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)package/monit/monit.mk: ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) \
package/mosh/mosh.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
package/ntp/ntp.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)package/powerpc-utils/powerpc-utils.mk: ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) package/psmisc/psmisc.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
package/radvd/radvd.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
package/ruby/ruby.mk:ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
Quoted 2 lines
package/stunnel/stunnel.mk: ax_cv_check_cflags___fstack_protector_strong=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) \ package/vlc/vlc.mk: ax_cv_check_cflags___fstack_protector_strong=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)
In theory, I would say yes. But of course, it's hard to have a general judgment. When I say for example:
ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)NTP_CONF_OPTS += --with-hardenfile=linux
elseNTP_CONF_OPTS += --with-hardenfile=default
endif
it all depends on what this hardenfile option actually does.
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot