openssl: update from 3.0.8 to 3.1.0
cover openssl: update from 3.0.8 to 3.1.0
Cherry-pick patches from main and tested on arm32.
Randy MacLeod (1):
openssl: update from 3.0.8 to 3.1.0
Richard Purdie (1):
BACKPORT: openssl: Fix reproducibility issue
.../openssl/openssl/afalg.patch | 31 -------------------
.../openssl/openssl/fix_random_labels.patch | 22 +++++++++++++
.../{openssl_3.0.8.bb => openssl_3.1.0.bb} | 4 +--
3 files changed, 24 insertions(+), 33 deletions(-)
delete mode 100644 meta/recipes-connectivity/openssl/openssl/afalg.patch
create mode 100644 meta/recipes-connectivity/openssl/openssl/fix_random_labels.patch
rename meta/recipes-connectivity/openssl/{openssl_3.0.8.bb => openssl_3.1.0.bb} (98%)Signature · 1 line
2.25.1
PATCH 1/2 openssl: update from 3.0.8 to 3.1.0
From: Randy MacLeod <[email protected]>
Quoted 1 line
From the NEWS.md file:
### Major changes between OpenSSL 3.0 and OpenSSL 3.1.0 [14 Mar 2023]
* SSL 3, TLS 1.0, TLS 1.1, and DTLS 1.0 only work at security level 0.
* Performance enhancements and new platform support including new assembler code algorithm implementations.
* Deprecated LHASH statistics functions.
* FIPS 140-3 compliance changes.
Drop the upstreamed afalg.patch:
c425e365f4 Configure: don't try to be clever when configuring afalgeng
---
.../openssl/openssl/afalg.patch | 31 -------------------
.../{openssl_3.0.8.bb => openssl_3.1.0.bb} | 3 +-
2 files changed, 1 insertion(+), 33 deletions(-)
delete mode 100644 meta/recipes-connectivity/openssl/openssl/afalg.patch
rename meta/recipes-connectivity/openssl/{openssl_3.0.8.bb => openssl_3.1.0.bb} (98%)meta/recipes-connectivity/openssl/openssl/afalg.patch deleted +0 -31
@@ -1,31 +0,0 @@ -Don't refuse to build afalgeng if cross-compiling or the host kernel is too old. - -Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688] -Signed-off-by: Ross Burton <[email protected]> - -Index: openssl-3.0.4/Configure -=================================================================== ---- openssl-3.0.4.orig/Configure -+++ openssl-3.0.4/Configure -@@ -1681,20 +1681,7 @@ $config{CFLAGS} = [ map { $_ eq '--ossl- - unless ($disabled{afalgeng}) { - $config{afalgeng}=""; - if (grep { $_ eq 'afalgeng' } @{$target{enable}}) { -- my $minver = 4*10000 + 1*100 + 0; -- if ($config{CROSS_COMPILE} eq "") { -- my $verstr = `uname -r`; -- my ($ma, $mi1, $mi2) = split("\\.", $verstr); -- ($mi2) = $mi2 =~ /(\d+)/; -- my $ver = $ma*10000 + $mi1*100 + $mi2; -- if ($ver < $minver) { -- disable('too-old-kernel', 'afalgeng'); -- } else { -- push @{$config{engdirs}}, "afalg"; -- } -- } else { -- disable('cross-compiling', 'afalgeng'); -- } -+ push @{$config{engdirs}}, "afalg"; - } else { - disable('not-linux', 'afalgeng'); - }
meta/recipes-connectivity/openssl/openssl_3.1.0.bb renamed from meta/recipes-connectivity/openssl/openssl_3.0.8.bb +1 -2
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c75985e733726beaba57bc5253e96d04" SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://run-ptest \ file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ - file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ file://CVE-2023-0464.patch \ file://CVE-2023-0465.patch \
@@ -21,7 +20,7 @@ SRC_URI:append:class-nativesdk = " \ file://environment.d-openssl.sh \ " -SRC_URI[sha256sum] = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e" +SRC_URI[sha256sum] = "aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4" inherit lib_package multilib_header multilib_script ptest perlnative MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
Signature · 1 line
2.25.1
Yocto stable branch policy does not allow major component updates which introduce new features, it must be bugfixes only. Openssl 3.0.x is an LTS release and will be getting updates for a few more years.
https://www.openssl.org/source/
Alex
Quoted 98 lines · Maik Otto
From: Randy MacLeod <[email protected]>
Quoted 1 line
From the NEWS.md file:
### Major changes between OpenSSL 3.0 and OpenSSL 3.1.0 [14 Mar 2023]
* SSL 3, TLS 1.0, TLS 1.1, and DTLS 1.0 only work at security level 0.
* Performance enhancements and new platform support including new assembler code algorithm implementations.
* Deprecated LHASH statistics functions.
* FIPS 140-3 compliance changes.Drop the upstreamed afalg.patch:
c425e365f4Configure: don't try to be clever when configuring afalgengSigned-off-by Randy MacLeod <[email protected]>Signed-off-by Richard Purdie <[email protected]>--- .../openssl/openssl/afalg.patch | 31 ------------------- .../{openssl_3.0.8.bb => openssl_3.1.0.bb} | 3 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 meta/recipes-connectivity/openssl/openssl/afalg.patch rename meta/recipes-connectivity/openssl/{openssl_3.0.8.bb => openssl_3.1.0.bb} (98%)meta/recipes-connectivity/openssl/openssl/afalg.patch deleted +0
-31@@ -1,31 +0,0 @@ -Don't refuse to build afalgeng if cross-compiling or the host kernel is too old. - -Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688] -Signed-off-by: Ross Burton <[email protected]> - -Index: openssl-3.0.4/Configure -=================================================================== ---- openssl-3.0.4.orig/Configure -+++ openssl-3.0.4/Configure -@@ -1681,20 +1681,7 @@ $config{CFLAGS} = [ map { $_ eq '--ossl- - unless ($disabled{afalgeng}) { - $config{afalgeng}=""; - if (grep { $_ eq 'afalgeng' } @{$target{enable}}) { -- my $minver = 4*10000 + 1*100 + 0; -- if ($config{CROSS_COMPILE} eq "") { -- my $verstr = `uname -r`; -- my ($ma, $mi1, $mi2) = split("\\.", $verstr); -- ($mi2) = $mi2 =~ /(\d+)/; -- my $ver = $ma*10000 + $mi1*100 + $mi2; -- if ($ver < $minver) { -- disable('too-old-kernel', 'afalgeng'); -- } else { -- push @{$config{engdirs}}, "afalg"; -- } -- } else { -- disable('cross-compiling', 'afalgeng'); -- } -+ push @{$config{engdirs}}, "afalg"; - } else { - disable('not-linux', 'afalgeng'); - }meta/recipes-connectivity/openssl/openssl_3.1.0.bb renamed from meta/recipes-connectivity/openssl/openssl_3.0.8.bb +1
-3@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c75985e733726beaba57bc5253e96d04" SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://run-ptest \ file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ - file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ file://CVE-2023-0464.patch \ file://CVE-2023-0465.patch \@@ -21,7 +20,7 @@ SRC_URI:append:class-nativesdk = " \ file://environment.d-openssl.sh \ " -SRC_URI[sha256sum] = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e" +SRC_URI[sha256sum] = "aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4" inherit lib_package multilib_header multilib_script ptest perlnative MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" --2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181175): https://lists.openembedded.org/g/openembedded-core/message/181175
Mute This Topic: https://lists.openembedded.org/mt/98846329/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 2/2 BACKPORT: openssl: Fix reproducibility issue
In reply to Maik OttoFrom: Richard Purdie <[email protected]>
Fix an issue introduced in the new openssl version where an assembler file isn't generated in a reproducible way by seeding the perl random number generator consistently. It has no crypto impact, it is just used to avoid function name clashes.
(backported from 448df3e1c02fe224d62f59a236fdcd47ea7e695f
http://cgit.openembedded.org/openembedded-core master)
--- .../openssl/openssl/fix_random_labels.patch | 22 +++++++++++++++++++ .../openssl/openssl_3.1.0.bb | 1 + 2 files changed, 23 insertions(+) create mode 100644 meta/recipes-connectivity/openssl/openssl/fix_random_labels.patch
meta/recipes-connectivity/openssl/openssl/fix_random_labels.patch new file +22 -0
@@ -0,0 +1,22 @@ +The perl script adds random suffixes to the local function names to ensure +it doesn't clash with other parts of openssl. Set the random number seed +to something predictable so the assembler files are generated consistently +and our own reproducible builds tests pass. + +Upstream-Status: Pending +Signed-off-by: Richard Purdie <[email protected]> + +Index: openssl-3.1.0/crypto/modes/asm/aes-gcm-avx512.pl +=================================================================== +--- openssl-3.1.0.orig/crypto/modes/asm/aes-gcm-avx512.pl ++++ openssl-3.1.0/crypto/modes/asm/aes-gcm-avx512.pl +@@ -191,6 +191,9 @@ my $CTX_OFFSET_HTable = (16 * 6); + # ;;; Helper functions + # ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ++# Ensure the local labels are reproduicble ++srand(10000); ++ + # ; Generates "random" local labels + sub random_string() { + my @chars = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '_');
meta/recipes-connectivity/openssl/openssl_3.1.0.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://CVE-2023-0464.patch \ file://CVE-2023-0465.patch \ file://CVE-2023-0466.patch \ + file://fix_random_labels.patch \ " SRC_URI:append:class-nativesdk = " \
Signature · 1 line
2.25.1