Thud pull request
cover Thud pull request
All these have been already reviewed by the community. Passes AB -full
Please merge to thud
The following changes since commit e6728a873f1eef335a9e21bdface304f13f0c952:
uninative: Update to 2.7 release (2019-10-07 19:27:17 -0700)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib stable/thud-next
http://cgit.openembedded.org//log/?h=stable/thud-next
Dan Tran (1):
gnutls: Fix CVE-2019-3829 and CVE-2019-3836
Dmitry Eremin-Solenikov (1):
kernel.bbclass: fix installation of modules signing certificates
Muminul Islam (3):
glibc: Security fix for cve <CVE-2019-6488, CVE-2019-7309>
libsolv: Security fix for CVEs: <CVE-2018-20532, CVE-2018-20533,
CVE-2018-20534>
curl: Security fix for CVE-2019-5482
Peter Kjellerstedt (1):
arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES
c-thaler (1):
kernel-devsrc: check for localversion files in the kernel source tree
meta/classes/kernel.bbclass | 2 +- meta/conf/machine/include/arm/arch-arm64.inc | 2 +- meta/recipes-core/glibc/glibc/CVE-2019-6488.patch | 274 +++++++ meta/recipes-core/glibc/glibc/CVE-2019-7309.patch | 207 +++++ meta/recipes-core/glibc/glibc_2.28.bb | 2 + .../0003-Fix-Dereference-of-null-pointer.patch | 33 + .../0004-Fix-Add-va_end-before-return.patch | 36 + .../libsolv/libsolv/0005-Fix-Memory-leaks.patch | 158 ++++ .../libsolv/0006-Fix-testsolv-segfault.patch | 41 + .../libsolv/0007-Fix-testsolv-segfaults.patch | 47 ++ .../0008-Fix-Be-sure-that-NONBLOCK-is-set.patch | 37 + ...0009-Don-t-set-values-that-are-never-read.patch | 113 +++ meta/recipes-extended/libsolv/libsolv_0.6.35.bb | 7 + meta/recipes-kernel/linux/kernel-devsrc.bb | 9 + meta/recipes-support/curl/curl/CVE-2019-5482.patch | 68 ++ meta/recipes-support/curl/curl_7.61.0.bb | 1 + .../gnutls/gnutls/CVE-2019-3829_p1.patch | 39 + .../gnutls/gnutls/CVE-2019-3829_p2.patch | 871 +++++++++++++++++++++ .../gnutls/gnutls/CVE-2019-3829_p3.patch | 36 + .../gnutls/gnutls/CVE-2019-3836.patch | 35 + meta/recipes-support/gnutls/gnutls_3.6.4.bb | 4 + 21 files changed, 2020 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/glibc/glibc/CVE-2019-6488.patch create mode 100644 meta/recipes-core/glibc/glibc/CVE-2019-7309.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0003-Fix-Dereference-of-null-pointer.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0004-Fix-Add-va_end-before-return.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0005-Fix-Memory-leaks.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0006-Fix-testsolv-segfault.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0007-Fix-testsolv-segfaults.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0008-Fix-Be-sure-that-NONBLOCK-is-set.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2019-5482.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p2.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p3.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3836.patch
Signature · 1 line
2.7.4
PATCH 1/7 kernel.bbclass: fix installation of modules signing certificates
From: Dmitry Eremin-Solenikov <[email protected]>
If one has provided external key/certificate for modules signing, Kbuild will skip creating signing_key.pem and will write only signing_key.x509 certificate. Thus we have to check for .x509 file existence rather than .pem one.
--- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
@@ -451,7 +451,7 @@ do_shared_workdir () { cp .config $kerneldir/ mkdir -p $kerneldir/include/config cp include/config/kernel.release $kerneldir/include/config/kernel.release - if [ -e certs/signing_key.pem ]; then + if [ -e certs/signing_key.x509 ]; then # The signing_key.* files are stored in the certs/ dir in # newer Linux kernels mkdir -p $kerneldir/certs
Signature · 1 line
2.7.4
PATCH 2/7 arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES
In reply to Armin KusterFrom: Peter Kjellerstedt <[email protected]>
This makes sure, e.g., ${SOC_FAMILY} and ${MACHINE} have higher priorities than aarch64.
--- meta/conf/machine/include/arm/arch-arm64.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/arm/arch-arm64.inc +1 -1
@@ -4,7 +4,7 @@ require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[aarch64] = "Enable instructions for aarch64" -MACHINEOVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', ':aarch64', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'aarch64:', '' ,d)}" # Little Endian base configs AVAILTUNES += "aarch64 aarch64_be"
Signature · 1 line
2.7.4
PATCH 3/7 glibc: Security fix for cve <CVE-2019-6488, CVE-2019-7309>
In reply to Armin KusterFrom: Muminul Islam <[email protected]>
CVE: CVE-2019-6488, CVE-2019-7309
Upstream-Status: Backport
--- meta/recipes-core/glibc/glibc/CVE-2019-6488.patch | 274 ++++++++++++++++++++++ meta/recipes-core/glibc/glibc/CVE-2019-7309.patch | 207 ++++++++++++++++ meta/recipes-core/glibc/glibc_2.28.bb | 2 + 3 files changed, 483 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/CVE-2019-6488.patch create mode 100644 meta/recipes-core/glibc/glibc/CVE-2019-7309.patch
meta/recipes-core/glibc/glibc/CVE-2019-6488.patch new file +274 -0
@@ -0,0 +1,274 @@ +From 718016100d889a986c536b595bf6ec0d6ab4b90e Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" <[email protected]> +Date: Fri, 1 Feb 2019 12:17:09 -0800 +Subject: [PATCH] x86-64 memchr/wmemchr: Properly handle the length parameter + [BZ #24097] +Reply-To: [email protected] + +On x32, the size_t parameter may be passed in the lower 32 bits of a +64-bit register with the non-zero upper 32 bits. The string/memory +functions written in assembly can only use the lower 32 bits of a +64-bit register as length or must clear the upper 32 bits before using +the full 64-bit register for length. + +This pach fixes memchr/wmemchr for x32. Tested on x86-64 and x32. On +x86-64, libc.so is the same with and withou the fix. + + [BZ #24097] + CVE-2019-6488 + * sysdeps/x86_64/memchr.S: Use RDX_LP for length. Clear the + upper 32 bits of RDX register. + * sysdeps/x86_64/multiarch/memchr-avx2.S: Likewise. + * sysdeps/x86_64/x32/Makefile (tests): Add tst-size_t-memchr and + tst-size_t-wmemchr. + * sysdeps/x86_64/x32/test-size_t.h: New file. + * sysdeps/x86_64/x32/tst-size_t-memchr.c: Likewise. + * sysdeps/x86_64/x32/tst-size_t-wmemchr.c: Likewise. + +(cherry picked from commit 97700a34f36721b11a754cf37a1cc40695ece1fd) + +CVE: CVE-2019-6488 + +Upstream-Status: Backport + +Signed-off-by: Muminul Islam <[email protected]> +--- + NEWS | 1 - + sysdeps/x86_64/memchr.S | 10 ++-- + sysdeps/x86_64/multiarch/memchr-avx2.S | 8 ++- + sysdeps/x86_64/x32/Makefile | 8 +++ + sysdeps/x86_64/x32/test-size_t.h | 35 ++++++++++++ + sysdeps/x86_64/x32/tst-size_t-memchr.c | 72 +++++++++++++++++++++++++ + sysdeps/x86_64/x32/tst-size_t-wmemchr.c | 20 +++++++ + 7 files changed, 148 insertions(+), 6 deletions(-) + create mode 100644 sysdeps/x86_64/x32/test-size_t.h + create mode 100644 sysdeps/x86_64/x32/tst-size_t-memchr.c + create mode 100644 sysdeps/x86_64/x32/tst-size_t-wmemchr.c + +diff --git a/NEWS b/NEWS +index fd14941128..b158973a30 100644 +--- a/NEWS ++++ b/NEWS +@@ -17,7 +17,6 @@ The following bugs are resolved with this release: + [23606] Missing ENDBR32 in sysdeps/i386/start.S + [23679] gethostid: Missing NULL check for gethostbyname_r result + [23717] Fix stack overflow in stdlib/tst-setcontext9 +- + + Version 2.28 + +diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S +index feef5d4f24..cb320257a2 100644 +--- a/sysdeps/x86_64/memchr.S ++++ b/sysdeps/x86_64/memchr.S +@@ -34,12 +34,16 @@ ENTRY(MEMCHR) + mov %edi, %ecx + + #ifdef USE_AS_WMEMCHR +- test %rdx, %rdx ++ test %RDX_LP, %RDX_LP + jz L(return_null) +- shl $2, %rdx ++ shl $2, %RDX_LP + #else ++# ifdef __ILP32__ ++ /* Clear the upper 32 bits. */ ++ movl %edx, %edx ++# endif + punpcklbw %xmm1, %xmm1 +- test %rdx, %rdx ++ test %RDX_LP, %RDX_LP + jz L(return_null) + punpcklbw %xmm1, %xmm1 + #endif +diff --git a/sysdeps/x86_64/multiarch/memchr-avx2.S b/sysdeps/x86_64/multiarch/memchr-avx2.S +index 5f5e772554..c81da19bf0 100644 +--- a/sysdeps/x86_64/multiarch/memchr-avx2.S ++++ b/sysdeps/x86_64/multiarch/memchr-avx2.S +@@ -40,16 +40,20 @@ + ENTRY (MEMCHR) + # ifndef USE_AS_RAWMEMCHR + /* Check for zero length. */ +- testq %rdx, %rdx ++ test %RDX_LP, %RDX_LP + jz L(null) + # endif + movl %edi, %ecx + /* Broadcast CHAR to YMM0. */ + vmovd %esi, %xmm0 + # ifdef USE_AS_WMEMCHR +- shl $2, %rdx ++ shl $2, %RDX_LP + vpbroadcastd %xmm0, %ymm0 + # else ++# ifdef __ILP32__ ++ /* Clear the upper 32 bits. */ ++ movl %edx, %edx ++# endif + vpbroadcastb %xmm0, %ymm0 + # endif + /* Check if we may cross page boundary with one vector load. */ +diff --git a/sysdeps/x86_64/x32/Makefile b/sysdeps/x86_64/x32/Makefile +index f2ebc24fb0..7d528889c6 100644 +--- a/sysdeps/x86_64/x32/Makefile ++++ b/sysdeps/x86_64/x32/Makefile +@@ -4,3 +4,11 @@ ifeq ($(subdir),math) + # 64-bit llround. Add -fno-builtin-lround to silence the compiler. + CFLAGS-s_llround.c += -fno-builtin-lround + endif ++ ++ifeq ($(subdir),string) ++tests += tst-size_t-memchr ++endif ++ ++ifeq ($(subdir),wcsmbs) ++tests += tst-size_t-wmemchr ++endif +diff --git a/sysdeps/x86_64/x32/test-size_t.h b/sysdeps/x86_64/x32/test-size_t.h +new file mode 100644 +index 0000000000..78a940863e +--- /dev/null ++++ b/sysdeps/x86_64/x32/test-size_t.h +@@ -0,0 +1,35 @@ ++/* Test string/memory functions with size_t in the lower 32 bits of ++ 64-bit register. ++ Copyright (C) 2019 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#define TEST_MAIN ++#include <string/test-string.h> ++ ++/* On x32, parameter_t may be passed in a 64-bit register with the LEN ++ field in the lower 32 bits. When the LEN field of 64-bit register ++ is passed to string/memory function as the size_t parameter, only ++ the lower 32 bits can be used. */ ++typedef struct ++{ ++ union ++ { ++ size_t len; ++ void (*fn) (void); ++ }; ++ void *p; ++} parameter_t; +diff --git a/sysdeps/x86_64/x32/tst-size_t-memchr.c b/sysdeps/x86_64/x32/tst-size_t-memchr.c +new file mode 100644 +index 0000000000..29a3daf102 +--- /dev/null ++++ b/sysdeps/x86_64/x32/tst-size_t-memchr.c +@@ -0,0 +1,72 @@ ++/* Test memchr with size_t in the lower 32 bits of 64-bit register. ++ Copyright (C) 2019 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#ifndef WIDE ++# define TEST_NAME "memchr" ++#else ++# define TEST_NAME "wmemchr" ++#endif /* WIDE */ ++#include "test-size_t.h" ++ ++#ifndef WIDE ++# define MEMCHR memchr ++# define CHAR char ++# define UCHAR unsigned char ++#else ++# include <wchar.h> ++# define MEMCHR wmemchr ++# define CHAR wchar_t ++# define UCHAR wchar_t ++#endif /* WIDE */ ++ ++IMPL (MEMCHR, 1) ++ ++typedef CHAR * (*proto_t) (const CHAR*, int, size_t); ++ ++static CHAR * ++__attribute__ ((noinline, noclone)) ++do_memchr (parameter_t a, parameter_t b) ++{ ++ return CALL (&b, a.p, (uintptr_t) b.p, a.len); ++} ++ ++static int ++test_main (void) ++{ ++ test_init (); ++ ++ parameter_t src = { { page_size / sizeof (CHAR) }, buf2 }; ++ parameter_t c = { { 0 }, (void *) (uintptr_t) 0x12 }; ++ ++ int ret = 0; ++ FOR_EACH_IMPL (impl, 0) ++ { ++ c.fn = impl->fn; ++ CHAR *res = do_memchr (src, c); ++ if (res) ++ { ++ error (0, 0, "Wrong result in function %s: %p != NULL", ++ impl->name, res); ++ ret = 1; ++ } ++ } ++ ++ return ret ? EXIT_FAILURE : EXIT_SUCCESS; ++} ++ ++#include <support/test-driver.c> +diff --git a/sysdeps/x86_64/x32/tst-size_t-wmemchr.c b/sysdeps/x86_64/x32/tst-size_t-wmemchr.c +new file mode 100644 +index 0000000000..877801d646 +--- /dev/null ++++ b/sysdeps/x86_64/x32/tst-size_t-wmemchr.c +@@ -0,0 +1,20 @@ ++/* Test wmemchr with size_t in the lower 32 bits of 64-bit register. ++ Copyright (C) 2019 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#define WIDE 1 ++#include "tst-size_t-memchr.c" +-- +2.23.0 +
meta/recipes-core/glibc/glibc/CVE-2019-7309.patch new file +207 -0
207 lines not on this page · raw message
meta/recipes-core/glibc/glibc_2.28.bb +2 -0
@@ -50,6 +50,8 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://CVE-2019-9169.patch \ file://CVE-2016-10739.patch \ file://CVE-2018-19591.patch \ + file://CVE-2019-6488.patch \ + file://CVE-2019-7309.patch \ " NATIVESDKFIXES ?= ""
Signature · 1 line
2.7.4
PATCH 4/7 kernel-devsrc: check for localversion files in the kernel source tree
In reply to Armin KusterFrom: c-thaler <[email protected]>
localversion files are ignored. This might lead to a bad version magic when
building out-of-tree modules via SDK.
(Backport from master https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-kernel/linux/kernel-devsrc.bb?id=59fcee90de0cbb5b6b8333ab2b0e36214b174e52)
--- meta/recipes-kernel/linux/kernel-devsrc.bb | 9 +++++++++ 1 file changed, 9 insertions(+)
meta/recipes-kernel/linux/kernel-devsrc.bb +9 -0
@@ -62,6 +62,12 @@ do_install() { cd ${S} cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build cp --parents $(find -type f -name "Build" -o -name "Build.include") $kerneldir/build + + # Copy localversion file if any to keep correct version magic after + # modules_prepare. + if [ -f *localversion* ]; then + cp *localversion* $kerneldir/build + fi ) # then drop all but the needed Makefiles/Kconfig files
@@ -213,6 +219,9 @@ do_install() { # required to build scripts/selinux/genheaders/genheaders cp -a --parents security/selinux/include/* $kerneldir/build/ + + # copy any localversion files + cp -a localversion* $kerneldir/build/ 2>/dev/null || : ) # Make sure the Makefile and version.h have a matching timestamp so that
Signature · 1 line
2.7.4
PATCH 5/7 gnutls: Fix CVE-2019-3829 and CVE-2019-3836
In reply to Armin KusterFrom: Dan Tran <[email protected]>
--- .../gnutls/gnutls/CVE-2019-3829_p1.patch | 39 + .../gnutls/gnutls/CVE-2019-3829_p2.patch | 871 +++++++++++++++++++++ .../gnutls/gnutls/CVE-2019-3829_p3.patch | 36 + .../gnutls/gnutls/CVE-2019-3836.patch | 35 + meta/recipes-support/gnutls/gnutls_3.6.4.bb | 4 + 5 files changed, 985 insertions(+) create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p2.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p3.patch create mode 100644 meta/recipes-support/gnutls/gnutls/CVE-2019-3836.patch
meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 367688c05988bc7257d7e1801c5acf17ef7e854d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <[email protected]> +Date: Tue, 12 Feb 2019 15:09:11 +0100 +Subject: [PATCH 1/3] Automatically NULLify after gnutls_free() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This method prevents direct use-after-free and +double-free issues. + +Signed-off-by: Tim Rühsen <[email protected]> + +CVE: CVE-2019-3829 +Upstream-Status: Backport +[https://gitlab.com/gnutls/gnutls/commit/d39778e43d1674cb3ab3685157fd299816d535c0] + +Signed-off-by: Dan Tran <[email protected]> +--- + lib/includes/gnutls/gnutls.h.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in +index 49990b5f5..fa77fd0df 100644 +--- a/lib/includes/gnutls/gnutls.h.in ++++ b/lib/includes/gnutls/gnutls.h.in +@@ -2132,6 +2132,10 @@ extern _SYM_EXPORT gnutls_realloc_function gnutls_realloc; + extern _SYM_EXPORT gnutls_calloc_function gnutls_calloc; + extern _SYM_EXPORT gnutls_free_function gnutls_free; + ++#ifdef GNUTLS_INTERNAL_BUILD ++#define gnutls_free(a) gnutls_free((void *) (a)), a=NULL ++#endif ++ + extern _SYM_EXPORT char *(*gnutls_strdup) (const char *); + + /* a variant of memset that doesn't get optimized out */ +-- +2.22.0.vfs.1.1.57.gbaf16c8
meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p2.patch new file +871 -0
871 lines not on this page · raw message
meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p3.patch new file +36 -0
@@ -0,0 +1,36 @@ +From bf616850cf20af2bec3d68b82e6ac610ee8fc404 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <[email protected]> +Date: Tue, 12 Feb 2019 15:20:23 +0100 +Subject: [PATCH 3/3] gnutls_x509_crt_init: Fix dereference of NULL pointer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Tim Rühsen <[email protected]> + +CVE: CVE-2019-3829 +Upstream-Status: Backport +[https://gitlab.com/gnutls/gnutls/commit/6b5cbc9ea5bdca704bdbe2f8fb551f720d634bc6] + +Signed-off-by: Dan Tran <[email protected]> +--- + lib/x509/x509.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/x509/x509.c b/lib/x509/x509.c +index c149881f6..cc232ea50 100644 +--- a/lib/x509/x509.c ++++ b/lib/x509/x509.c +@@ -224,8 +224,8 @@ int gnutls_x509_crt_init(gnutls_x509_crt_t * cert) + if (result < 0) { + gnutls_assert(); + asn1_delete_structure(&tmp->cert); +- gnutls_free(tmp); + gnutls_subject_alt_names_deinit(tmp->san); ++ gnutls_free(tmp); + return result; + } + +-- +2.22.0.vfs.1.1.57.gbaf16c8 +
meta/recipes-support/gnutls/gnutls/CVE-2019-3836.patch new file +35 -0
@@ -0,0 +1,35 @@ +From c68195f0ff65144d7e0c32f4de5f264c4012983a Mon Sep 17 00:00:00 2001 +From: Daiki Ueno <[email protected]> +Date: Mon, 25 Mar 2019 16:06:39 +0100 +Subject: [PATCH] handshake: add missing initialization of local variable + +Resolves: #704 + +Signed-off-by: Daiki Ueno <[email protected]> +Signed-off-by: Nikos Mavrogiannopoulos <[email protected]> + +CVE: CVE-2019-3836 +Upstream-Status: Backport +[https://gitlab.com/gnutls/gnutls/commit/96e07075e8f105b13e76b11e493d5aa2dd937226] + +Signed-off-by: Dan Tran <[email protected]> +--- + lib/handshake-tls13.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/handshake-tls13.c b/lib/handshake-tls13.c +index 06c7c01d2..82689b5d8 100644 +--- a/lib/handshake-tls13.c ++++ b/lib/handshake-tls13.c +@@ -534,6 +534,8 @@ _gnutls13_recv_async_handshake(gnutls_session_t session) + return gnutls_assert_val(GNUTLS_E_UNEXPECTED_PACKET); + + do { ++ _gnutls_handshake_buffer_init(&hsk); ++ + /* the received handshake message has already been pushed into + * handshake buffers. As we do not need to use the handshake hash + * buffers we call the lower level receive functions */ +-- +2.22.0.vfs.1.1.57.gbaf16c8 +
meta/recipes-support/gnutls/gnutls_3.6.4.bb +4 -0
@@ -19,6 +19,10 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ file://arm_eabi.patch \ + file://CVE-2019-3829_p1.patch \ + file://CVE-2019-3829_p2.patch \ + file://CVE-2019-3829_p3.patch \ + file://CVE-2019-3836.patch \ " SRC_URI[md5sum] = "63363d1c00601f4d11a5cadc8b5e0799"
Signature · 1 line
2.7.4
PATCH 6/7 libsolv: Security fix for CVEs: <CVE-2018-20532, CVE-2018-20533, CVE-2018-20534>
In reply to Armin KusterFrom: Muminul Islam <[email protected]>
CVE: CVE-2018-20532 CVE-2018-20533 CVE-2018-20534
Upstream-Status: Backport
Cherry picked from https://github.com/openSUSE/libsolv/pull/291/commits
--- .../0003-Fix-Dereference-of-null-pointer.patch | 33 +++++ .../0004-Fix-Add-va_end-before-return.patch | 36 +++++ .../libsolv/libsolv/0005-Fix-Memory-leaks.patch | 158 +++++++++++++++++++++ .../libsolv/0006-Fix-testsolv-segfault.patch | 41 ++++++ .../libsolv/0007-Fix-testsolv-segfaults.patch | 47 ++++++ .../0008-Fix-Be-sure-that-NONBLOCK-is-set.patch | 37 +++++ ...0009-Don-t-set-values-that-are-never-read.patch | 113 +++++++++++++++ meta/recipes-extended/libsolv/libsolv_0.6.35.bb | 7 + 8 files changed, 472 insertions(+) create mode 100644 meta/recipes-extended/libsolv/libsolv/0003-Fix-Dereference-of-null-pointer.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0004-Fix-Add-va_end-before-return.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0005-Fix-Memory-leaks.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0006-Fix-testsolv-segfault.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0007-Fix-testsolv-segfaults.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0008-Fix-Be-sure-that-NONBLOCK-is-set.patch create mode 100644 meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch
meta/recipes-extended/libsolv/libsolv/0003-Fix-Dereference-of-null-pointer.patch new file +33 -0
@@ -0,0 +1,33 @@ +From fcd9e3aba122a220af617a802c4f47bad4b51e64 Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel <[email protected]> +Date: Fri, 7 Dec 2018 07:05:10 +0100 +Subject: [PATCH] Fix: Dereference of null pointer +Reply-To: [email protected] +CVE: CVE-2018-20532 CVE-2018-20533 CVE-2018-20534 + +Upstream-Status: Backport + +Signed-off-by: Muminul Islam <[email protected]> + +Cherry picked from https://github.com/openSUSE/libsolv/pull/291/commits + +--- + ext/repo_repomdxml.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/repo_repomdxml.c b/ext/repo_repomdxml.c +index 760d481f..b2a5b8dd 100644 +--- a/ext/repo_repomdxml.c ++++ b/ext/repo_repomdxml.c +@@ -181,7 +181,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha + while (value) + { + char *p = strchr(value, ','); +- if (*p) ++ if (p) + *p++ = 0; + if (*value) + repodata_add_poolstr_array(pd->data, SOLVID_META, REPOSITORY_UPDATES, value); +-- +2.23.0 +
meta/recipes-extended/libsolv/libsolv/0004-Fix-Add-va_end-before-return.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 58053b44c9ed043d48fa7dd595d213849b733f0f Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel <[email protected]> +Date: Tue, 11 Dec 2018 09:50:06 +0100 +Subject: [PATCH] Fix: Add va_end() before return +Reply-To: [email protected] + +The va_end() performs cleanup. +If va_end() is not called before a function that calls va_start() returns, +the behavior is undefined. + +CVE: CVE-2018-20532 CVE-2018-20533 CVE-2018-20534 + +Upstream-Status: Backport + +Signed-off-by: Muminul Islam <[email protected]> + +Cherry picked from https://github.com/openSUSE/libsolv/pull/291/commits +--- + src/pool.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pool.c b/src/pool.c +index 60cc0f49..f03b43f9 100644 +--- a/src/pool.c ++++ b/src/pool.c +@@ -1505,6 +1505,7 @@ pool_debug(Pool *pool, int type, const char *format, ...) + vprintf(format, args); + else + vfprintf(stderr, format, args); ++ va_end(args); + return; + } + vsnprintf(buf, sizeof(buf), format, args); +-- +2.23.0 +
meta/recipes-extended/libsolv/libsolv/0005-Fix-Memory-leaks.patch new file +158 -0
158 lines not on this page · raw message
meta/recipes-extended/libsolv/libsolv/0006-Fix-testsolv-segfault.patch new file +41 -0
41 lines not on this page · raw message
meta/recipes-extended/libsolv/libsolv/0007-Fix-testsolv-segfaults.patch new file +47 -0
47 lines not on this page · raw message
meta/recipes-extended/libsolv/libsolv/0008-Fix-Be-sure-that-NONBLOCK-is-set.patch new file +37 -0
@@ -0,0 +1,37 @@ +From ebb51f73491987435664ac14b79bebe16ffbdd5c Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel <[email protected]> +Date: Tue, 11 Dec 2018 12:40:42 +0100 +Subject: [PATCH] Fix: Be sure that NONBLOCK is set +Reply-To: [email protected] + +CVE: CVE-2018-20532 CVE-2018-20533 CVE-2018-20534 + +Upstream-Status: Backport + +Signed-off-by: Muminul Islam <[email protected]> + +Cherry picked from https://github.com/openSUSE/libsolv/pull/291/commits +--- + examples/solv/fastestmirror.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/examples/solv/fastestmirror.c b/examples/solv/fastestmirror.c +index d2ebd97a..0ee4e73b 100644 +--- a/examples/solv/fastestmirror.c ++++ b/examples/solv/fastestmirror.c +@@ -68,7 +68,11 @@ findfastest(char **urls, int nurls) + socks[i] = socket(result->ai_family, result->ai_socktype, result->ai_protocol); + if (socks[i] >= 0) + { +- fcntl(socks[i], F_SETFL, O_NONBLOCK); ++ if (fcntl(socks[i], F_SETFL, O_NONBLOCK) == -1) ++ { ++ close(socks[i]); ++ socks[i] = -1; ++ } + if (connect(socks[i], result->ai_addr, result->ai_addrlen) == -1) + { + if (errno != EINPROGRESS) +-- +2.23.0 +
meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch new file +113 -0
113 lines not on this page · raw message
meta/recipes-extended/libsolv/libsolv_0.6.35.bb +7 -0
@@ -10,6 +10,13 @@ DEPENDS = "expat zlib" SRC_URI = "git://github.com/openSUSE/libsolv.git" SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \ file://0002-Fixes-to-internal-fopencookie-implementation.patch \ + file://0003-Fix-Dereference-of-null-pointer.patch \ + file://0004-Fix-Add-va_end-before-return.patch \ + file://0005-Fix-Memory-leaks.patch \ + file://0006-Fix-testsolv-segfault.patch \ + file://0007-Fix-testsolv-segfaults.patch \ + file://0008-Fix-Be-sure-that-NONBLOCK-is-set.patch \ + file://0009-Don-t-set-values-that-are-never-read.patch \ " SRCREV = "38c5374d4712667b0b6ada4bf78ddbb343095d0c"
Signature · 1 line
2.7.4
PATCH 7/7 curl: Security fix for CVE-2019-5482
In reply to Armin KusterFrom: Muminul Islam <[email protected]>
--- meta/recipes-support/curl/curl/CVE-2019-5482.patch | 68 ++++++++++++++++++++++ meta/recipes-support/curl/curl_7.61.0.bb | 1 + 2 files changed, 69 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2019-5482.patch
meta/recipes-support/curl/curl/CVE-2019-5482.patch new file +68 -0
@@ -0,0 +1,68 @@ +From 38319e0717844c32464a6c7630de9be226f1c6f4 Mon Sep 17 00:00:00 2001 +From: Thomas Vegas <> +Date: Sat, 31 Aug 2019 17:30:51 +0200 +Subject: [PATCH] tftp: Alloc maximum blksize, and use default unless OACK is + received +Reply-To: [email protected] + +Fixes potential buffer overflow from 'recvfrom()', should the server +return an OACK without blksize. + +Bug: https://curl.haxx.se/docs/CVE-2019-5482.html + +CVE: CVE-2019-5482 + +Upstream-Status: Backport + +Signed-off-by: Muminul Islam <[email protected]> +--- + lib/tftp.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/lib/tftp.c b/lib/tftp.c +index 064eef318..2c148e3e1 100644 +--- a/lib/tftp.c ++++ b/lib/tftp.c +@@ -969,6 +969,7 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done) + { + tftp_state_data_t *state; + int blksize; ++ int need_blksize; + + blksize = TFTP_BLKSIZE_DEFAULT; + +@@ -983,15 +984,20 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done) + return CURLE_TFTP_ILLEGAL; + } + ++ need_blksize = blksize; ++ /* default size is the fallback when no OACK is received */ ++ if(need_blksize < TFTP_BLKSIZE_DEFAULT) ++ need_blksize = TFTP_BLKSIZE_DEFAULT; ++ + if(!state->rpacket.data) { +- state->rpacket.data = calloc(1, blksize + 2 + 2); ++ state->rpacket.data = calloc(1, need_blksize + 2 + 2); + + if(!state->rpacket.data) + return CURLE_OUT_OF_MEMORY; + } + + if(!state->spacket.data) { +- state->spacket.data = calloc(1, blksize + 2 + 2); ++ state->spacket.data = calloc(1, need_blksize + 2 + 2); + + if(!state->spacket.data) + return CURLE_OUT_OF_MEMORY; +@@ -1005,7 +1011,7 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done) + state->sockfd = state->conn->sock[FIRSTSOCKET]; + state->state = TFTP_STATE_START; + state->error = TFTP_ERR_NONE; +- state->blksize = blksize; ++ state->blksize = TFTP_BLKSIZE_DEFAULT; /* Unless updated by OACK response */ + state->requested_blksize = blksize; + + ((struct sockaddr *)&state->local_addr)->sa_family = +-- +2.23.0 +
meta/recipes-support/curl/curl_7.61.0.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ file://CVE-2018-16890.patch \ file://CVE-2019-3822.patch \ file://CVE-2019-3823.patch \ + file://CVE-2019-5482.patch \ " SRC_URI[md5sum] = "31d0a9f48dc796a7db351898a1e5058a"
Signature · 1 line
2.7.4