3rd series for meta-openembedded master
cover 3rd series for meta-openembedded master
This time backporting patches and again some CVE_STATUS handling.
Peter Marko (6):
apache2: ignore CVE-1999-1237
rtmpdump: mark CVE-2015-8270, CVE-2015-8271 and CVE-2015-8272 as fixed
rtmpdump: add +git to PV
libconfuse: patch CVE-2022-40320
opusfile: patch CVE-2022-47021
synergy: patch CVE-2020-15117
.../opusfile/opusfile/CVE-2022-47021.patch | 44 +++++++++++++++++ .../opusfile/opusfile_0.12.bb | 2 + .../rtmpdump/rtmpdump_2.4.bb | 5 ++ .../libconfuse/files/CVE-2022-40320.patch | 42 ++++++++++++++++ .../libconfuse/libconfuse_3.3.bb | 1 + .../synergy/synergy/CVE-2020-15117.patch | 48 +++++++++++++++++++ .../recipes-support/synergy/synergy_git.bb | 1 + .../recipes-httpd/apache2/apache2_2.4.62.bb | 1 + 8 files changed, 144 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/opusfile/opusfile/CVE-2022-47021.patch create mode 100755 meta-oe/recipes-support/libconfuse/files/CVE-2022-40320.patch create mode 100644 meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch
Signature · 1 line
2.30.2
PATCH 1/6 apache2: ignore CVE-1999-1237
From: Peter Marko <[email protected]>
This vulnerability is for Apache-AuthenSmb module. Fixed in 0.9, current version is 0.72.
In any case, not part of Apache2 sources.
[1] points to [2], which is archived under [3]
[1] https://nvd.nist.gov/vuln/detail/CVE-1999-1237
[2] http://www.securityfocus.com/archive/1/14384
[3] https://web.archive.org/web/20020618143426/http://online.securityfocus.com/archive/1/14384
--- meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb | 1 + 1 file changed, 1 insertion(+)
meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb +1 -0
@@ -39,6 +39,7 @@ CVE_PRODUCT = "apache:http_server" CVE_STATUS[CVE-1999-0289] = "not-applicable-platform: The current version is not affected. It only applies for Windows" CVE_STATUS[CVE-1999-0678] = "not-applicable-platform: this CVE is for Debian packaging configuration" +CVE_STATUS[CVE-1999-1237] = "cpe-incorrect: This is vulnerability of Apache AuthenSmb module, fixed in 0.9" CVE_STATUS[CVE-1999-1412] = "not-applicable-platform: this CVE is for MAC OS X specific problem" CVE_STATUS[CVE-2007-0086] = "disputed: this CVE is officially disputed by Redhat" CVE_STATUS[CVE-2007-0450] = "not-applicable-platform: The current version is not affected. It only applies for Windows."
Signature · 1 line
2.30.2
PATCH 2/6 rtmpdump: mark CVE-2015-8270, CVE-2015-8271 and CVE-2015-8272 as fixed
In reply to Peter MarkoFrom: Peter Marko <[email protected]>
This CVE is marked as fixed by Debian.
Extracting Debian jessie Debian sources [1] shows 4 commits uses for backports. All these commits are already included in current hash ([2]-[5]).
../tmp/work/core2-64-poky-linux/rtmpdump/2.4/git$ git log | grep 'commit \(10b580aabcec1621b25518271ba1ab2b018be88e\|...\|4312322107a94c81d3ec5b98f91bc6b923551dc5\)' commit 530f9bb2a02a78c1198fb2bf0293a12d225e4691
commit 4312322107a94c81d3ec5b98f91bc6b923551dc5
commit 39ec7eda489717d503bc4cbfaa591c93205695b6
commit 10b580aabcec1621b25518271ba1ab2b018be88e
[1] https://snapshot.debian.org/archive/debian/20170704T094954Z/pool/main/r/rtmpdump/rtmpdump_2.4%2B20150115.gita107cef-1%2Bdeb8u1.debian.tar.xz
[2] https://git.ffmpeg.org/gitweb/rtmpdump.git/commitdiff/10b580aabcec1621b25518271ba1ab2b018be88e
[3] https://git.ffmpeg.org/gitweb/rtmpdump.git/commitdiff/39ec7eda489717d503bc4cbfaa591c93205695b6
[4] https://git.ffmpeg.org/gitweb/rtmpdump.git/commitdiff/530f9bb2a02a78c1198fb2bf0293a12d225e4691
[5] https://git.ffmpeg.org/gitweb/rtmpdump.git/commitdiff/4312322107a94c81d3ec5b98f91bc6b923551dc5
--- meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb +4 -0
@@ -14,6 +14,10 @@ SRC_URI = " \ S = "${WORKDIR}/git" +CVE_STATUS_GROUPS += "CVES_2015" +CVES_2015 = "CVE-2015-8270 CVE-2015-8271 CVE-2015-8272" +CVES_2015[status] = "fixed-version: patched in current git hash" + inherit autotools-brokensep EXTRA_OEMAKE = " \
Signature · 1 line
2.30.2
PATCH 3/6 rtmpdump: add +git to PV
In reply to Peter MarkoFrom: Peter Marko <[email protected]>
We fetch newer hash than 2.4 version.
--- meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb | 1 + 1 file changed, 1 insertion(+)
meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb +1 -0
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" DEPENDS = "gnutls zlib" +PV .= "+git" SRCREV = "fa8646daeb19dfd12c181f7d19de708d623704c0" SRC_URI = " \ git://git.ffmpeg.org/rtmpdump;branch=master \
Signature · 1 line
2.30.2
PATCH 4/6 libconfuse: patch CVE-2022-40320
In reply to Peter MarkoFrom: Peter Marko <[email protected]>
Pick patch per [1] poiting to [2] pointing to [3].
[1] https://nvd.nist.gov/vuln/detail/CVE-2022-40320
[2] https://github.com/libconfuse/libconfuse/issues/163
[3] https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b
--- .../libconfuse/files/CVE-2022-40320.patch | 42 +++++++++++++++++++ .../libconfuse/libconfuse_3.3.bb | 1 + 2 files changed, 43 insertions(+) create mode 100755 meta-oe/recipes-support/libconfuse/files/CVE-2022-40320.patch
meta-oe/recipes-support/libconfuse/files/CVE-2022-40320.patch new file +42 -0
@@ -0,0 +1,42 @@ +From d73777c2c3566fb2647727bb56d9a2295b81669b Mon Sep 17 00:00:00 2001 +From: Joachim Wiberg <[email protected]> +Date: Fri, 2 Sep 2022 16:12:46 +0200 +Subject: [PATCH] Fix #163: unterminated username used with getpwnam() + +Signed-off-by: Joachim Wiberg <[email protected]> + +CVE: CVE-2022-40320 +Upstream-Status: Backport [https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b] +Signed-off-by: Peter Marko <[email protected]> +--- + src/confuse.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/confuse.c b/src/confuse.c +index 6d1fdbd..05566b5 100644 +--- a/src/confuse.c ++++ b/src/confuse.c +@@ -1872,17 +1872,20 @@ DLLIMPORT char *cfg_tilde_expand(const char *filename) + file = filename + 1; + } else { + /* ~user or ~user/path */ +- char *user; ++ char *user; /* ~user or ~user/path */ ++ size_t len; + + file = strchr(filename, '/'); + if (file == 0) + file = filename + strlen(filename); + +- user = malloc(file - filename); ++ len = file - filename - 1; ++ user = malloc(len + 1); + if (!user) + return NULL; + +- strncpy(user, filename + 1, file - filename - 1); ++ strncpy(user, &filename[1], len); ++ user[len] = 0; + passwd = getpwnam(user); + free(user); + }
meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb +1 -0
@@ -6,6 +6,7 @@ SRC_URI = "https://github.com/libconfuse/libconfuse/releases/download/v${PV}/con SRC_URI[sha256sum] = "3a59ded20bc652eaa8e6261ab46f7e483bc13dad79263c15af42ecbb329707b8" SRC_URI += "file://0001-only-apply-search-path-logic-to-relative-pathnames.patch" +SRC_URI += "file://CVE-2022-40320.patch" inherit autotools-brokensep pkgconfig gettext
Signature · 1 line
2.30.2
PATCH 5/6 opusfile: patch CVE-2022-47021
In reply to Peter MarkoFrom: Peter Marko <[email protected]>
This patch is mentioned in [1] and [2].
[1] https://nvd.nist.gov/vuln/detail/CVE-2022-47021
[2] https://github.com/xiph/opusfile/issues/36
--- .../opusfile/opusfile/CVE-2022-47021.patch | 44 +++++++++++++++++++ .../opusfile/opusfile_0.12.bb | 2 + 2 files changed, 46 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/opusfile/opusfile/CVE-2022-47021.patch
meta-multimedia/recipes-multimedia/opusfile/opusfile/CVE-2022-47021.patch new file +44 -0
@@ -0,0 +1,44 @@ +From 0a4cd796df5b030cb866f3f4a5e41a4b92caddf5 Mon Sep 17 00:00:00 2001 +From: Ralph Giles <[email protected]> +Date: Tue, 6 Sep 2022 19:04:31 -0700 +Subject: [PATCH] Propagate allocation failure from ogg_sync_buffer. + +Instead of segfault, report OP_EFAULT if ogg_sync_buffer returns +a null pointer. This allows more graceful recovery by the caller +in the unlikely event of a fallible ogg_malloc call. + +We do check the return value elsewhere in the code, so the new +checks make the code more consistent. + +Thanks to https://github.com/xiph/opusfile/issues/36 for reporting. + +Signed-off-by: Timothy B. Terriberry <[email protected]> +Signed-off-by: Mark Harris <[email protected]> + +CVE: CVE-2022-47021 +Upstream-Status: Backport [https://github.com/xiph/opusfile/commit/0a4cd796df5b030cb866f3f4a5e41a4b92caddf5] +Signed-off-by: Peter Marko <[email protected]> +--- + src/opusfile.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/opusfile.c b/src/opusfile.c +index ca219b2..3c3c81e 100644 +--- a/src/opusfile.c ++++ b/src/opusfile.c +@@ -148,6 +148,7 @@ static int op_get_data(OggOpusFile *_of,int _nbytes){ + int nbytes; + OP_ASSERT(_nbytes>0); + buffer=(unsigned char *)ogg_sync_buffer(&_of->oy,_nbytes); ++ if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT; + nbytes=(int)(*_of->callbacks.read)(_of->stream,buffer,_nbytes); + OP_ASSERT(nbytes<=_nbytes); + if(OP_LIKELY(nbytes>0))ogg_sync_wrote(&_of->oy,nbytes); +@@ -1527,6 +1528,7 @@ static int op_open1(OggOpusFile *_of, + if(_initial_bytes>0){ + char *buffer; + buffer=ogg_sync_buffer(&_of->oy,(long)_initial_bytes); ++ if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT; + memcpy(buffer,_initial_data,_initial_bytes*sizeof(*buffer)); + ogg_sync_wrote(&_of->oy,(long)_initial_bytes); + }
meta-multimedia/recipes-multimedia/opusfile/opusfile_0.12.bb +2 -0
@@ -11,4 +11,6 @@ SRC_URI = "https://downloads.xiph.org/releases/opus/${BP}.tar.gz" SRC_URI[md5sum] = "45e8c62f6cd413395223c82f06bfa8ec" SRC_URI[sha256sum] = "118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b" +SRC_URI += "file://CVE-2022-47021.patch" + inherit autotools pkgconfig
Signature · 1 line
2.30.2
PATCH 6/6 synergy: patch CVE-2020-15117
In reply to Peter MarkoFrom: Peter Marko <[email protected]>
Pick commit based on [1].
Note that the pick is node from deskflow, which is open-source successor of synergy.
If anyone uses thie recipe, it should be switched.
[1] https://github.com/deskflow/deskflow/security/advisories/GHSA-chfm-333q-gfpp
--- .../synergy/synergy/CVE-2020-15117.patch | 48 +++++++++++++++++++ .../recipes-support/synergy/synergy_git.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch
meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 79efdb7c617b809e1a2daf17441d7a30f7046aa5 Mon Sep 17 00:00:00 2001 +From: Jnewbon <[email protected]> +Date: Tue, 14 Jul 2020 13:14:40 +0100 +Subject: [PATCH] Merge pull request from GHSA-chfm-333q-gfpp + +Attempts to fis DoS to servers with less then 4GB memory + +CVE: CVE-2020-15117 +Upstream-Status: Backport [https://github.com/deskflow/deskflow/commit/0a97c2be0da2d0df25cb86dfd642429e7a8bea39] +Signed-off-by: Peter Marko <[email protected]> +--- + src/lib/synergy/ProtocolUtil.cpp | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/lib/synergy/ProtocolUtil.cpp b/src/lib/synergy/ProtocolUtil.cpp +index d9f5dc324..7d2c37ff8 100644 +--- a/src/lib/synergy/ProtocolUtil.cpp ++++ b/src/lib/synergy/ProtocolUtil.cpp +@@ -61,6 +61,9 @@ ProtocolUtil::readf(synergy::IStream* stream, const char* fmt, ...) + catch (XIO&) { + result = false; + } ++ catch (std::bad_alloc & exception) { ++ result = false; ++ } + va_end(args); + return result; + } +@@ -216,7 +219,15 @@ ProtocolUtil::vreadf(synergy::IStream* stream, const char* fmt, va_list args) + // allocate a buffer to read the data + UInt8* sBuffer = buffer; + if (!useFixed) { +- sBuffer = new UInt8[len]; ++ try{ ++ sBuffer = new UInt8[len]; ++ } ++ catch (std::bad_alloc & exception) { ++ // Added try catch due to GHSA-chfm-333q-gfpp ++ LOG((CLOG_ERR "ALLOC: Unable to allocate memory %d bytes", len)); ++ LOG((CLOG_DEBUG "bad_alloc detected: Do you have enough free memory?")); ++ throw exception; ++ } + } + + // read the data +-- +2.30.2 +
meta-oe/recipes-support/synergy/synergy_git.bb +1 -0
@@ -10,6 +10,7 @@ DEPENDS = "virtual/libx11 libxtst libxinerama curl openssl" REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = "git://github.com/symless/synergy-core;protocol=https;nobranch=1" +SRC_URI += "file://CVE-2020-15117.patch" # Version 1.10.1-stable SRCREV ?= "1b4c076127687aceac931d269e898beaac1cad9f"
Signature · 1 line
2.30.2