Skip to contentSkip to conversation

Review request

PATCH New Anuj Mittal 1 participant 8 messages Aug 15, 2021

lore
Share & tools
lore
#0 lore raw

cover Review request

Please review this next set of patches for hardknott. Two intermittent and unrelated failures seen while testing - a valgrind ptest failure and a bitbake timeout while running a oe-selftest.

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2434

Thanks,

Anuj

The following changes since commit 49868162a1a1d088fbaabeffcc2debcbfc17b026:

nettle: update 3.7.2 -> 3.7.3 (2021-08-09 10:19:38 +0800)

are available in the Git repository at:

git://push.openembedded.org/openembedded-core-contrib anujm/hardknott

Armin Kuster (1):
gnutls: Enable seccomp if FEATURE is set

Khem Raj (1):
gnutls: Point to staging area for finding seccomp libs and includes

Sakib Sajal (3):
qemu: fix CVE-2021-3582
qemu: fix CVE-2021-3607
qemu: fix CVE-2021-3608

Vinay Kumar (1):
glibc: Fix CVE-2021-35942

wangmy (1):
gnutls: upgrade 3.7.1 -> 3.7.2

 .../glibc/glibc/CVE-2021-35942.patch          | 44 +++++++++++++++++
 meta/recipes-core/glibc/glibc_2.33.bb         |  1 +
 meta/recipes-devtools/qemu/qemu.inc           |  3 ++
 .../qemu/qemu/CVE-2021-3582.patch             | 47 +++++++++++++++++++
 .../qemu/qemu/CVE-2021-3607.patch             | 43 +++++++++++++++++
 .../qemu/qemu/CVE-2021-3608.patch             | 43 +++++++++++++++++
 .../{gnutls_3.7.1.bb => gnutls_3.7.2.bb}      |  6 +--
 7 files changed, 184 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2021-35942.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3582.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch
 rename meta/recipes-support/gnutls/{gnutls_3.7.1.bb => gnutls_3.7.2.bb} (89%)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/7 glibc: Fix CVE-2021-35942

From: Vinay Kumar <[email protected]>

Source: https://sourceware.org/git/glibc.git
Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=28011

Backported upstream commit 5adda61f62b77384718b4c0d8336ade8f2b4b35c to glibc-2.33 source.

Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=5adda61f62b77384718b4c0d8336ade8f2b4b35c]

---
 .../glibc/glibc/CVE-2021-35942.patch          | 44 +++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.33.bb         |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2021-35942.patch
meta/recipes-core/glibc/glibc/CVE-2021-35942.patch new file +44 -0
new file mode 100644
index 0000000000..5cae1bc91c
@@ -0,0 +1,44 @@
+From 5adda61f62b77384718b4c0d8336ade8f2b4b35c Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <[email protected]>
+Date: Fri, 25 Jun 2021 15:02:47 +0200
+Subject: [PATCH] wordexp: handle overflow in positional parameter number (bug
+ 28011)
+
+Use strtoul instead of atoi so that overflow can be detected.
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=5adda61f62b77384718b4c0d8336ade8f2b4b35c]
+CVE: CVE-2021-35942
+Signed-off-by: Vinay Kumar <[email protected]>
+---
+ posix/wordexp-test.c | 1 +
+ posix/wordexp.c      | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
+index f93a546d7e..9df02dbbb3 100644
+--- a/posix/wordexp-test.c
++++ b/posix/wordexp-test.c
+@@ -183,6 +183,7 @@ struct test_case_struct
+     { 0, NULL, "$var", 0, 0, { NULL, }, IFS },
+     { 0, NULL, "\"\\n\"", 0, 1, { "\\n", }, IFS },
+     { 0, NULL, "", 0, 0, { NULL, }, IFS },
++    { 0, NULL, "${1234567890123456789012}", 0, 0, { NULL, }, IFS },
+ 
+     /* Flags not already covered (testit() has special handling for these) */
+     { 0, NULL, "one two", WRDE_DOOFFS, 2, { "one", "two", }, IFS },
+diff --git a/posix/wordexp.c b/posix/wordexp.c
+index bcbe96e48d..1f3b09f721 100644
+--- a/posix/wordexp.c
++++ b/posix/wordexp.c
+@@ -1399,7 +1399,7 @@ envsubst:
+   /* Is it a numeric parameter? */
+   else if (isdigit (env[0]))
+     {
+-      int n = atoi (env);
++      unsigned long n = strtoul (env, NULL, 10);
+ 
+       if (n >= __libc_argc)
+ 	/* Substitute NULL. */
+-- 
+2.17.1
+
meta/recipes-core/glibc/glibc_2.33.bb +1 -0
index bb35c50c98..7f516d2bbe 100644
@@ -63,6 +63,7 @@ SRC_URI =  "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0001-nptl-Remove-private-futex-optimization-BZ-27304.patch \
            file://CVE-2021-33574_1.patch \
            file://CVE-2021-33574_2.patch \
+           file://CVE-2021-35942.patch \
            "
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/7 qemu: fix CVE-2021-3582

In reply to Anuj Mittal

From: Sakib Sajal <[email protected]>

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2021-3582.patch             | 47 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3582.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index a22721004e..3cef5a2d7e 100644
@@ -66,6 +66,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch \
            file://CVE-2021-3527-1.patch \
            file://CVE-2021-3527-2.patch \
+           file://CVE-2021-3582.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2021-3582.patch new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.31.1
#3 lore raw

PATCH 3/7 qemu: fix CVE-2021-3607

In reply to Anuj Mittal

From: Sakib Sajal <[email protected]>

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2021-3607.patch             | 43 +++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 3cef5a2d7e..0849196650 100644
@@ -67,6 +67,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2021-3527-1.patch \
            file://CVE-2021-3527-2.patch \
            file://CVE-2021-3582.patch \
+           file://CVE-2021-3607.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2021-3607.patch new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.31.1
#4 lore raw

PATCH 4/7 qemu: fix CVE-2021-3608

In reply to Anuj Mittal

From: Sakib Sajal <[email protected]>

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/qemu/CVE-2021-3608.patch             | 43 +++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 0849196650..c3eecea9d4 100644
@@ -68,6 +68,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://CVE-2021-3527-2.patch \
            file://CVE-2021-3582.patch \
            file://CVE-2021-3607.patch \
+           file://CVE-2021-3608.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2021-3608.patch new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.31.1
#5 lore raw

PATCH 5/7 gnutls: Enable seccomp if FEATURE is set

In reply to Anuj Mittal

From: Armin Kuster <[email protected]>

(cherry picked from commit f2527b5567252c7da4fbd863e119c8114e6debcd)
---
 meta/recipes-support/gnutls/gnutls_3.7.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/gnutls/gnutls_3.7.1.bb +1 -1
index 51d472c828..3e1958c969 100644
@@ -27,7 +27,7 @@ SRC_URI[sha256sum] = "3777d7963eca5e06eb315686163b7b3f5045e2baac5e54e038ace9835e
 
 inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
 
-PACKAGECONFIG ??= "libidn"
+PACKAGECONFIG ??= "libidn  ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
 
 # You must also have CONFIG_SECCOMP enabled in the kernel for
 # seccomp to work.
Signature · 1 line
2.31.1
#6 lore raw

PATCH 6/7 gnutls: Point to staging area for finding seccomp libs and includes

In reply to Anuj Mittal

From: Khem Raj <[email protected]>

This ensures that if libseccomp is installed on build host then it does not resort to use it.

Fixes
checking for libseccomp... (cached) yes
checking how to link with libseccomp... /usr/lib/libseccomp.so

Cc Armin Kuster <[email protected]>
(cherry picked from commit 3751ac58720a500e3b749b2296922d7c82db49a1)
---
 meta/recipes-support/gnutls/gnutls_3.7.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/gnutls/gnutls_3.7.1.bb +1 -1
index 3e1958c969..350d0a018b 100644
@@ -31,7 +31,7 @@ PACKAGECONFIG ??= "libidn  ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
 
 # You must also have CONFIG_SECCOMP enabled in the kernel for
 # seccomp to work.
-PACKAGECONFIG[seccomp] = "ac_cv_libseccomp=yes,ac_cv_libseccomp=no,libseccomp"
+PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp"
 PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2"
 PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
 PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
Signature · 1 line
2.31.1
#7 lore raw

PATCH 7/7 gnutls: upgrade 3.7.1 -> 3.7.2

In reply to Anuj Mittal

From: wangmy <[email protected]>

(cherry picked from commit 3593a4c47d5e8faccb27c7cd975f18f90b9cd86f)
---
 .../recipes-support/gnutls/{gnutls_3.7.1.bb => gnutls_3.7.2.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-support/gnutls/{gnutls_3.7.1.bb => gnutls_3.7.2.bb} (96%)
meta/recipes-support/gnutls/gnutls_3.7.2.bb renamed from meta/recipes-support/gnutls/gnutls_3.7.1.bb +1 -1
similarity index 96%
rename from meta/recipes-support/gnutls/gnutls_3.7.1.bb
rename to meta/recipes-support/gnutls/gnutls_3.7.2.bb
index 350d0a018b..430d1f2d7d 100644
@@ -23,7 +23,7 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
            file://arm_eabi.patch \
            "
 
-SRC_URI[sha256sum] = "3777d7963eca5e06eb315686163b7b3f5045e2baac5e54e038ace9835e5cac6f"
+SRC_URI[sha256sum] = "646e6c5a9a185faa4cea796d378a1ba8e1148dbb197ca6605f95986a25af2752"
 
 inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
 
Signature · 1 line
2.31.1