Fixes for Thud
cover Fixes for Thud
These are backports and Secruity fixes for thud already in Warrior or not affecting the versions in warrior.
Adrian Bunk (1):
gnutls: upgrade 3.6.5 -> 3.6.7
Armin Kuster (4):
glibc: Security fix CVE-2019-9169
elfutils: Security fixes CVE-2019-7146,7149,7150
gnutls: update to 3.6.5
nettle: update to 3.4.1
Mingli Yu (2):
nettle: fix ptest failure
nettle: fix the Segmentation fault
Richard Purdie (1):
Revert "nettle: fix ptest failure"
Ross Burton (1):
gnutls: no need to inherit binconfig
meta/recipes-core/glibc/glibc/CVE-2019-9169.patch | 63 +++++++++
meta/recipes-core/glibc/glibc_2.28.bb | 1 +
meta/recipes-devtools/elfutils/elfutils_0.175.bb | 4 +
.../elfutils/files/CVE-2019-7146_p1.patch | 52 ++++++++
.../elfutils/files/CVE-2019-7146_p2.patch | 65 +++++++++
.../elfutils/files/CVE-2019-7149.patch | 148 +++++++++++++++++++++
.../elfutils/files/CVE-2019-7150.patch | 51 +++++++
.../gnutls/{gnutls_3.6.4.bb => gnutls_3.6.7.bb} | 9 +-
...d-target-to-only-build-tests-not-run-them.patch | 0
...k-header-files-of-openssl-only-if-enable_.patch | 0
.../{nettle-3.4 => nettle-3.4.1}/dlopen-test.patch | 0
.../nettle/{nettle-3.4 => nettle-3.4.1}/run-ptest | 0
.../nettle/{nettle_3.4.bb => nettle_3.4.1.bb} | 5 +-
13 files changed, 391 insertions(+), 7 deletions(-)
create mode 100644 meta/recipes-core/glibc/glibc/CVE-2019-9169.patch
create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7146_p1.patch
create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7146_p2.patch
create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7149.patch
create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7150.patch
rename meta/recipes-support/gnutls/{gnutls_3.6.4.bb => gnutls_3.6.7.bb} (84%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/Add-target-to-only-build-tests-not-run-them.patch (100%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/check-header-files-of-openssl-only-if-enable_.patch (100%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/dlopen-test.patch (100%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/run-ptest (100%)
rename meta/recipes-support/nettle/{nettle_3.4.bb => nettle_3.4.1.bb} (90%)Signature · 1 line
2.7.4
PATCH 1/9 glibc: Security fix CVE-2019-9169
From: Armin Kuster <[email protected]>
--- meta/recipes-core/glibc/glibc/CVE-2019-9169.patch | 63 +++++++++++++++++++++++ meta/recipes-core/glibc/glibc_2.28.bb | 1 + 2 files changed, 64 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/CVE-2019-9169.patch
meta/recipes-core/glibc/glibc/CVE-2019-9169.patch new file +63 -0
@@ -0,0 +1,63 @@ +From 583dd860d5b833037175247230a328f0050dbfe9 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <[email protected]> +Date: Mon, 21 Jan 2019 11:08:13 -0800 +Subject: [PATCH] regex: fix read overrun [BZ #24114] + +Problem found by AddressSanitizer, reported by Hongxu Chen in: +https://debbugs.gnu.org/34140 +* posix/regexec.c (proceed_next_node): +Do not read past end of input buffer. + +Upstream-Status: Backport +https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=583dd860d5b833037175247230a328f0050dbfe9 + +CVE: CVE-2019-9169 +Signed-off-by: Armin Kuster <[email protected]> + +--- + ChangeLog | 10 +++++++++- + posix/regexec.c | 6 ++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +Index: git/ChangeLog +=================================================================== +--- git.orig/ChangeLog ++++ git/ChangeLog +@@ -1,3 +1,11 @@ ++2019-01-31 Paul Eggert <[email protected]> ++ ++ regex: fix read overrun [BZ #24114] ++ Problem found by AddressSanitizer, reported by Hongxu Chen in: ++ https://debbugs.gnu.org/34140 ++ * posix/regexec.c (proceed_next_node): ++ Do not read past end of input buffer. ++ + 2018-09-30 Martin Jansa <[email protected]> + Partial fix for [BZ #23716] + * locale/weight.h: Fix build with -Os. +@@ -10917,7 +10925,7 @@ + (CFLAGS-wcstof_l.c): Likewise. + (CPPFLAGS-tst-wchar-h.c): Likewise. + (CPPFLAGS-wcstold_l.c): Likewise. +---- ++ + 2017-12-11 Paul A. Clarke <[email protected]> + + * sysdeps/ieee754/flt-32/s_cosf.c: New implementation. +Index: git/posix/regexec.c +=================================================================== +--- git.orig/posix/regexec.c ++++ git/posix/regexec.c +@@ -1289,8 +1289,10 @@ proceed_next_node (const re_match_contex + else if (naccepted) + { + char *buf = (char *) re_string_get_buffer (&mctx->input); +- if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, +- naccepted) != 0) ++ if (mctx->input.valid_len - *pidx < naccepted ++ || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, ++ naccepted) ++ != 0)) + return -1; + } + }
meta/recipes-core/glibc/glibc_2.28.bb +1 -0
@@ -47,6 +47,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0032-sysdeps-ieee754-soft-fp-ignore-maybe-uninitialized-w.patch \ file://0033-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ file://0034-inject-file-assembly-directives.patch \ + file://CVE-2019-9169.patch \ " NATIVESDKFIXES ?= ""
Signature · 1 line
2.7.4
PATCH 2/9 elfutils: Security fixes CVE-2019-7146, 7149, 7150
In reply to Armin KusterFrom: Armin Kuster <[email protected]>
Source: http://sourceware.org/git/elfutils.git
MR: 97563, 97568, 97558
Type: Security Fix
Disposition: Backport from http://sourceware.org/git/elfutils.git
ChangeID: 6183c2a25d5e32eec1846a428dd165e1de659f24 Description:
Affects <= 0.175
Fixes:
CVE-2019-7146
CVE-2019-7149
CVE-2019-7150
--- meta/recipes-devtools/elfutils/elfutils_0.175.bb | 4 + .../elfutils/files/CVE-2019-7146_p1.patch | 52 ++++++++ .../elfutils/files/CVE-2019-7146_p2.patch | 65 +++++++++ .../elfutils/files/CVE-2019-7149.patch | 148 +++++++++++++++++++++ .../elfutils/files/CVE-2019-7150.patch | 51 +++++++ 5 files changed, 320 insertions(+) create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7146_p1.patch create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7146_p2.patch create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7149.patch create mode 100644 meta/recipes-devtools/elfutils/files/CVE-2019-7150.patch
meta/recipes-devtools/elfutils/elfutils_0.175.bb +4 -0
@@ -27,6 +27,10 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ file://debian/hurd_path.patch \ file://debian/ignore_strmerge.diff \ file://debian/disable_werror.patch \ + file://CVE-2019-7149.patch \ + file://CVE-2019-7150.patch \ + file://CVE-2019-7146_p1.patch \ + file://CVE-2019-7146_p2.patch \ " SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
meta/recipes-devtools/elfutils/files/CVE-2019-7146_p1.patch new file +52 -0
52 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/CVE-2019-7146_p2.patch new file +65 -0
65 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/CVE-2019-7149.patch new file +148 -0
148 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/CVE-2019-7150.patch new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 3/9 gnutls: no need to inherit binconfig
In reply to Armin KusterFrom: Ross Burton <[email protected]>
This recipe doesn't ship a *-config binary, so don't inherit binconfig.
--- meta/recipes-support/gnutls/gnutls_3.6.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/gnutls/gnutls_3.6.4.bb +1 -1
@@ -24,7 +24,7 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar SRC_URI[md5sum] = "63363d1c00601f4d11a5cadc8b5e0799" SRC_URI[sha256sum] = "c663a792fbc84349c27c36059181f2ca86c9442e75ee8b0ad72f5f9b35deab3a" -inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc +inherit autotools texinfo pkgconfig gettext lib_package gtk-doc PACKAGECONFIG ??= "libidn"
Signature · 1 line
2.7.4
Re: [thud][PATCH 3/9] gnutls: no need to inherit binconfig
Quoted 15 lines · Armin Kuster
From: Ross Burton <[email protected]>
This recipe doesn't ship a *-config binary, so don't inherit binconfig.
Signed-off-by Ross Burton <[email protected]>Signed-off-by Armin Kuster <[email protected]>--- meta/recipes-support/gnutls/gnutls_3.6.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-support/gnutls/gnutls_3.6.4.bb +0
-0
meta/recipes-support/gnutls/gnutls_3.6.4.bb SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar · line 27
Quoted 6 lines
meta/recipes-support/gnutls/gnutls_3.6.4.bb +1
-1@@ -24,7 +24,7 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar SRC_URI[md5sum] = "63363d1c00601f4d11a5cadc8b5e0799" SRC_URI[sha256sum] = "c663a792fbc84349c27c36059181f2ca86c9442e75ee8b0ad72f5f9b35deab3a" -inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc +inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
This doesn't look appropriate for a stable branch.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedPATCH 4/9 gnutls: update to 3.6.5
In reply to Armin KusterBug fix only release
Full details:
https://lists.gnupg.org/pipermail/gnutls-help/2018-December/004465.html
---
meta/recipes-support/gnutls/{gnutls_3.6.4.bb => gnutls_3.6.5.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-support/gnutls/{gnutls_3.6.4.bb => gnutls_3.6.5.bb} (93%)meta/recipes-support/gnutls/gnutls_3.6.5.bb renamed from meta/recipes-support/gnutls/gnutls_3.6.4.bb +2 -2
@@ -21,8 +21,8 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar file://arm_eabi.patch \ " -SRC_URI[md5sum] = "63363d1c00601f4d11a5cadc8b5e0799" -SRC_URI[sha256sum] = "c663a792fbc84349c27c36059181f2ca86c9442e75ee8b0ad72f5f9b35deab3a" +SRC_URI[md5sum] = "3474849e1bbd4d16403b82ab2579000b" +SRC_URI[sha256sum] = "073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35" inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
Signature · 1 line
2.7.4
Re: [thud][PATCH 4/9] gnutls: update to 3.6.5
Quoted 1 line · Armin Kuster
Bug fix only release
It is not.
Quoted 3 lines
Full details:
https://lists.gnupg.org/pipermail/gnutls-help/2018-December/004465.html
...
...
** libgnutls: Added support for TLS 1.3 zero round-trip (0-RTT) mode (#127)
...
** libgnutls: Added support for EdDSA under PKCS#11 (#417)
** libgnutls: Added support for AES-CFB8 cipher (#357)
** libgnutls: Added support for AES-CMAC MAC (#351)
...
** libgnutls: Added support for GOST key unmasking and unwrapped GOST private
keys parsing, as specified in R 50.1.112-2016.
...
These and other changes might or might not be acceptable for a stable branch, but it mustn't be treated as "Bug fix only".
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedPATCH 5/9 gnutls: upgrade 3.6.5 -> 3.6.7
In reply to Armin KusterFrom: Adrian Bunk <[email protected]>
Source: Openembedded.org
MR: 97367, 97377
Type: Security Fix
Disposition: Backport from https://git.openembedded.org/openembedded-core/commit/meta/recipes-support/gnutls?h=warrior&id=93993fe8ffd31e3e94946023b2cd8927ae595fc3
ChangeID: e47c21374c83d7bbb8ec48a7c4fe14040457ea45
Description:
This is a new upstream release from the same stable branch bringing new features and bugfixes (including CVE fixes).
COPYING changed http -> https.
configure no longer has a --without-libunistring-prefix option.
---
meta/recipes-support/gnutls/{gnutls_3.6.5.bb => gnutls_3.6.7.bb} | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
rename meta/recipes-support/gnutls/{gnutls_3.6.5.bb => gnutls_3.6.7.bb} (88%)meta/recipes-support/gnutls/gnutls_3.6.7.bb renamed from meta/recipes-support/gnutls/gnutls_3.6.5.bb +3 -4
@@ -9,7 +9,7 @@ LICENSE_${PN}-bin = "GPLv3+" LICENSE_${PN}-openssl = "GPLv3+" LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \ - file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://doc/COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" DEPENDS = "nettle gmp virtual/libiconv libunistring"
@@ -21,8 +21,8 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar file://arm_eabi.patch \ " -SRC_URI[md5sum] = "3474849e1bbd4d16403b82ab2579000b" -SRC_URI[sha256sum] = "073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35" +SRC_URI[md5sum] = "c4ac669c500df939d4fbfea722367929" +SRC_URI[sha256sum] = "5b3409ad5aaf239808730d1ee12fdcd148c0be00262c7edf157af655a8a188e2" inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
@@ -44,7 +44,6 @@ EXTRA_OECONF = " \ --enable-local-libopts \ --enable-openssl-compatibility \ --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \ - --without-libunistring-prefix \ " LDFLAGS_append_libc-musl = " -largp"
Signature · 1 line
2.7.4
PATCH 6/9 nettle: update to 3.4.1
In reply to Armin KusterSource: Openembedded.org
MR: 98314, 98315
Type: Security Fix
Disposition: Backport from https://git.openembedded.org/openembedded-core/commit/meta/recipes-support/nettle?h=warrior&id=8ac8fa8ee10c59a081d368a5429e0eced8dd5d3c
ChangeID: 657aa277fb284b66e8d349cbc3424f10208652c3
Description:
Bug fix only release
Include:
CVE-2018-16868 gnutls: Bleichenbacher-like side channel leakage in PKCS#1 1.5 verification and padding oracle verification
CVE-2018-16869 nettle: Leaky data conversion exposing a manager oracle
For full details see:
http://lists.lysator.liu.se/pipermail/nettle-bugs/2018/007369.html
[V2]
Add -std=c99 to cflags
---
.../Add-target-to-only-build-tests-not-run-them.patch | 0
.../check-header-files-of-openssl-only-if-enable_.patch | 0
.../nettle/{nettle-3.4 => nettle-3.4.1}/dlopen-test.patch | 0
meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/run-ptest | 0
meta/recipes-support/nettle/{nettle_3.4.bb => nettle_3.4.1.bb} | 5 +++--
5 files changed, 3 insertions(+), 2 deletions(-)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/Add-target-to-only-build-tests-not-run-them.patch (100%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/check-header-files-of-openssl-only-if-enable_.patch (100%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/dlopen-test.patch (100%)
rename meta/recipes-support/nettle/{nettle-3.4 => nettle-3.4.1}/run-ptest (100%)
rename meta/recipes-support/nettle/{nettle_3.4.bb => nettle_3.4.1.bb} (90%)meta/recipes-support/nettle/nettle-3.4.1/Add-target-to-only-build-tests-not-run-them.patch renamed from meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch +0 -0
meta/recipes-support/nettle/nettle-3.4.1/check-header-files-of-openssl-only-if-enable_.patch renamed from meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch +0 -0
meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch renamed from meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch +0 -0
meta/recipes-support/nettle/nettle-3.4.1/run-ptest renamed from meta/recipes-support/nettle/nettle-3.4/run-ptest +0 -0
meta/recipes-support/nettle/nettle_3.4.1.bb renamed from meta/recipes-support/nettle/nettle_3.4.bb +3 -2
@@ -20,8 +20,8 @@ SRC_URI_append_class-target = "\ file://dlopen-test.patch \ " -SRC_URI[md5sum] = "dc0f13028264992f58e67b4e8915f53d" -SRC_URI[sha256sum] = "ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94" +SRC_URI[md5sum] = "9bdebb0e2f638d3b9d91f7fc264b70c1" +SRC_URI[sha256sum] = "f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad" UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
@@ -30,6 +30,7 @@ inherit autotools ptest multilib_header EXTRA_AUTORECONF += "--exclude=aclocal" EXTRA_OECONF = "--disable-openssl" +CFLAGS_append = " -std=c99" do_compile_ptest() { oe_runmake buildtest
Signature · 1 line
2.7.4
PATCH 7/9 nettle: fix ptest failure
In reply to Armin KusterFrom: Mingli Yu <[email protected]>
Remove dlopen-test.patch which originally used to fix the test dlopen-test, but autually the patch didn't resolve the issue as dlopen-test.patch supposes the file /usr/lib/libnettle.so exists. Instead deploy ${D}${PTEST_PATH}/libnettle.so to fix the dlopen-test failure.
Update the initialization for the salt to fix below Segmentation fault and also nettle-pbkdf2-test failure.
# echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt [65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00] [65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f Segmentation fault
--- ...kdf2.c-change-the-initialization-for-salt.patch | 39 ++++++++++++++++++++++ .../nettle/nettle-3.4.1/dlopen-test.patch | 20 ----------- meta/recipes-support/nettle/nettle_3.4.1.bb | 9 ++--- 3 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch delete mode 100644 meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch
meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 7510ee2877368464ecce7de515ce056e08c75245 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <[email protected]> +Date: Fri, 12 Apr 2019 10:30:14 +0800 +Subject: [PATCH] nettle-pbkdf2.c: change the initialization for salt + +use malloc and strncpy altogether to replace +strdup for salt initialization to fix below +Segmentation fault: + # echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt + [65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00] + [65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f + Segmentation fault + +Upstream-Status: Submitted[http://lists.lysator.liu.se/pipermail/nettle-bugs/2019/007467.html] + +Signed-off-by: Mingli Yu <[email protected]> +--- + tools/nettle-pbkdf2.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tools/nettle-pbkdf2.c b/tools/nettle-pbkdf2.c +index 1f0a301..000acd3 100644 +--- a/tools/nettle-pbkdf2.c ++++ b/tools/nettle-pbkdf2.c +@@ -141,7 +141,10 @@ main (int argc, char **argv) + return EXIT_FAILURE; + } + +- salt = strdup (argv[0]); ++ salt = malloc (strlen(argv[0]) + 1); ++ if (! salt) ++ die ("Failed to allocate memory for salt\n"); ++ strncpy(salt, argv[0], sizeof(salt) - 1); + salt_length = strlen(argv[0]); + + if (hex_salt) +-- +2.7.4 +
meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch deleted +0 -20
@@ -1,20 +0,0 @@ -Replace relative path of libnettle.so with absolute path so the test -program can find it. -Relative paths are not suitable, as the folder strucure for ptest -is different from the one expected by the nettle testsuite. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Juro Bystricky <[email protected]> - ---- a/testsuite/dlopen-test.c 2016-10-01 00:28:38.000000000 -0700 -+++ b/testsuite/dlopen-test.c 2017-10-13 11:08:57.227572860 -0700 -@@ -9,7 +9,7 @@ - main (int argc UNUSED, char **argv UNUSED) - { - #if HAVE_LIBDL -- void *handle = dlopen ("../libnettle.so", RTLD_NOW); -+ void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW); - int (*get_version)(void); - if (!handle) - {
meta/recipes-support/nettle/nettle_3.4.1.bb +5 -4
@@ -14,12 +14,9 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://Add-target-to-only-build-tests-not-run-them.patch \ file://run-ptest \ file://check-header-files-of-openssl-only-if-enable_.patch \ + file://0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch \ " -SRC_URI_append_class-target = "\ - file://dlopen-test.patch \ - " - SRC_URI[md5sum] = "9bdebb0e2f638d3b9d91f7fc264b70c1" SRC_URI[sha256sum] = "f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad"
@@ -47,6 +44,10 @@ do_install_ptest() { # tools can be found in PATH, not in ../tools/ sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ + # libnettle.so is needed for dlopen-test + if [ -f ${D}${libdir}/libnettle.so.6.* ]; then + cp ${D}${libdir}/libnettle.so.6.* ${D}${PTEST_PATH}/libnettle.so + fi } BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.7.4
PATCH 8/9 Revert "nettle: fix ptest failure"
In reply to Armin KusterFrom: Richard Purdie <[email protected]>
This reverts commit 83faaf7b2a5f4fc4ae504b300134409e90389770.
This should never have merged as the change was rejected upstream and adding a library to the ptest package resulted in it providing that SONAME which led to being included in images like core-image-sato.
This in turn led to a ton of ptest failures in the 2.7 r1 QA report.
--- ...kdf2.c-change-the-initialization-for-salt.patch | 39 ---------------------- .../nettle/nettle-3.4.1/dlopen-test.patch | 20 +++++++++++ meta/recipes-support/nettle/nettle_3.4.1.bb | 9 +++-- 3 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch create mode 100644 meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch
meta/recipes-support/nettle/nettle-3.4.1/0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 7510ee2877368464ecce7de515ce056e08c75245 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <[email protected]> -Date: Fri, 12 Apr 2019 10:30:14 +0800 -Subject: [PATCH] nettle-pbkdf2.c: change the initialization for salt - -use malloc and strncpy altogether to replace -strdup for salt initialization to fix below -Segmentation fault: - # echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt - [65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00] - [65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f - Segmentation fault - -Upstream-Status: Submitted[http://lists.lysator.liu.se/pipermail/nettle-bugs/2019/007467.html] - -Signed-off-by: Mingli Yu <[email protected]> ---- - tools/nettle-pbkdf2.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tools/nettle-pbkdf2.c b/tools/nettle-pbkdf2.c -index 1f0a301..000acd3 100644 ---- a/tools/nettle-pbkdf2.c -+++ b/tools/nettle-pbkdf2.c -@@ -141,7 +141,10 @@ main (int argc, char **argv) - return EXIT_FAILURE; - } - -- salt = strdup (argv[0]); -+ salt = malloc (strlen(argv[0]) + 1); -+ if (! salt) -+ die ("Failed to allocate memory for salt\n"); -+ strncpy(salt, argv[0], sizeof(salt) - 1); - salt_length = strlen(argv[0]); - - if (hex_salt) --- -2.7.4 -
meta/recipes-support/nettle/nettle-3.4.1/dlopen-test.patch new file +20 -0
@@ -0,0 +1,20 @@ +Replace relative path of libnettle.so with absolute path so the test +program can find it. +Relative paths are not suitable, as the folder strucure for ptest +is different from the one expected by the nettle testsuite. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Juro Bystricky <[email protected]> + +--- a/testsuite/dlopen-test.c 2016-10-01 00:28:38.000000000 -0700 ++++ b/testsuite/dlopen-test.c 2017-10-13 11:08:57.227572860 -0700 +@@ -9,7 +9,7 @@ + main (int argc UNUSED, char **argv UNUSED) + { + #if HAVE_LIBDL +- void *handle = dlopen ("../libnettle.so", RTLD_NOW); ++ void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW); + int (*get_version)(void); + if (!handle) + {
meta/recipes-support/nettle/nettle_3.4.1.bb +4 -5
@@ -14,9 +14,12 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://Add-target-to-only-build-tests-not-run-them.patch \ file://run-ptest \ file://check-header-files-of-openssl-only-if-enable_.patch \ - file://0001-nettle-pbkdf2.c-change-the-initialization-for-salt.patch \ " +SRC_URI_append_class-target = "\ + file://dlopen-test.patch \ + " + SRC_URI[md5sum] = "9bdebb0e2f638d3b9d91f7fc264b70c1" SRC_URI[sha256sum] = "f941cf1535cd5d1819be5ccae5babef01f6db611f9b5a777bae9c7604b8a92ad"
@@ -44,10 +47,6 @@ do_install_ptest() { # tools can be found in PATH, not in ../tools/ sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ - # libnettle.so is needed for dlopen-test - if [ -f ${D}${libdir}/libnettle.so.6.* ]; then - cp ${D}${libdir}/libnettle.so.6.* ${D}${PTEST_PATH}/libnettle.so - fi } BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.7.4
PATCH 9/9 nettle: fix the Segmentation fault
In reply to Armin KusterFrom: Mingli Yu <[email protected]>
The commit[8ac8fa8ee1 nettle: update to 3.4.1]
add CFLAGS_append = " -std=c99" to silence the
below error for native build:
| ../nettle-3.4.1/rsa-sign-tr.c: In function 'sec_equal':
| ../nettle-3.4.1/rsa-sign-tr.c:243:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i < limbs; i++)
^
| ../nettle-3.4.1/rsa-sign-tr.c:243:3: note: use option -std=c99 or -std=gnu99 to compile your code | Makefile:263: recipe for target 'rsa-sign-tr.o' failed
But the above change will trigger below Segmentation fault:
# echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt [65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00] [65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f Segmentation fault
So update the logic to CFLAGS_append = " -std=gnu99" to fix the issue.
(From OE-Core rev: 91359a91b8c89dc5e1f3a946137204156c47a3af)
--- meta/recipes-support/nettle/nettle_3.4.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/nettle/nettle_3.4.1.bb +1 -1
@@ -30,7 +30,7 @@ inherit autotools ptest multilib_header EXTRA_AUTORECONF += "--exclude=aclocal" EXTRA_OECONF = "--disable-openssl" -CFLAGS_append = " -std=c99" +CFLAGS_append = " -std=gnu99" do_compile_ptest() { oe_runmake buildtest
Signature · 1 line
2.7.4
Quoted 7 lines · Armin Kuster
..
Mingli Yu (2):
nettle: fix ptest failure
...
Richard Purdie (1):
Revert "nettle: fix ptest failure"
...
These should be dropped for obvious reasons.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 9 lines · Adrian Bunk
Quoted 7 lines · Armin Kuster
..
Mingli Yu (2):
nettle: fix ptest failure
...
Richard Purdie (1):
Revert "nettle: fix ptest failure"
...These should be dropped for obvious reasons.
its not obvious to me. This helps in the QA process. I am open to ptest fixes and other QA backports for the Stable Branches.
OE has been benefiting from the donated QA resources from Intel and Wind River in the Yocto Project. If I can lessing their burden on the Stable branches, I will do that. Richard have been spending time keeping the Stable branches QA frameworks in sync for this reason including the AutoBuilder. Without this, we don't have Stable branches.
- armin
Quoted 4 lines
cu
Adrian
Quoted 11 lines · On Sat, Jun 01, 2019 at 08:45:38AM -0700, akuster808 wrote:
Quoted 8 lines · Adrian Bunk
Quoted 7 lines · Armin Kuster
..
Mingli Yu (2):
nettle: fix ptest failure
...
Richard Purdie (1):
Revert "nettle: fix ptest failure"
...
Quoted 5 lines
Quoted 1 line
These should be dropped for obvious reasons.
its not obvious to me. This helps in the QA process. I am open to ptest fixes and other QA backports for the Stable Branches.
...
One commit is a direct revert of the other commit.
Quoted 1 line
- armin
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed