Review request
cover Review request
Please review these changes for hardknott. One intermittent failure seen when running SDK tests on Centos-8 but that doesn't look related to these changes.
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2660
Thanks,
Anuj
The following changes since commit 437f5e04c92158d3c9e27fe6252260a02a108391:
ffmpeg: fix CVE-2021-38114 (2021-09-24 10:17:24 +0100)
are available in the Git repository at:
git://push.openembedded.org/openembedded-core-contrib anujm/hardknott
Konrad Weihmann (1):
expat: pull from github releases
Mingli Yu (1):
vim: fix CVEs
Richard Purdie (5):
pybootchart: Avoid divide by zero oeqa/qemurunner: Use oe._exit(), not sys.exit() oeqa/selftest/gotoolchain: Fix temp file cleanup oeqa/buildproject: Ensure temp directories are cleaned up
bash: Ensure deterministic build
Steve Sakoman (1):
connman: add CVE_PRODUCT
Tom Pollard (2):
bzip2: Update soname for libbz2 1.0.8
libsamplerate0: Set correct soname for 0.1.9
meta/lib/oeqa/selftest/cases/gotoolchain.py | 6 +++ meta/lib/oeqa/utils/buildproject.py | 3 ++ meta/lib/oeqa/utils/qemurunner.py | 2 +- meta/lib/oeqa/utils/targetbuild.py | 4 +- meta/recipes-connectivity/connman/connman.inc | 2 + meta/recipes-core/expat/expat_2.2.10.bb | 6 ++- meta/recipes-extended/bash/bash.inc | 5 ++ meta/recipes-extended/bzip2/bzip2/Makefile.am | 2 +- .../libsamplerate0/shared_version_info.patch | 13 +++++ .../libsamplerate/libsamplerate0_0.1.9.bb | 1 + .../vim/files/CVE-2021-3778.patch | 34 +++++++++++++ .../vim/files/CVE-2021-3796.patch | 50 +++++++++++++++++++ meta/recipes-support/vim/vim.inc | 2 + scripts/pybootchartgui/pybootchartgui/draw.py | 5 +- 14 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch create mode 100644 meta/recipes-support/vim/files/CVE-2021-3778.patch create mode 100644 meta/recipes-support/vim/files/CVE-2021-3796.patch
Signature · 1 line
2.31.1
PATCH 1/10 vim: fix CVEs
From: Mingli Yu <[email protected]>
Backport patches to fix CVE-2021-3778 and CVE-2021-3796.
--- .../vim/files/CVE-2021-3778.patch | 34 +++++++++++++ .../vim/files/CVE-2021-3796.patch | 50 +++++++++++++++++++ meta/recipes-support/vim/vim.inc | 2 + 3 files changed, 86 insertions(+) create mode 100644 meta/recipes-support/vim/files/CVE-2021-3778.patch create mode 100644 meta/recipes-support/vim/files/CVE-2021-3796.patch
meta/recipes-support/vim/files/CVE-2021-3778.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 9ba62f1042513fcadcc4e8fdcee171db66ef1d69 Mon Sep 17 00:00:00 2001 +From: Bram Moolenaar <[email protected]> +Date: Fri, 24 Sep 2021 15:15:24 +0800 +Subject: [PATCH] patch 8.2.3409: reading beyond end of line with invalid utf-8 + character + +Problem: Reading beyond end of line with invalid utf-8 character. +Solution: Check for NUL when advancing. + +Upstream-Status: Backport [https://github.com/vim/vim/commit/65b605665997fad54ef39a93199e305af2fe4d7f] +CVE: CVE-2021-3778 + +Signed-off-by: Mingli Yu <[email protected]> +--- + src/regexp_nfa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c +index fb512f961..2806408de 100644 +--- a/src/regexp_nfa.c ++++ b/src/regexp_nfa.c +@@ -5455,7 +5455,8 @@ find_match_text(colnr_T startcol, int regstart, char_u *match_text) + match = FALSE; + break; + } +- len2 += MB_CHAR2LEN(c2); ++ len2 += enc_utf8 ? utf_ptr2len(rex.line + col + len2) ++ : MB_CHAR2LEN(c2); + } + if (match + // check that no composing char follows +-- +2.17.1 +
meta/recipes-support/vim/files/CVE-2021-3796.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-support/vim/vim.inc +2 -0
@@ -17,6 +17,8 @@ SRC_URI = "git://github.com/vim/vim.git \ file://0001-src-Makefile-improve-reproducibility.patch \ file://no-path-adjust.patch \ file://racefix.patch \ + file://CVE-2021-3778.patch \ + file://CVE-2021-3796.patch \ " SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
Signature · 1 line
2.31.1
PATCH 2/10 connman: add CVE_PRODUCT
In reply to Anuj MittalFrom: Steve Sakoman <[email protected]>
Upstream database uses both "connman" and "connection_manager" to report CVEs
--- meta/recipes-connectivity/connman/connman.inc | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-connectivity/connman/connman.inc +2 -0
@@ -15,6 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ inherit autotools pkgconfig systemd update-rc.d update-alternatives +CVE_PRODUCT = "connman connection_manager" + DEPENDS = "dbus glib-2.0 ppp" EXTRA_OECONF += "\
Signature · 1 line
2.31.1
PATCH 3/10 expat: pull from github releases
In reply to Anuj MittalFrom: Konrad Weihmann <[email protected]>
sometimes we can find release tarballs from sourceforge are not fully distributed along all download mirrors leading to fetching failures, depending on what download mirror will be chosen by sourceforge servers.
As the project moved to github anyway, it's better to pull the tarballs directly from github releases - serving the very same static artifacts.
Add an override UPSTREAM_CHECK_URI to enable devtool upgrade checks
--- meta/recipes-core/expat/expat_2.2.10.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-core/expat/expat_2.2.10.bb +5 -1
@@ -6,12 +6,16 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9" -SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \ +VERSION_TAG = "${@d.getVar('PV').replace('.', '_')}" + +SRC_URI = "https://github.com/libexpat/libexpat/releases/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \ file://libtool-tag.patch \ file://run-ptest \ file://0001-Add-output-of-tests-result.patch \ " +UPSTREAM_CHECK_URI = "https://github.com/libexpat/libexpat/releases/" + SRC_URI[sha256sum] = "b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5" EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF"
Signature · 1 line
2.31.1
PATCH 4/10 pybootchart: Avoid divide by zero
In reply to Anuj MittalFrom: Richard Purdie <[email protected]>
Avoid a rare divide by zero error if there isn't data point spread.
[YOCTO #14547]
--- scripts/pybootchartgui/pybootchartgui/draw.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/pybootchartgui/pybootchartgui/draw.py +4 -1
@@ -267,7 +267,10 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range): # avoid divide by zero if max_y == 0: max_y = 1.0 - xscale = float (chart_bounds[2]) / (max_x - x_shift) + if (max_x - x_shift): + xscale = float (chart_bounds[2]) / (max_x - x_shift) + else: + xscale = float (chart_bounds[2]) # If data_range is given, scale the chart so that the value range in # data_range matches the chart bounds exactly. # Otherwise, scale so that the actual data matches the chart bounds.
Signature · 1 line
2.31.1
PATCH 5/10 bzip2: Update soname for libbz2 1.0.8
In reply to Anuj MittalFrom: Tom Pollard <[email protected]>
Set shared library name as libbz2.so.1.0.8, version in configure.ac already synced via do_configure PV substitution.
--- meta/recipes-extended/bzip2/bzip2/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/bzip2/bzip2/Makefile.am +1 -1
@@ -1,6 +1,6 @@ lib_LTLIBRARIES = libbz2.la -libbz2_la_LDFLAGS = -version-info 1:6:0 +libbz2_la_LDFLAGS = -version-info 1:8:0 libbz2_la_SOURCES = blocksort.c \ huffman.c \
Signature · 1 line
2.31.1
PATCH 6/10 libsamplerate0: Set correct soname for 0.1.9
In reply to Anuj MittalFrom: Tom Pollard <[email protected]>
Manually patch SHARED_VERSION_INFO, which was missed in the 0.1.9 release and later incorrectly fixed until 0.2.1
--- .../libsamplerate0/shared_version_info.patch | 13 +++++++++++++ .../libsamplerate/libsamplerate0_0.1.9.bb | 1 + 2 files changed, 14 insertions(+) create mode 100644 meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch
meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: libsamplerate-0.1.8/configure.ac +=================================================================== +--- libsamplerate-0.1.8.orig/configure.ac ++++ libsamplerate-0.1.8/configure.ac +@@ -53,7 +53,7 @@ AC_PROG_LN_S + # 6. If any interfaces have been removed since the last public release, then set age + # to 0. + +-SHARED_VERSION_INFO="1:8:1" ++SHARED_VERSION_INFO="1:9:1" + + +
meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb +1 -0
@@ -10,6 +10,7 @@ PR = "r1" SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz \ file://0001-configure.ac-improve-alsa-handling.patch \ + file://shared_version_info.patch \ " SRC_URI[md5sum] = "2b78ae9fe63b36b9fbb6267fad93f259"
Signature · 1 line
2.31.1
PATCH 7/10 oeqa/qemurunner: Use oe._exit(), not sys.exit()
In reply to Anuj MittalFrom: Richard Purdie <[email protected]>
sys.exit will cause finally statements and other code to run at exit. Since we're using os.fork() here, os._exit() is apprioriate in this codepath.
--- meta/lib/oeqa/utils/qemurunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/utils/qemurunner.py +1 -1
@@ -235,7 +235,7 @@ class QemuRunner: r = os.fdopen(r) x = r.read() os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM) - sys.exit(0) + os._exit(0) self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid) self.logger.debug("waiting at most %s seconds for qemu pid (%s)" %
Signature · 1 line
2.31.1
PATCH 8/10 oeqa/selftest/gotoolchain: Fix temp file cleanup
In reply to Anuj MittalFrom: Richard Purdie <[email protected]>
The go tests leave readonly files and directories behind. Fix this to allow cleanup.
[YOCTO #14575]
--- meta/lib/oeqa/selftest/cases/gotoolchain.py | 6 ++++++ 1 file changed, 6 insertions(+)
meta/lib/oeqa/selftest/cases/gotoolchain.py +6 -0
@@ -43,6 +43,12 @@ class oeGoToolchainSelfTest(OESelftestTestCase): @classmethod def tearDownClass(cls): + # Go creates file which are readonly + for dirpath, dirnames, filenames in os.walk(cls.tmpdir_SDKQA): + for filename in filenames + dirnames: + f = os.path.join(dirpath, filename) + if not os.path.islink(f): + os.chmod(f, 0o775) shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True) super(oeGoToolchainSelfTest, cls).tearDownClass()
Signature · 1 line
2.31.1
PATCH 9/10 oeqa/buildproject: Ensure temp directories are cleaned up
In reply to Anuj MittalFrom: Richard Purdie <[email protected]>
--- meta/lib/oeqa/utils/buildproject.py | 3 +++ meta/lib/oeqa/utils/targetbuild.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-)
meta/lib/oeqa/utils/buildproject.py +3 -0
@@ -18,6 +18,7 @@ class BuildProject(metaclass=ABCMeta): def __init__(self, uri, foldername=None, tmpdir=None, dl_dir=None): self.uri = uri self.archive = os.path.basename(uri) + self.tempdirobj = None if not tmpdir: self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-') tmpdir = self.tempdirobj.name
@@ -57,6 +58,8 @@ class BuildProject(metaclass=ABCMeta): return self._run('cd %s; make install %s' % (self.targetdir, install_args)) def clean(self): + if self.tempdirobj: + self.tempdirobj.cleanup() if not self.needclean: return self._run('rm -rf %s' % self.targetdir)
meta/lib/oeqa/utils/targetbuild.py +3 -1
@@ -19,6 +19,7 @@ class BuildProject(metaclass=ABCMeta): self.d = d self.uri = uri self.archive = os.path.basename(uri) + self.tempdirobj = None if not tmpdir: tmpdir = self.d.getVar('WORKDIR') if not tmpdir:
@@ -71,9 +72,10 @@ class BuildProject(metaclass=ABCMeta): return self._run('cd %s; make install %s' % (self.targetdir, install_args)) def clean(self): + if self.tempdirobj: + self.tempdirobj.cleanup() self._run('rm -rf %s' % self.targetdir) subprocess.check_call('rm -f %s' % self.localarchive, shell=True) - pass class TargetBuildProject(BuildProject):
Signature · 1 line
2.31.1
PATCH 10/10 bash: Ensure deterministic build
In reply to Anuj MittalFrom: Richard Purdie <[email protected]>
Bash keeps a count of the number of times make was invoked on a directory and changes the output versioning accordingly. We want deterministic output so disable this behaviour.
--- meta/recipes-extended/bash/bash.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-extended/bash/bash.inc +5 -0
@@ -62,6 +62,11 @@ do_compile_ptest () { oe_runmake buildtest } +do_install_prepend () { + # Ensure determinism as this counter increases for each make call + rm -f ${B}/.build +} + do_install_append () { # Move /usr/bin/bash to /bin/bash, if need if [ "${base_bindir}" != "${bindir}" ]; then
Signature · 1 line
2.31.1