python3: Upgrade 3.7.7 -> 3.7.8
PATCH 1/19 python3: Upgrade 3.7.7 -> 3.7.8
Backported patch removed.
---
...20-8492-Fix-AbstractBasicAuthHandler.patch | 248 ------------------
.../{python3_3.7.7.bb => python3_3.7.8.bb} | 5 +-
2 files changed, 2 insertions(+), 251 deletions(-)
delete mode 100644 meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch
rename meta/recipes-devtools/python/{python3_3.7.7.bb => python3_3.7.8.bb} (98%)meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch deleted +0 -248
@@ -1,248 +0,0 @@ -From 0b297d4ff1c0e4480ad33acae793fbaf4bf015b4 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <[email protected]> -Date: Thu, 2 Apr 2020 02:52:20 +0200 -Subject: [PATCH] bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler - (GH-18284) - -Upstream-Status: Backport -(https://github.com/python/cpython/commit/0b297d4ff1c0e4480ad33acae793fbaf4bf015b4) - -CVE: CVE-2020-8492 - -The AbstractBasicAuthHandler class of the urllib.request module uses -an inefficient regular expression which can be exploited by an -attacker to cause a denial of service. Fix the regex to prevent the -catastrophic backtracking. Vulnerability reported by Ben Caller -and Matt Schwager. - -AbstractBasicAuthHandler of urllib.request now parses all -WWW-Authenticate HTTP headers and accepts multiple challenges per -header: use the realm of the first Basic challenge. - -Co-Authored-By: Serhiy Storchaka <[email protected]> -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_urllib2.py | 90 ++++++++++++------- - Lib/urllib/request.py | 69 ++++++++++---- - .../2020-03-25-16-02-16.bpo-39503.YmMbYn.rst | 3 + - .../2020-01-30-16-15-29.bpo-39503.B299Yq.rst | 5 ++ - 4 files changed, 115 insertions(+), 52 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst - create mode 100644 Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst - -diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py -index 8abedaac98..e69ac3e213 100644 ---- a/Lib/test/test_urllib2.py -+++ b/Lib/test/test_urllib2.py -@@ -1446,40 +1446,64 @@ class HandlerTests(unittest.TestCase): - bypass = {'exclude_simple': True, 'exceptions': []} - self.assertTrue(_proxy_bypass_macosx_sysconf('test', bypass)) - -- def test_basic_auth(self, quote_char='"'): -- opener = OpenerDirector() -- password_manager = MockPasswordManager() -- auth_handler = urllib.request.HTTPBasicAuthHandler(password_manager) -- realm = "ACME Widget Store" -- http_handler = MockHTTPHandler( -- 401, 'WWW-Authenticate: Basic realm=%s%s%s\r\n\r\n' % -- (quote_char, realm, quote_char)) -- opener.add_handler(auth_handler) -- opener.add_handler(http_handler) -- self._test_basic_auth(opener, auth_handler, "Authorization", -- realm, http_handler, password_manager, -- "http://acme.example.com/protected", -- "http://acme.example.com/protected", -- ) -- -- def test_basic_auth_with_single_quoted_realm(self): -- self.test_basic_auth(quote_char="'") -- -- def test_basic_auth_with_unquoted_realm(self): -- opener = OpenerDirector() -- password_manager = MockPasswordManager() -- auth_handler = urllib.request.HTTPBasicAuthHandler(password_manager) -- realm = "ACME Widget Store" -- http_handler = MockHTTPHandler( -- 401, 'WWW-Authenticate: Basic realm=%s\r\n\r\n' % realm) -- opener.add_handler(auth_handler) -- opener.add_handler(http_handler) -- with self.assertWarns(UserWarning): -+ def check_basic_auth(self, headers, realm): -+ with self.subTest(realm=realm, headers=headers): -+ opener = OpenerDirector() -+ password_manager = MockPasswordManager() -+ auth_handler = urllib.request.HTTPBasicAuthHandler(password_manager) -+ body = '\r\n'.join(headers) + '\r\n\r\n' -+ http_handler = MockHTTPHandler(401, body) -+ opener.add_handler(auth_handler) -+ opener.add_handler(http_handler) - self._test_basic_auth(opener, auth_handler, "Authorization", -- realm, http_handler, password_manager, -- "http://acme.example.com/protected", -- "http://acme.example.com/protected", -- ) -+ realm, http_handler, password_manager, -+ "http://acme.example.com/protected", -+ "http://acme.example.com/protected") -+ -+ def test_basic_auth(self): -+ realm = "[email protected]" -+ realm2 = "[email protected]" -+ basic = f'Basic realm="{realm}"' -+ basic2 = f'Basic realm="{realm2}"' -+ other_no_realm = 'Otherscheme xxx' -+ digest = (f'Digest realm="{realm2}", ' -+ f'qop="auth, auth-int", ' -+ f'nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", ' -+ f'opaque="5ccc069c403ebaf9f0171e9517f40e41"') -+ for realm_str in ( -+ # test "quote" and 'quote' -+ f'Basic realm="{realm}"', -+ f"Basic realm='{realm}'", -+ -+ # charset is ignored -+ f'Basic realm="{realm}", charset="UTF-8"', -+ -+ # Multiple challenges per header -+ f'{basic}, {basic2}', -+ f'{basic}, {other_no_realm}', -+ f'{other_no_realm}, {basic}', -+ f'{basic}, {digest}', -+ f'{digest}, {basic}', -+ ): -+ headers = [f'WWW-Authenticate: {realm_str}'] -+ self.check_basic_auth(headers, realm) -+ -+ # no quote: expect a warning -+ with support.check_warnings(("Basic Auth Realm was unquoted", -+ UserWarning)): -+ headers = [f'WWW-Authenticate: Basic realm={realm}'] -+ self.check_basic_auth(headers, realm) -+ -+ # Multiple headers: one challenge per header. -+ # Use the first Basic realm. -+ for challenges in ( -+ [basic, basic2], -+ [basic, digest], -+ [digest, basic], -+ ): -+ headers = [f'WWW-Authenticate: {challenge}' -+ for challenge in challenges] -+ self.check_basic_auth(headers, realm) - - def test_proxy_basic_auth(self): - opener = OpenerDirector() -diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py -index 7fe50535da..2a3d71554f 100644 ---- a/Lib/urllib/request.py -+++ b/Lib/urllib/request.py -@@ -937,8 +937,15 @@ class AbstractBasicAuthHandler: - - # allow for double- and single-quoted realm values - # (single quotes are a violation of the RFC, but appear in the wild) -- rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+' -- 'realm=(["\']?)([^"\']*)\\2', re.I) -+ rx = re.compile('(?:^|,)' # start of the string or ',' -+ '[ \t]*' # optional whitespaces -+ '([^ \t]+)' # scheme like "Basic" -+ '[ \t]+' # mandatory whitespaces -+ # realm=xxx -+ # realm='xxx' -+ # realm="xxx" -+ 'realm=(["\']?)([^"\']*)\\2', -+ re.I) - - # XXX could pre-emptively send auth info already accepted (RFC 2617, - # end of section 2, and section 1.2 immediately after "credentials" -@@ -950,27 +957,51 @@ class AbstractBasicAuthHandler: - self.passwd = password_mgr - self.add_password = self.passwd.add_password - -+ def _parse_realm(self, header): -+ # parse WWW-Authenticate header: accept multiple challenges per header -+ found_challenge = False -+ for mo in AbstractBasicAuthHandler.rx.finditer(header): -+ scheme, quote, realm = mo.groups() -+ if quote not in ['"', "'"]: -+ warnings.warn("Basic Auth Realm was unquoted", -+ UserWarning, 3) -+ -+ yield (scheme, realm) -+ -+ found_challenge = True -+ -+ if not found_challenge: -+ if header: -+ scheme = header.split()[0] -+ else: -+ scheme = '' -+ yield (scheme, None) -+ - def http_error_auth_reqed(self, authreq, host, req, headers): - # host may be an authority (without userinfo) or a URL with an - # authority -- # XXX could be multiple headers -- authreq = headers.get(authreq, None) -+ headers = headers.get_all(authreq) -+ if not headers: -+ # no header found -+ return - -- if authreq: -- scheme = authreq.split()[0] -- if scheme.lower() != 'basic': -- raise ValueError("AbstractBasicAuthHandler does not" -- " support the following scheme: '%s'" % -- scheme) -- else: -- mo = AbstractBasicAuthHandler.rx.search(authreq) -- if mo: -- scheme, quote, realm = mo.groups() -- if quote not in ['"',"'"]: -- warnings.warn("Basic Auth Realm was unquoted", -- UserWarning, 2) -- if scheme.lower() == 'basic': -- return self.retry_http_basic_auth(host, req, realm) -+ unsupported = None -+ for header in headers: -+ for scheme, realm in self._parse_realm(header): -+ if scheme.lower() != 'basic': -+ unsupported = scheme -+ continue -+ -+ if realm is not None: -+ # Use the first matching Basic challenge. -+ # Ignore following challenges even if they use the Basic -+ # scheme. -+ return self.retry_http_basic_auth(host, req, realm) -+ -+ if unsupported is not None: -+ raise ValueError("AbstractBasicAuthHandler does not " -+ "support the following scheme: %r" -+ % (scheme,)) - - def retry_http_basic_auth(self, host, req, realm): - user, pw = self.passwd.find_user_password(realm, host) -diff --git a/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst b/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst -new file mode 100644 -index 0000000000..be80ce79d9 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst -@@ -0,0 +1,3 @@ -+:class:`~urllib.request.AbstractBasicAuthHandler` of :mod:`urllib.request` -+now parses all WWW-Authenticate HTTP headers and accepts multiple challenges -+per header: use the realm of the first Basic challenge. -diff --git a/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst b/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst -new file mode 100644 -index 0000000000..9f2800581c ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst -@@ -0,0 +1,5 @@ -+CVE-2020-8492: The :class:`~urllib.request.AbstractBasicAuthHandler` class of the -+:mod:`urllib.request` module uses an inefficient regular expression which can -+be exploited by an attacker to cause a denial of service. Fix the regex to -+prevent the catastrophic backtracking. Vulnerability reported by Ben Caller -+and Matt Schwager. --- -2.24.1 -
meta/recipes-devtools/python/python3_3.7.8.bb renamed from meta/recipes-devtools/python/python3_3.7.7.bb +2 -3
@@ -29,7 +29,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ file://0001-test_locale.py-correct-the-test-output-format.patch \ file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \ - file://0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch \ " SRC_URI_append_class-native = " \
@@ -41,8 +40,8 @@ SRC_URI_append_class-nativesdk = " \ file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \ " -SRC_URI[md5sum] = "172c650156f7bea68ce31b2fd01fa766" -SRC_URI[sha256sum] = "06a0a9f1bf0d8cd1e4121194d666c4e28ddae4dd54346de6c343206599f02136" +SRC_URI[md5sum] = "a224ef2249a18824f48fba9812f4006f" +SRC_URI[sha256sum] = "43a543404b363f0037f89df8478f19db2dbc0d6f3ffee310bc2997fa71854a63" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
Signature · 1 line
2.17.1
PATCH 2/19 timezone: upgrade 2019c -> 2020a
From: Pierre-Jean Texier <[email protected]>
See full changelog https://github.com/eggert/tz/blob/master/NEWS#L11
(From OE-Core rev: 9d74b048e3a160d7a9a20e85817e9eb3a558af63)
--- meta/recipes-extended/timezone/timezone.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-extended/timezone/timezone.inc +5 -5
@@ -4,7 +4,7 @@ SECTION = "base" LICENSE = "PD & BSD & BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" -PV = "2019c" +PV = "2020a" SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
@@ -12,7 +12,7 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" -SRC_URI[tzcode.md5sum] = "195a17454c5db05cab96595380650391" -SRC_URI[tzcode.sha256sum] = "f6ebd3668e02d5ed223d3b7b1947561bf2d2da2f4bd1db61efefd9e06c167ed4" -SRC_URI[tzdata.md5sum] = "f6987e6dfdb2eb83a1b5076a50b80894" -SRC_URI[tzdata.sha256sum] = "79c7806dab09072308da0e3d22c37d3b245015a591891ea147d3b133b60ffc7c" +SRC_URI[tzcode.md5sum] = "f87c3477e85a5c4b00df0def6c6a0055" +SRC_URI[tzcode.sha256sum] = "7d2af7120ee03df71fbca24031ccaf42404752e639196fe93c79a41b38a6d669" +SRC_URI[tzdata.md5sum] = "96a985bb8eeab535fb8aa2132296763a" +SRC_URI[tzdata.sha256sum] = "547161eca24d344e0b5f96aff6a76b454da295dc14ed4ca50c2355043fb899a2"
Signature · 1 line
2.17.1
PATCH 3/19 sqlite: backport CVE fix
In reply to Adrian BunkFrom: Sakib Sajal <[email protected]>
Fixes CVE-2020-11655
(From OE-Core rev: 3b06a6c73f4e49c6d00f758423c2e8865ec2de00)
--- .../sqlite/files/CVE-2020-11655.patch | 32 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.29.0.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-support/sqlite/files/CVE-2020-11655.patch
meta/recipes-support/sqlite/files/CVE-2020-11655.patch new file +32 -0
@@ -0,0 +1,32 @@ +From a4601326d61bf1a11151ac6b78b50804bfd03b4d Mon Sep 17 00:00:00 2001 +From: Sakib Sajal <[email protected]> +Date: Thu, 30 Apr 2020 10:46:16 -0700 +Subject: [PATCH 2/2] In the event of a semantic error in an aggregate query, + early-out the resetAccumulator() function to prevent problems due to + incomplete or incorrect initialization of the AggInfo object. Fix for ticket + [af4556bb5c285c08]. + +FossilOrigin-Name: 4a302b42c7bf5e11ddb5522ca999f74aba397d3a7eb91b1844bb02852f772441 +Upstream Status: Backport [c415d91007e1680e4eb17def583b202c3c83c718] + +CVE: CVE-2020-11655 +Signed-off-by: Sakib Sajal <[email protected]> +--- + sqlite3.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sqlite3.c b/sqlite3.c +index 1df6633..726adf7 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -133242,6 +133242,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){ + struct AggInfo_func *pFunc; + int nReg = pAggInfo->nFunc + pAggInfo->nColumn; + if( nReg==0 ) return; ++ if( pParse->nErr ) return; + #ifdef SQLITE_DEBUG + /* Verify that all AggInfo registers are within the range specified by + ** AggInfo.mnReg..AggInfo.mxReg */ +-- +2.17.1 +
meta/recipes-support/sqlite/sqlite3_3.29.0.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2019-19926.patch \ file://CVE-2019-19959.patch \ file://CVE-2019-20218.patch \ + file://CVE-2020-11655.patch \ " SRC_URI[md5sum] = "8f3dfe83387e62ecb91c7c5c09c688dc" SRC_URI[sha256sum] = "8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b"
Signature · 1 line
2.17.1
PATCH 4/19 gcr: depends on gnupg-native
In reply to Adrian BunkFrom: Kai Kang <[email protected]>
It fails to build gcr if no commmand gpg on build host:
| meson.build:44:0: ERROR: Program(s) ['gpg2', 'gpg'] not found or not executable
Add dependency gnupg-native to fix the error.
(From OE-Core rev: da7360247995d7c8e79dfcaa0c0761952a9013f1)
--- meta/recipes-gnome/gcr/gcr_3.28.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gcr/gcr_3.28.1.bb +1 -1
@@ -5,7 +5,7 @@ BUGTRACKER = "https://bugzilla.gnome.org/" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" -DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt \ +DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt gnupg-native \ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}" inherit gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
Signature · 1 line
2.17.1
PATCH 5/19 file: add bzip2-replacement-native to DEPENDS to fix sstate issue
In reply to Adrian BunkFrom: Jan-Simon Moeller <[email protected]>
file-native when built on a Debian 10 host will embed a dependency to 'libbz2.so.1.0' (instead of 'libbz2.so.1'). This can cause issues when sharing the sstate between hosts e.g.:
recipe-sysroot-native/usr/lib/rpm/rpmdeps:
error while loading shared libraries: libbz2.so.1.0: \
cannot open shared object file: No such file or directory
To avoid this situation, let's add the bzip2-replacement-native to the file recipe's DEPENDS_class-native .
Details in https://bugzilla.yoctoproject.org/show_bug.cgi?id=13915 .
(From OE-Core rev: 5a2bc3bfa9e1a4f37b6e26a5c40a4a9c025d03f1)
--- meta/recipes-devtools/file/file_5.37.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/file/file_5.37.bb +1 -1
@@ -9,7 +9,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b" DEPENDS = "zlib file-replacement-native" -DEPENDS_class-native = "zlib-native" +DEPENDS_class-native = "zlib-native bzip2-replacement-native" # Blacklist a bogus tag in upstream check UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
Signature · 1 line
2.17.1
PATCH 6/19 cve-check: Run it after do_fetch
In reply to Adrian BunkFrom: Khem Raj <[email protected]>
Certain recipes e.g. bash readline ( from meta-gplv2 ) download patches instead of having them in metadata, this could fail cve_check
ERROR: readline-5.2-r9 do_cve_check: File Not found: qemuarm/build/../downloads/readline52-001
This patch ensures that download is done before running CVE scan, even though these will be external patches and may not contain CVE tags as it expects, but it will fix the run failures as seen above
(From OE-Core rev: dbf143d79476e54e8da93101fc16eaedeec88362)
--- meta/classes/cve-check.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/cve-check.bbclass +1 -1
@@ -65,7 +65,7 @@ python do_cve_check () { } -addtask cve_check before do_build +addtask cve_check before do_build after do_fetch do_cve_check[depends] = "cve-update-db-native:do_populate_cve_db" do_cve_check[nostamp] = "1"
Signature · 1 line
2.17.1
PATCH 7/19 libexif: fix CVE-2020-13114
In reply to Adrian BunkFrom: Lee Chee Yang <[email protected]>
(From OE-Core rev: 2e497029ee00babbc50f3c1d99580230bc46155c)
--- .../libexif/libexif/CVE-2020-13114.patch | 73 +++++++++++++++++++ .../recipes-support/libexif/libexif_0.6.21.bb | 4 +- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/libexif/libexif/CVE-2020-13114.patch
meta/recipes-support/libexif/libexif/CVE-2020-13114.patch new file +73 -0
@@ -0,0 +1,73 @@ +From 47f51be021f4dfd800d4ff4630659887378baa3a Mon Sep 17 00:00:00 2001 +From: Dan Fandrich <[email protected]> +Date: Sat, 16 May 2020 19:32:30 +0200 +Subject: [PATCH] Add a failsafe on the maximum number of Canon MakerNote + + subtags. + +A malicious file could be crafted to cause extremely large values in some +tags without tripping any buffer range checks. This is bad with the libexif +representation of Canon MakerNotes because some arrays are turned into +individual tags that the application must loop around. + +The largest value I've seen for failsafe_size in a (very small) sample of valid +Canon files is <5000. The limit is set two orders of magnitude larger to avoid +tripping up falsely in case some models use much larger values. + +Patch from Google. + +CVE-2020-13114 + +Upstream-Status: Backport [https://github.com/libexif/libexif/commit/e6a38a1a23ba94d139b1fa2cd4519fdcfe3c9bab] +CVE: CVE-2020-13114 +Signed-off-by: Lee Chee Yang <[email protected]> +--- + libexif/canon/exif-mnote-data-canon.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/libexif/canon/exif-mnote-data-canon.c b/libexif/canon/exif-mnote-data-canon.c +index eb53598..72fd7a3 100644 +--- a/libexif/canon/exif-mnote-data-canon.c ++++ b/libexif/canon/exif-mnote-data-canon.c +@@ -32,6 +32,9 @@ + + #define DEBUG + ++/* Total size limit to prevent abuse by DoS */ ++#define FAILSAFE_SIZE_MAX 1000000L ++ + static void + exif_mnote_data_canon_clear (ExifMnoteDataCanon *n) + { +@@ -202,6 +205,7 @@ exif_mnote_data_canon_load (ExifMnoteData *ne, + ExifMnoteDataCanon *n = (ExifMnoteDataCanon *) ne; + ExifShort c; + size_t i, tcount, o, datao; ++ long failsafe_size = 0; + + if (!n || !buf || !buf_size) { + exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, +@@ -280,6 +284,23 @@ exif_mnote_data_canon_load (ExifMnoteData *ne, + memcpy (n->entries[tcount].data, buf + dataofs, s); + } + ++ /* Track the size of decoded tag data. A malicious file could ++ * be crafted to cause extremely large values here without ++ * tripping any buffer range checks. This is especially bad ++ * with the libexif representation of Canon MakerNotes because ++ * some arrays are turned into individual tags that the ++ * application must loop around. */ ++ failsafe_size += mnote_canon_entry_count_values(&n->entries[tcount]); ++ ++ if (failsafe_size > FAILSAFE_SIZE_MAX) { ++ /* Abort if the total size of the data in the tags extraordinarily large, */ ++ exif_mem_free (ne->mem, n->entries[tcount].data); ++ exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, ++ "ExifMnoteCanon", "Failsafe tag size overflow (%lu > %ld)", ++ failsafe_size, FAILSAFE_SIZE_MAX); ++ break; ++ } ++ + /* Tag was successfully parsed */ + ++tcount; + }
meta/recipes-support/libexif/libexif_0.6.21.bb +3 -1
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad" SRC_URI = "${SOURCEFORGE_MIRROR}/libexif/libexif-${PV}.tar.bz2 \ file://CVE-2017-7544.patch \ file://CVE-2016-6328.patch \ - file://CVE-2018-20030.patch" + file://CVE-2018-20030.patch \ + file://CVE-2020-13114.patch \ +" SRC_URI[md5sum] = "27339b89850f28c8f1c237f233e05b27" SRC_URI[sha256sum] = "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
Signature · 1 line
2.17.1
PATCH 8/19 cve-check: include epoch in product version output
In reply to Adrian BunkFrom: Ralph Siemsen <[email protected]>
In the generated cve.log files, include the epoch in the product version. This better matches how versions are displayed elsewhere, in particular the bb.warn("Found unpatched CVE...") that appears on the terminal when CVEs are found.
(From OE-Core rev: 99f6de1c74b581054c74c6b4598a5d47facc9964)
--- meta/classes/cve-check.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/cve-check.bbclass +1 -1
@@ -301,7 +301,7 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): for cve in sorted(cve_data): write_string += "PACKAGE NAME: %s\n" % d.getVar("PN") - write_string += "PACKAGE VERSION: %s\n" % d.getVar("PV") + write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) write_string += "CVE: %s\n" % cve if cve in whitelisted: write_string += "CVE STATUS: Whitelisted\n"
Signature · 1 line
2.17.1
PATCH 9/19 patchelf: Add patch to address corrupt shared library issue
In reply to Adrian BunkFrom: Richard Purdie <[email protected]>
patchelf can corrupt shared libraries if the program headers don't immediately follow the elf header. Add a patch submitted upstream to address this.
(From OE-Core rev: faaf5f34332290708f3720a5488b3d1549d9e95a)
--- .../patchelf/patchelf/fix-phdrs.patch | 37 +++++++++++++++++++ .../patchelf/patchelf_0.10.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch
meta/recipes-devtools/patchelf/patchelf/fix-phdrs.patch new file +37 -0
@@ -0,0 +1,37 @@ +When running patchelf on some existing patchelf'd binaries to change to longer +RPATHS, ldd would report the binaries as invalid. The output of objdump -x on +those libraryies should show the top of the .dynamic section is getting trashed, +something like: + +0x600000001 0x0000000000429000 +0x335000 0x0000000000335000 +0xc740 0x000000000000c740 +0x1000 0x0000000000009098 +SONAME libglib-2.0.so.0 + +(which should be RPATH and DT_NEEDED entries) + +This was tracked down to the code which injects the PT_LOAD section. + +The issue is that if the program headers were previously relocated to the end +of the file which was how patchelf operated previously, the relocation code +wouldn't work properly on a second run as it now assumes they're located after +the elf header. This change forces them back to immediately follow the elf +header which is where the code has made space for them. + +Upstream-Status: Submitted [https://github.com/NixOS/patchelf/pull/202] +Signed-off-by: Richard Purdie <[email protected]> +RP 2020/6/2 + +Index: git/src/patchelf.cc +=================================================================== +--- git.orig/src/patchelf.cc ++++ git/src/patchelf.cc +@@ -762,6 +762,7 @@ void ElfFile<ElfFileParamNames>::rewrite + } + + /* Add a segment that maps the replaced sections into memory. */ ++ wri(hdr->e_phoff, sizeof(Elf_Ehdr)); + phdrs.resize(rdi(hdr->e_phnum) + 1); + wri(hdr->e_phnum, rdi(hdr->e_phnum) + 1); + Elf_Phdr & phdr = phdrs[rdi(hdr->e_phnum) - 1];
meta/recipes-devtools/patchelf/patchelf_0.10.bb +1 -0
@@ -1,6 +1,7 @@ SRC_URI = "https://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \ file://handle-read-only-files.patch \ file://fix-adjusting-startPage.patch \ + file://fix-phdrs.patch \ " LICENSE = "GPLv3"
Signature · 1 line
2.17.1
PATCH 10/19 vim: _FORTIFY_SOURCE=2 be gone
In reply to Adrian BunkFrom: Joe Slater <[email protected]>
vim will abort in many places with this setting. Replace it with the benign _FORTIFY_SOURCE=1.
(From OE-Core rev: d9de155f6452f916edd3131addd0c2eebaf4d639)
--- meta/recipes-support/vim/vim_8.1.1518.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-support/vim/vim_8.1.1518.bb +5 -0
@@ -8,3 +8,8 @@ BBCLASSEXTEND = "native" ALTERNATIVE_${PN}_append = " xxd" ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd" ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" + +# We override the default in security_flags.inc because vim (not vim-tiny!) will abort +# in many places for _FORTIFY_SOURCE=2. Security flags become part of CC. +# +lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=1',d)}"
Signature · 1 line
2.17.1
PATCH 11/19 wpa-supplicant: remove service templates from SYSTEMD_SERVICE
In reply to Adrian BunkFrom: Kai Kang <[email protected]>
Remove service templates [email protected] and [email protected] from SYSTEMD_SERVICE that they should NOT be started/stopped by calling 'systemctl' in postinst and prerm scripts.
(From OE-Core rev: 7910a0d6f332253608767a9576a0d521dd87efd7)
--- .../wpa-supplicant/wpa-supplicant_2.9.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb +3 -3
@@ -15,7 +15,7 @@ PACKAGECONFIG[openssl] = ",,openssl" inherit pkgconfig systemd -SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service [email protected] [email protected]" +SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service" SYSTEMD_AUTO_ENABLE = "disable" SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
@@ -37,13 +37,13 @@ S = "${WORKDIR}/wpa_supplicant-${PV}" PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli " FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase" FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli" -FILES_${PN} += "${datadir}/dbus-1/system-services/*" +FILES_${PN} += "${datadir}/dbus-1/system-services/* ${systemd_system_unitdir}/*" CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf" do_configure () { ${MAKE} -C wpa_supplicant clean install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config - + if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then ssl=openssl elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
Signature · 1 line
2.17.1
PATCH 12/19 encodings: clear postinst script
In reply to Adrian BunkFrom: Kai Kang <[email protected]>
Postinst script from xorg-font-common.inc doesn't apply to this recipe. So clear the postinst script of encodings.
(From OE-Core rev: ba94c908b99713ce115e9240df525c6442a60c7a)
--- meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +4 -0
@@ -19,3 +19,7 @@ SRC_URI[sha256sum] = "bd96e16143a044b19e87f217cf6a3763a70c561d1076aad6f6d862ec41 inherit allarch EXTRA_OECONF += "--with-encodingsdir=${datadir}/fonts/X11/encodings" + +# postinst from .inc doesn't apply to this recipe +pkg_postinst_${PN} () { +}
Signature · 1 line
2.17.1
PATCH 13/19 mtd-utils: Fix return value of ubiformat
In reply to Adrian BunkFrom: Otavio Salvador <[email protected]>
This changeset fixes a feature regression in ubiformat. Older versions of ubiformat, when invoked with a flash-image, would return 0 in the case no error was encountered. Upon upgrading to latest, it was discovered that ubiformat returned 255 even without encountering an error condition.
This changeset corrects the above issue and causes ubiformat, when given an image file, to return 0 when no errors are detected.
Backport fix from 2.1.2
(From OE-Core rev: 3ee98b6c9ddd1dd0825245ca672236b7befb9859)
--- ...-utils-Fix-return-value-of-ubiformat.patch | 62 +++++++++++++++++++ meta/recipes-devtools/mtd/mtd-utils_git.bb | 1 + 2 files changed, 63 insertions(+) create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-mtd-utils-Fix-return-value-of-ubiformat.patch
meta/recipes-devtools/mtd/mtd-utils/0001-mtd-utils-Fix-return-value-of-ubiformat.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 4d19bffcfd66e25d3ee74536ae2d2da7ad52e8e2 Mon Sep 17 00:00:00 2001 +From: Barry Grussling <[email protected]> +Date: Sun, 12 Jan 2020 12:33:32 -0800 +Subject: [PATCH] mtd-utils: Fix return value of ubiformat +Organization: O.S. Systems Software LTDA. + +This changeset fixes a feature regression in ubiformat. Older versions of +ubiformat, when invoked with a flash-image, would return 0 in the case no error +was encountered. Upon upgrading to latest, it was discovered that ubiformat +returned 255 even without encountering an error condition. + +This changeset corrects the above issue and causes ubiformat, when given an +image file, to return 0 when no errors are detected. + +Tested by running through my loading scripts and verifying ubiformat returned +0. + +Upstream-Status: Backport [2.1.2] + +Signed-off-by: Barry Grussling <[email protected]> +Signed-off-by: David Oberhollenzer <[email protected]> +Signed-off-by: Otavio Salvador <[email protected]> +--- + ubi-utils/ubiformat.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c +index a90627c..5377b12 100644 +--- a/ubi-utils/ubiformat.c ++++ b/ubi-utils/ubiformat.c +@@ -550,6 +550,7 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd, + struct ubi_vtbl_record *vtbl; + int eb1 = -1, eb2 = -1; + long long ec1 = -1, ec2 = -1; ++ int ret = -1; + + write_size = UBI_EC_HDR_SIZE + mtd->subpage_size - 1; + write_size /= mtd->subpage_size; +@@ -643,8 +644,10 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd, + if (!args.quiet && !args.verbose) + printf("\n"); + +- if (novtbl) ++ if (novtbl) { ++ ret = 0; + goto out_free; ++ } + + if (eb1 == -1 || eb2 == -1) { + errmsg("no eraseblocks for volume table"); +@@ -669,7 +672,7 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd, + + out_free: + free(hdr); +- return -1; ++ return ret; + } + + int main(int argc, char * const argv[]) +-- +2.27.0 +
meta/recipes-devtools/mtd/mtd-utils_git.bb +1 -0
@@ -15,6 +15,7 @@ PV = "2.1.1" SRCREV = "4443221ce9b88440cd9f5bb78e6fe95621d36c8a" SRC_URI = "git://git.infradead.org/mtd-utils.git \ file://add-exclusion-to-mkfs-jffs2-git-2.patch \ + file://0001-mtd-utils-Fix-return-value-of-ubiformat.patch \ " S = "${WORKDIR}/git/"
Signature · 1 line
2.17.1
PATCH 14/19 bind: update 9.11.5-P4 -> 9.11.13
In reply to Adrian BunkFrom: Alexander Kanavin <[email protected]>
Drop backports.
Drop 0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch and 0001-lib-dns-gen.c-fix-too-long-error.patch as problem is fixed upstream.
(From OE-Core rev: 6965ec5c491e71d5951dfb58fc060bd0b717e33d)
---
.../bind/0001-bind-fix-CVE-2019-6471.patch | 64 --
....in-remove-useless-L-use_openssl-lib.patch | 18 +-
...01-fix-enforcement-of-tcp-clients-v1.patch | 60 --
...c-extend-DIRNAMESIZE-from-256-to-512.patch | 22 -
...001-lib-dns-gen.c-fix-too-long-error.patch | 31 -
...p-clients-could-still-be-exceeded-v2.patch | 670 -------------
...rence-counter-for-pipeline-groups-v3.patch | 278 ------
...accounting-and-client-mortality-chec.patch | 512 ----------
...a-and-pipeline-refs-allow-special-ca.patch | 911 ------------------
...allowance-for-tcp-clients-interfaces.patch | 80 --
...perations-in-bin-named-client.c-with.patch | 140 ---
...ching-for-json-headers-searches-sysr.patch | 15 +-
.../{bind_9.11.5-P4.bb => bind_9.11.13.bb} | 20 +-
13 files changed, 20 insertions(+), 2801 deletions(-)
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
rename meta/recipes-connectivity/bind/{bind_9.11.5-P4.bb => bind_9.11.13.bb} (85%)meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch deleted +0 -64
@@ -1,64 +0,0 @@ -Backport patch to fix CVE-2019-6471. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2019-6471 - -CVE: CVE-2019-6471 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb] - -Signed-off-by: Kai Kang <[email protected]> - -From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001 -From: Mark Andrews <[email protected]> -Date: Tue, 19 Mar 2019 14:14:21 +1100 -Subject: [PATCH] move item_out test inside lock in dns_dispatch_getnext() - -(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712) ---- - lib/dns/dispatch.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c -index 408beda367..3278db4a07 100644 ---- a/lib/dns/dispatch.c -+++ b/lib/dns/dispatch.c -@@ -134,7 +134,7 @@ struct dns_dispentry { - isc_task_t *task; - isc_taskaction_t action; - void *arg; -- bool item_out; -+ bool item_out; - dispsocket_t *dispsocket; - ISC_LIST(dns_dispatchevent_t) items; - ISC_LINK(dns_dispentry_t) link; -@@ -3422,13 +3422,14 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) { - disp = resp->disp; - REQUIRE(VALID_DISPATCH(disp)); - -- REQUIRE(resp->item_out == true); -- resp->item_out = false; -- - ev = *sockevent; - *sockevent = NULL; - - LOCK(&disp->lock); -+ -+ REQUIRE(resp->item_out == true); -+ resp->item_out = false; -+ - if (ev->buffer.base != NULL) - free_buffer(disp, ev->buffer.base, ev->buffer.length); - free_devent(disp, ev); -@@ -3573,6 +3574,9 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp, - isc_task_send(disp->task[0], &disp->ctlevent); - } - -+/* -+ * disp must be locked. -+ */ - static void - do_cancel(dns_dispatch_t *disp) { - dns_dispatchevent_t *ev; --- -2.20.1 -
meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch +8 -10
@@ -1,4 +1,4 @@ -From 950867d9fd3f690e271c8c807b6eed144b2935b2 Mon Sep 17 00:00:00 2001 +From 2325a92f1896a2a7f586611686801b41fbc91b50 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 27 Aug 2018 15:00:51 +0800 Subject: [PATCH] configure.in: remove useless `-L$use_openssl/lib'
@@ -10,15 +10,16 @@ and helpful for clean up host build path in isc-config.sh Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Hongxu Jia <[email protected]> + --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.in b/configure.in -index 54efc55..76ac0eb 100644 ---- a/configure.in -+++ b/configure.in -@@ -1691,7 +1691,7 @@ If you don't want OpenSSL, use --without-openssl]) +diff --git a/configure.ac b/configure.ac +index e85a5c6..2bbfc58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1631,7 +1631,7 @@ If you don't want OpenSSL, use --without-openssl]) fi ;; *)
@@ -27,6 +28,3 @@ index 54efc55..76ac0eb 100644 ;; esac fi --- -2.7.4 -
meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch deleted +0 -60
60 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch deleted +0 -22
@@ -1,22 +0,0 @@ -Upstream-Status: Pending - -Subject: gen.c: extend DIRNAMESIZE from 256 to 512 - -Signed-off-by: Chen Qi <[email protected]> ---- - lib/dns/gen.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: bind-9.11.3/lib/dns/gen.c -=================================================================== ---- bind-9.11.3.orig/lib/dns/gen.c -+++ bind-9.11.3/lib/dns/gen.c -@@ -130,7 +130,7 @@ static const char copyright[] = - #define TYPECLASSBUF (TYPECLASSLEN + 1) - #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" - #define ATTRIBUTESIZE 256 --#define DIRNAMESIZE 256 -+#define DIRNAMESIZE 512 - - static struct cc { - struct cc *next;
meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001 -From: Robert Yang <[email protected]> -Date: Wed, 16 Sep 2015 20:23:47 -0700 -Subject: [PATCH] lib/dns/gen.c: fix too long error - -The 512 is a little short when build in deep dir, and cause "too long" -error, use PATH_MAX if defined. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <[email protected]> ---- - lib/dns/gen.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: bind-9.11.3/lib/dns/gen.c -=================================================================== ---- bind-9.11.3.orig/lib/dns/gen.c -+++ bind-9.11.3/lib/dns/gen.c -@@ -130,7 +130,11 @@ static const char copyright[] = - #define TYPECLASSBUF (TYPECLASSLEN + 1) - #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" - #define ATTRIBUTESIZE 256 -+#ifdef PATH_MAX -+#define DIRNAMESIZE PATH_MAX -+#else - #define DIRNAMESIZE 512 -+#endif - - static struct cc { - struct cc *next;
meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch deleted +0 -670
670 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch deleted +0 -278
278 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch deleted +0 -512
512 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch deleted +0 -911
911 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch deleted +0 -80
80 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch deleted +0 -140
140 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch +8 -7
@@ -1,4 +1,4 @@ -From 9473d29843579802e96b0293a3e953fed93de82c Mon Sep 17 00:00:00 2001 +From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001 From: Paul Gortmaker <[email protected]> Date: Tue, 9 Jun 2015 11:22:00 -0400 Subject: [PATCH] bind: ensure searching for json headers searches sysroot
@@ -27,15 +27,16 @@ to make use of the combination some day. Upstream-Status: Inappropriate [OE Specific] Signed-off-by: Paul Gortmaker <[email protected]> + --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: bind-9.11.3/configure.in -=================================================================== ---- bind-9.11.3.orig/configure.in -+++ bind-9.11.3/configure.in -@@ -2574,7 +2574,7 @@ case "$use_libjson" in +diff --git a/configure.ac b/configure.ac +index 17392fd..e85a5c6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2449,7 +2449,7 @@ case "$use_libjson" in libjson_libs="" ;; auto|yes)
meta/recipes-connectivity/bind/bind_9.11.13.bb renamed from meta/recipes-connectivity/bind/bind_9.11.5-P4.bb +4 -16
@@ -15,25 +15,13 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://make-etc-initd-bind-stop-work.patch \ file://init.d-add-support-for-read-only-rootfs.patch \ file://bind-ensure-searching-for-json-headers-searches-sysr.patch \ - file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \ - file://0001-lib-dns-gen.c-fix-too-long-error.patch \ file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ file://0001-avoid-start-failure-with-bind-user.patch \ - file://0001-bind-fix-CVE-2019-6471.patch \ - file://0001-fix-enforcement-of-tcp-clients-v1.patch \ - file://0002-tcp-clients-could-still-be-exceeded-v2.patch \ - file://0003-use-reference-counter-for-pipeline-groups-v3.patch \ - file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \ - file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \ - file://0006-restore-allowance-for-tcp-clients-interfaces.patch \ - file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \ - file://CVE-2020-8616.patch \ - file://CVE-2020-8617.patch \ -" - -SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960" -SRC_URI[sha256sum] = "7e8c08192bcbaeb6e9f2391a70e67583b027b90e8c4bc1605da6eb126edde434" + " + +SRC_URI[md5sum] = "17de0d024ab1eac377f1c2854dc25057" +SRC_URI[sha256sum] = "fd3f3cc9fcfcdaa752db35eb24598afa1fdcc2509d3227fc90a8631b7b400f7d" UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
Signature · 1 line
2.17.1
PATCH 15/19 bind: update to 9.11.19
In reply to Adrian BunkFrom: akuster <[email protected]>
Bug fix only updates.
suitable for Stable branch updates where applicable.
Drop CVE patches included in updateLIC_FILES_CHKSUM update copyright year to 2020
Full changes found at : https://gitlab.isc.org/isc-projects/bind9/-/blob/v9_11/CHANGES
(From OE-Core rev: c672d2b6c98607f1fda917f4a3189a53712e8fc2)
---
.../bind/bind/CVE-2020-8616.patch | 206 ------------------
.../bind/bind/CVE-2020-8617.patch | 29 ---
.../bind/{bind_9.11.13.bb => bind_9.11.19.bb} | 5 +-
3 files changed, 2 insertions(+), 238 deletions(-)
delete mode 100644 meta/recipes-connectivity/bind/bind/CVE-2020-8616.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/CVE-2020-8617.patch
rename meta/recipes-connectivity/bind/{bind_9.11.13.bb => bind_9.11.19.bb} (96%)meta/recipes-connectivity/bind/bind/CVE-2020-8616.patch deleted +0 -206
@@ -1,206 +0,0 @@ -Upstream-Status: Backport [https://downloads.isc.org/isc/bind9/9.11.19/patches/CVE-2020-8616.patch] -CVE: CVE-2020-8616 -Signed-off-by: Lee Chee Yang <[email protected]> ---- -diff --git a/lib/dns/adb.c b/lib/dns/adb.c -index 058495f6a5..6b8a9537f0 100644 ---- a/lib/dns/adb.c -+++ b/lib/dns/adb.c -@@ -404,14 +404,13 @@ static void log_quota(dns_adbentry_t *entry, const char *fmt, ...) - */ - #define FIND_WANTEVENT(fn) (((fn)->options & DNS_ADBFIND_WANTEVENT) != 0) - #define FIND_WANTEMPTYEVENT(fn) (((fn)->options & DNS_ADBFIND_EMPTYEVENT) != 0) --#define FIND_AVOIDFETCHES(fn) (((fn)->options & DNS_ADBFIND_AVOIDFETCHES) \ -- != 0) --#define FIND_STARTATZONE(fn) (((fn)->options & DNS_ADBFIND_STARTATZONE) \ -- != 0) --#define FIND_HINTOK(fn) (((fn)->options & DNS_ADBFIND_HINTOK) != 0) --#define FIND_GLUEOK(fn) (((fn)->options & DNS_ADBFIND_GLUEOK) != 0) --#define FIND_HAS_ADDRS(fn) (!ISC_LIST_EMPTY((fn)->list)) --#define FIND_RETURNLAME(fn) (((fn)->options & DNS_ADBFIND_RETURNLAME) != 0) -+#define FIND_AVOIDFETCHES(fn) (((fn)->options & DNS_ADBFIND_AVOIDFETCHES) != 0) -+#define FIND_STARTATZONE(fn) (((fn)->options & DNS_ADBFIND_STARTATZONE) != 0) -+#define FIND_HINTOK(fn) (((fn)->options & DNS_ADBFIND_HINTOK) != 0) -+#define FIND_GLUEOK(fn) (((fn)->options & DNS_ADBFIND_GLUEOK) != 0) -+#define FIND_HAS_ADDRS(fn) (!ISC_LIST_EMPTY((fn)->list)) -+#define FIND_RETURNLAME(fn) (((fn)->options & DNS_ADBFIND_RETURNLAME) != 0) -+#define FIND_NOFETCH(fn) (((fn)->options & DNS_ADBFIND_NOFETCH) != 0) - - /* - * These are currently used on simple unsigned ints, so they are -@@ -3155,21 +3154,26 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action, - * Listen to negative cache hints, and don't start - * another query. - */ -- if (NCACHE_RESULT(result) || AUTH_NX(result)) -+ if (NCACHE_RESULT(result) || AUTH_NX(result)) { - goto fetch; -+ } - -- if (!NAME_FETCH_V6(adbname)) -+ if (!NAME_FETCH_V6(adbname)) { - wanted_fetches |= DNS_ADBFIND_INET6; -+ } - } - - fetch: - if ((WANT_INET(wanted_addresses) && NAME_HAS_V4(adbname)) || - (WANT_INET6(wanted_addresses) && NAME_HAS_V6(adbname))) -+ { - have_address = true; -- else -+ } else { - have_address = false; -- if (wanted_fetches != 0 && -- ! (FIND_AVOIDFETCHES(find) && have_address)) { -+ } -+ if (wanted_fetches != 0 && !(FIND_AVOIDFETCHES(find) && have_address) && -+ !FIND_NOFETCH(find)) -+ { - /* - * We're missing at least one address family. Either the - * caller hasn't instructed us to avoid fetches, or we don't -@@ -3177,8 +3181,9 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action, - * be acceptable so we have to launch fetches. - */ - -- if (FIND_STARTATZONE(find)) -+ if (FIND_STARTATZONE(find)) { - start_at_zone = true; -+ } - - /* - * Start V4. -diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h -index 63a13c4e41..edf6e54935 100644 ---- a/lib/dns/include/dns/adb.h -+++ b/lib/dns/include/dns/adb.h -@@ -207,6 +207,10 @@ struct dns_adbfind { - * lame for this query. - */ - #define DNS_ADBFIND_OVERQUOTA 0x00000400 -+/*% -+ * Don't perform a fetch even if there are no address records available. -+ */ -+#define DNS_ADBFIND_NOFETCH 0x00000800 - - /*% - * The answers to queries come back as a list of these. -diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c -index 7c44478a26..0a40859d08 100644 ---- a/lib/dns/resolver.c -+++ b/lib/dns/resolver.c -@@ -172,6 +172,14 @@ - #define DEFAULT_MAX_QUERIES 75 - #endif - -+/* -+ * After NS_FAIL_LIMIT attempts to fetch a name server address, -+ * if the number of addresses in the NS RRset exceeds NS_RR_LIMIT, -+ * stop trying to fetch, in order to avoid wasting resources. -+ */ -+#define NS_FAIL_LIMIT 4 -+#define NS_RR_LIMIT 5 -+ - /* Number of hash buckets for zone counters */ - #ifndef RES_DOMAIN_BUCKETS - #define RES_DOMAIN_BUCKETS 523 -@@ -3130,8 +3138,7 @@ sort_finds(dns_adbfindlist_t *findlist, unsigned int bias) { - static void - findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port, - unsigned int options, unsigned int flags, isc_stdtime_t now, -- bool *overquota, bool *need_alternate) --{ -+ bool *overquota, bool *need_alternate, unsigned int *no_addresses) { - dns_adbaddrinfo_t *ai; - dns_adbfind_t *find; - dns_resolver_t *res; -@@ -3219,7 +3226,12 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port, - find->result_v6 != DNS_R_NXDOMAIN) || - (res->dispatches6 == NULL && - find->result_v4 != DNS_R_NXDOMAIN))) -+ { - *need_alternate = true; -+ } -+ if (no_addresses != NULL) { -+ (*no_addresses)++; -+ } - } else { - if ((find->options & DNS_ADBFIND_OVERQUOTA) != 0) { - if (overquota != NULL) -@@ -3270,6 +3282,7 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) { - dns_rdata_ns_t ns; - bool need_alternate = false; - bool all_spilled = true; -+ unsigned int no_addresses = 0; - - FCTXTRACE5("getaddresses", "fctx->depth=", fctx->depth); - -@@ -3437,20 +3450,28 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) { - * Extract the name from the NS record. - */ - result = dns_rdata_tostruct(&rdata, &ns, NULL); -- if (result != ISC_R_SUCCESS) -+ if (result != ISC_R_SUCCESS) { - continue; -+ } - -- findname(fctx, &ns.name, 0, stdoptions, 0, now, -- &overquota, &need_alternate); -+ if (no_addresses > NS_FAIL_LIMIT && -+ dns_rdataset_count(&fctx->nameservers) > NS_RR_LIMIT) -+ { -+ stdoptions |= DNS_ADBFIND_NOFETCH; -+ } -+ findname(fctx, &ns.name, 0, stdoptions, 0, now, &overquota, -+ &need_alternate, &no_addresses); - -- if (!overquota) -+ if (!overquota) { - all_spilled = false; -+ } - - dns_rdata_reset(&rdata); - dns_rdata_freestruct(&ns); - } -- if (result != ISC_R_NOMORE) -+ if (result != ISC_R_NOMORE) { - return (result); -+ } - - /* - * Do we need to use 6 to 4? -@@ -3465,7 +3486,7 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) { - if (!a->isaddress) { - findname(fctx, &a->_u._n.name, a->_u._n.port, - stdoptions, FCTX_ADDRINFO_FORWARDER, -- now, NULL, NULL); -+ now, NULL, NULL, NULL); - continue; - } - if (isc_sockaddr_pf(&a->_u.addr) != family) -@@ -3827,16 +3827,14 @@ fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) { - } - } - -- if (dns_name_countlabels(&fctx->domain) > 2) { -- result = isc_counter_increment(fctx->qc); -- if (result != ISC_R_SUCCESS) { -- isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, -- DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), -- "exceeded max queries resolving '%s'", -- fctx->info); -- fctx_done(fctx, DNS_R_SERVFAIL, __LINE__); -- return; -- } -+ result = isc_counter_increment(fctx->qc); -+ if (result != ISC_R_SUCCESS) { -+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, -+ DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), -+ "exceeded max queries resolving '%s'", -+ fctx->info); -+ fctx_done(fctx, DNS_R_SERVFAIL, __LINE__); -+ return; - } - - bucketnum = fctx->bucketnum;
meta/recipes-connectivity/bind/bind/CVE-2020-8617.patch deleted +0 -29
@@ -1,29 +0,0 @@ -Upstream-Status: Backport [https://downloads.isc.org/isc/bind9/9.11.19/patches/CVE-2020-8617.patch] -CVE: CVE-2020-8617 -Signed-off-by: Lee Chee Yang <[email protected]> ---- -diff --git a/lib/dns/tsig.c b/lib/dns/tsig.c -index b597a18d49..6357a3a486 100644 ---- a/lib/dns/tsig.c -+++ b/lib/dns/tsig.c -@@ -1427,8 +1424,9 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg, - goto cleanup_context; - } - msg->verified_sig = 1; -- } else if (tsig.error != dns_tsigerror_badsig && -- tsig.error != dns_tsigerror_badkey) { -+ } else if (!response || (tsig.error != dns_tsigerror_badsig && -+ tsig.error != dns_tsigerror_badkey)) -+ { - tsig_log(msg->tsigkey, 2, "signature was empty"); - return (DNS_R_TSIGVERIFYFAILURE); - } -@@ -1484,7 +1482,7 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg, - } - } - -- if (tsig.error != dns_rcode_noerror) { -+ if (response && tsig.error != dns_rcode_noerror) { - msg->tsigstatus = tsig.error; - if (tsig.error == dns_tsigerror_badtime) - ret = DNS_R_CLOCKSKEW;
meta/recipes-connectivity/bind/bind_9.11.19.bb renamed from meta/recipes-connectivity/bind/bind_9.11.13.bb +2 -3
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.isc.org/sw/bind/" SECTION = "console/network" LICENSE = "ISC & BSD" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bf39058a7f64b2a934ce14dc9ec1dd45" DEPENDS = "openssl libcap zlib"
@@ -20,8 +20,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://0001-avoid-start-failure-with-bind-user.patch \ " -SRC_URI[md5sum] = "17de0d024ab1eac377f1c2854dc25057" -SRC_URI[sha256sum] = "fd3f3cc9fcfcdaa752db35eb24598afa1fdcc2509d3227fc90a8631b7b400f7d" +SRC_URI[sha256sum] = "0dee554a4caa368948b32da9a0c97b516c19103bc13ff5b3762c5d8552f52329" UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
Signature · 1 line
2.17.1
PATCH 16/19 perl: Fix host specific modules problems
In reply to Adrian BunkFrom: Richard Purdie <[email protected]>
We were seeing a ton of empty perl modules being created such as "perl-module-x86-64-linux-encoding" where the name would include ${TARGET_ARCH}-linux. These files were already being filtered in an earlier do_split_packages() expression so exclude them from the latter one to remove the pointless empty modules in PACKAGES.
This doesn't explain why some were not deterministic but will recude the do_package execution time and clean up the build directories at the very least.
(From OE-Core rev: 5aaf9d3a748cbad17a4a3e5d9715ac2f289b007d)
--- meta/recipes-devtools/perl/perl_5.30.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/perl/perl_5.30.1.bb +1 -1
@@ -271,7 +271,7 @@ python split_perl_packages () { do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) - do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) + do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) # perl-modules should recommend every perl module, and only the # modules. Don't attempt to use the result of do_split_packages() as some
Signature · 1 line
2.17.1
PATCH 17/19 dbus: fix CVE-2020-12049
In reply to Adrian BunkFrom: Lee Chee Yang <[email protected]>
(From OE-Core rev: 3f69946c6159fa359bc5800ee72ef6151d9ecd36)
--- .../dbus/dbus/CVE-2020-12049.patch | 78 +++++++++++++++++++ meta/recipes-core/dbus/dbus_1.12.16.bb | 1 + 2 files changed, 79 insertions(+) create mode 100644 meta/recipes-core/dbus/dbus/CVE-2020-12049.patch
meta/recipes-core/dbus/dbus/CVE-2020-12049.patch new file +78 -0
@@ -0,0 +1,78 @@ +From 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 Mon Sep 17 00:00:00 2001 +From: Simon McVittie <[email protected]> +Date: Thu, 16 Apr 2020 14:45:11 +0100 +Subject: [PATCH] sysdeps-unix: On MSG_CTRUNC, close the fds we did receive + +MSG_CTRUNC indicates that we have received fewer fds that we should +have done because the buffer was too small, but we were treating it +as though it indicated that we received *no* fds. If we received any, +we still have to make sure we close them, otherwise they will be leaked. + +On the system bus, if an attacker can induce us to leak fds in this +way, that's a local denial of service via resource exhaustion. + +Reported-by: Kevin Backhouse, GitHub Security Lab +Fixes: dbus#294 +Fixes: CVE-2020-12049 +Fixes: GHSL-2020-057 + +Upstream-Status: Backport [https://gitlab.freedesktop.org/dbus/dbus/-/commit/872b085f12f56da25a2dbd9bd0b2dff31d5aea63] +CVE: CVE-2020-12049 +Signed-off-by: Lee Chee Yang <[email protected]> +--- + dbus/dbus-sysdeps-unix.c | 32 ++++++++++++++++++++------------ + 1 file changed, 20 insertions(+), 12 deletions(-) + +diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c +index b5fc2466..b176dae1 100644 +--- a/dbus/dbus-sysdeps-unix.c ++++ b/dbus/dbus-sysdeps-unix.c +@@ -435,18 +435,6 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd, + struct cmsghdr *cm; + dbus_bool_t found = FALSE; + +- if (m.msg_flags & MSG_CTRUNC) +- { +- /* Hmm, apparently the control data was truncated. The bad +- thing is that we might have completely lost a couple of fds +- without chance to recover them. Hence let's treat this as a +- serious error. */ +- +- errno = ENOSPC; +- _dbus_string_set_length (buffer, start); +- return -1; +- } +- + for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) + if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS) + { +@@ -501,6 +489,26 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd, + if (!found) + *n_fds = 0; + ++ if (m.msg_flags & MSG_CTRUNC) ++ { ++ unsigned int i; ++ ++ /* Hmm, apparently the control data was truncated. The bad ++ thing is that we might have completely lost a couple of fds ++ without chance to recover them. Hence let's treat this as a ++ serious error. */ ++ ++ /* We still need to close whatever fds we *did* receive, ++ * otherwise they'll never get closed. (CVE-2020-12049) */ ++ for (i = 0; i < *n_fds; i++) ++ close (fds[i]); ++ ++ *n_fds = 0; ++ errno = ENOSPC; ++ _dbus_string_set_length (buffer, start); ++ return -1; ++ } ++ + /* put length back (doesn't actually realloc) */ + _dbus_string_set_length (buffer, start + bytes_read); + +-- +2.25.1 +
meta/recipes-core/dbus/dbus_1.12.16.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ file://tmpdir.patch \ file://dbus-1.init \ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ + file://CVE-2020-12049.patch \ " SRC_URI[md5sum] = "2dbeae80dfc9e3632320c6a53d5e8890"
Signature · 1 line
2.17.1
PATCH 18/19 perl: fix CVE-2020-10543 & CVE-2020-10878
In reply to Adrian BunkFrom: Lee Chee Yang <[email protected]>
(From OE-Core rev: d9c5d9c52eb1f03ff9c907a76dda31042fb26edb)
--- .../perl/files/CVE-2020-10543.patch | 36 +++++ .../perl/files/CVE-2020-10878_1.patch | 152 ++++++++++++++++++ .../perl/files/CVE-2020-10878_2.patch | 36 +++++ meta/recipes-devtools/perl/perl_5.30.1.bb | 3 + 4 files changed, 227 insertions(+) create mode 100644 meta/recipes-devtools/perl/files/CVE-2020-10543.patch create mode 100644 meta/recipes-devtools/perl/files/CVE-2020-10878_1.patch create mode 100644 meta/recipes-devtools/perl/files/CVE-2020-10878_2.patch
meta/recipes-devtools/perl/files/CVE-2020-10543.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 897d1f7fd515b828e4b198d8b8bef76c6faf03ed Mon Sep 17 00:00:00 2001 +From: John Lightsey <[email protected]> +Date: Wed, 20 Nov 2019 20:02:45 -0600 +Subject: [PATCH] regcomp.c: Prevent integer overflow from nested regex + quantifiers. + +(CVE-2020-10543) On 32bit systems the size calculations for nested regular +expression quantifiers could overflow causing heap memory corruption. + +Fixes: Perl/perl5-security#125 +(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) + +Upstream-Status: Backport [https://github.com/perl/perl5/commit/897d1f7fd515b828e4b198d8b8bef76c6faf03ed] +CVE: CVE-2020-10543 +Signed-off-by: Lee Chee Yang <[email protected]> +--- + regcomp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/regcomp.c b/regcomp.c +index 93c8d98fbb0..5f86be8086d 100644 +--- a/regcomp.c ++++ b/regcomp.c +@@ -5489,6 +5489,12 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, + RExC_precomp))); + } + ++ if ( ( minnext > 0 && mincount >= SSize_t_MAX / minnext ) ++ || min >= SSize_t_MAX - minnext * mincount ) ++ { ++ FAIL("Regexp out of space"); ++ } ++ + min += minnext * mincount; + is_inf_internal |= deltanext == SSize_t_MAX + || (maxcount == REG_INFTY && minnext + deltanext > 0);
meta/recipes-devtools/perl/files/CVE-2020-10878_1.patch new file +152 -0
152 lines not on this page · raw message
meta/recipes-devtools/perl/files/CVE-2020-10878_2.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 3295b48defa0f8570114877b063fe546dd348b3c Mon Sep 17 00:00:00 2001 +From: Karl Williamson <[email protected]> +Date: Thu, 20 Feb 2020 17:49:36 +0000 +Subject: [PATCH] regcomp: use long jumps if there is any possibility of + overflow + +(CVE-2020-10878) Be conservative for backporting, we'll aim to do +something more aggressive for bleadperl. + +(cherry picked from commit 9d7759db46f3b31b1d3f79c44266b6ba42a47fc6) + +Upstream-Status: Backport [https://github.com/perl/perl5/commit/3295b48defa0f8570114877b063fe546dd348b3c] +CVE: CVE-2020-10878 +Signed-off-by: Lee Chee Yang <[email protected]> +--- + regcomp.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/regcomp.c b/regcomp.c +index 4ba2980db66..73c35a67020 100644 +--- a/regcomp.c ++++ b/regcomp.c +@@ -7762,6 +7762,13 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, + + /* We have that number in RExC_npar */ + RExC_total_parens = RExC_npar; ++ ++ /* XXX For backporting, use long jumps if there is any possibility of ++ * overflow */ ++ if (RExC_size > U16_MAX && ! RExC_use_BRANCHJ) { ++ RExC_use_BRANCHJ = TRUE; ++ flags |= RESTART_PARSE; ++ } + } + else if (! MUST_RESTART(flags)) { + ReREFCNT_dec(Rx);
meta/recipes-devtools/perl/perl_5.30.1.bb +3 -0
@@ -23,6 +23,9 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \ file://0001-tests-adjust-to-correctly-exclude-unbuilt-extensions.patch \ file://determinism.patch \ file://racefix.patch \ + file://CVE-2020-10543.patch \ + file://CVE-2020-10878_1.patch \ + file://CVE-2020-10878_2.patch \ " SRC_URI_append_class-native = " \ file://perl-configpm-switch.patch \
Signature · 1 line
2.17.1
PATCH 19/19 wpa-supplicant: Security fix CVE-2020-12695
In reply to Adrian BunkFrom: Armin Kuster <[email protected]>
Source: http://w1.fi/security/
Disposition: Backport from http://w1.fi/security/2020-1/
Affects <= 2.9 wpa-supplicant
(From OE-Core rev: 720d29cbfce34375402c6a4c17e440ffbb2659bf)
--- ...allow-event-subscriptions-with-URLs-.patch | 151 ++++++++++++++++++ ...nt-message-generation-using-a-long-U.patch | 62 +++++++ ...HTTP-initiation-failures-for-events-.patch | 50 ++++++ .../wpa-supplicant/wpa-supplicant_2.9.bb | 5 +- 4 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch create mode 100644 meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch new file +151 -0
@@ -0,0 +1,151 @@ +From 5b78c8f961f25f4dc22d6f2b77ddd06d712cec63 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <[email protected]> +Date: Wed, 3 Jun 2020 23:17:35 +0300 +Subject: [PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to + other networks + +The UPnP Device Architecture 2.0 specification errata ("UDA errata +16-04-2020.docx") addresses a problem with notifications being allowed +to go out to other domains by disallowing such cases. Do such filtering +for the notification callback URLs to avoid undesired connections to +external networks based on subscriptions that any device in the local +network could request when WPS support for external registrars is +enabled (the upnp_iface parameter in hostapd configuration). + +Upstream-Status: Backport +CVE: CVE-2020-12695 patch #1 +Signed-off-by: Jouni Malinen <[email protected]> +Signed-off-by: Armin Kuster <[email protected]> + +--- + src/wps/wps_er.c | 2 +- + src/wps/wps_upnp.c | 38 ++++++++++++++++++++++++++++++++++++-- + src/wps/wps_upnp_i.h | 3 ++- + 3 files changed, 39 insertions(+), 4 deletions(-) + +Index: wpa_supplicant-2.9/src/wps/wps_er.c +=================================================================== +--- wpa_supplicant-2.9.orig/src/wps/wps_er.c ++++ wpa_supplicant-2.9/src/wps/wps_er.c +@@ -1298,7 +1298,7 @@ wps_er_init(struct wps_context *wps, con + "with %s", filter); + } + if (get_netif_info(er->ifname, &er->ip_addr, &er->ip_addr_text, +- er->mac_addr)) { ++ NULL, er->mac_addr)) { + wpa_printf(MSG_INFO, "WPS UPnP: Could not get IP/MAC address " + "for %s. Does it have IP address?", er->ifname); + wps_er_deinit(er, NULL, NULL); +Index: wpa_supplicant-2.9/src/wps/wps_upnp.c +=================================================================== +--- wpa_supplicant-2.9.orig/src/wps/wps_upnp.c ++++ wpa_supplicant-2.9/src/wps/wps_upnp.c +@@ -303,6 +303,14 @@ static void subscr_addr_free_all(struct + } + + ++static int local_network_addr(struct upnp_wps_device_sm *sm, ++ struct sockaddr_in *addr) ++{ ++ return (addr->sin_addr.s_addr & sm->netmask.s_addr) == ++ (sm->ip_addr & sm->netmask.s_addr); ++} ++ ++ + /* subscr_addr_add_url -- add address(es) for one url to subscription */ + static void subscr_addr_add_url(struct subscription *s, const char *url, + size_t url_len) +@@ -381,6 +389,7 @@ static void subscr_addr_add_url(struct s + + for (rp = result; rp; rp = rp->ai_next) { + struct subscr_addr *a; ++ struct sockaddr_in *addr = (struct sockaddr_in *) rp->ai_addr; + + /* Limit no. of address to avoid denial of service attack */ + if (dl_list_len(&s->addr_list) >= MAX_ADDR_PER_SUBSCRIPTION) { +@@ -389,6 +398,13 @@ static void subscr_addr_add_url(struct s + break; + } + ++ if (!local_network_addr(s->sm, addr)) { ++ wpa_printf(MSG_INFO, ++ "WPS UPnP: Ignore a delivery URL that points to another network %s", ++ inet_ntoa(addr->sin_addr)); ++ continue; ++ } ++ + a = os_zalloc(sizeof(*a) + alloc_len); + if (a == NULL) + break; +@@ -889,11 +905,12 @@ static int eth_get(const char *device, u + * @net_if: Selected network interface name + * @ip_addr: Buffer for returning IP address in network byte order + * @ip_addr_text: Buffer for returning a pointer to allocated IP address text ++ * @netmask: Buffer for returning netmask or %NULL if not needed + * @mac: Buffer for returning MAC address + * Returns: 0 on success, -1 on failure + */ + int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, +- u8 mac[ETH_ALEN]) ++ struct in_addr *netmask, u8 mac[ETH_ALEN]) + { + struct ifreq req; + int sock = -1; +@@ -919,6 +936,19 @@ int get_netif_info(const char *net_if, u + in_addr.s_addr = *ip_addr; + os_snprintf(*ip_addr_text, 16, "%s", inet_ntoa(in_addr)); + ++ if (netmask) { ++ os_memset(&req, 0, sizeof(req)); ++ os_strlcpy(req.ifr_name, net_if, sizeof(req.ifr_name)); ++ if (ioctl(sock, SIOCGIFNETMASK, &req) < 0) { ++ wpa_printf(MSG_ERROR, ++ "WPS UPnP: SIOCGIFNETMASK failed: %d (%s)", ++ errno, strerror(errno)); ++ goto fail; ++ } ++ addr = (struct sockaddr_in *) &req.ifr_netmask; ++ netmask->s_addr = addr->sin_addr.s_addr; ++ } ++ + #ifdef __linux__ + os_strlcpy(req.ifr_name, net_if, sizeof(req.ifr_name)); + if (ioctl(sock, SIOCGIFHWADDR, &req) < 0) { +@@ -1025,11 +1055,15 @@ static int upnp_wps_device_start(struct + + /* Determine which IP and mac address we're using */ + if (get_netif_info(net_if, &sm->ip_addr, &sm->ip_addr_text, +- sm->mac_addr)) { ++ &sm->netmask, sm->mac_addr)) { + wpa_printf(MSG_INFO, "WPS UPnP: Could not get IP/MAC address " + "for %s. Does it have IP address?", net_if); + goto fail; + } ++ wpa_printf(MSG_DEBUG, "WPS UPnP: Local IP address %s netmask %s hwaddr " ++ MACSTR, ++ sm->ip_addr_text, inet_ntoa(sm->netmask), ++ MAC2STR(sm->mac_addr)); + + /* Listen for incoming TCP connections so that others + * can fetch our "xml files" from us. +Index: wpa_supplicant-2.9/src/wps/wps_upnp_i.h +=================================================================== +--- wpa_supplicant-2.9.orig/src/wps/wps_upnp_i.h ++++ wpa_supplicant-2.9/src/wps/wps_upnp_i.h +@@ -128,6 +128,7 @@ struct upnp_wps_device_sm { + u8 mac_addr[ETH_ALEN]; /* mac addr of network i.f. we use */ + char *ip_addr_text; /* IP address of network i.f. we use */ + unsigned ip_addr; /* IP address of network i.f. we use (host order) */ ++ struct in_addr netmask; + int multicast_sd; /* send multicast messages over this socket */ + int ssdp_sd; /* receive discovery UPD packets on socket */ + int ssdp_sd_registered; /* nonzero if we must unregister */ +@@ -158,7 +159,7 @@ struct subscription * subscription_find( + const u8 uuid[UUID_LEN]); + void subscr_addr_delete(struct subscr_addr *a); + int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, +- u8 mac[ETH_ALEN]); ++ struct in_addr *netmask, u8 mac[ETH_ALEN]); + + /* wps_upnp_ssdp.c */ + void msearchreply_state_machine_stop(struct advertisement_state_machine *a);
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch new file +62 -0
62 lines not on this page · raw message
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb +4 -1
@@ -25,7 +25,10 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \ file://wpa_supplicant.conf-sane \ file://99_wpa_supplicant \ file://0001-replace-systemd-install-Alias-with-WantedBy.patch \ - file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \ + file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \ + file://0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch \ + file://0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch \ + file://0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch \ " SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190" SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17"
Signature · 1 line
2.17.1
✗ patchtest: failure for "[zeus] python3: Upgrade 3.7.7 ..." and 18 more
In reply to Adrian Bunk== Series Details ==
Series: "[zeus] python3: Upgrade 3.7.7 ..." and 18 more
Revision: 1
URL : https://patchwork.openembedded.org/series/25061/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Upstream-Status is in incorrect format [test_upstream_status_presence_format]
Suggested fix Fix Upstream-Status format in CVE-2020-11655.patch Current Upstream Status: Backport [c415d91007e1680e4eb17def583b202c3c83c718] Standard format Upstream-Status: <Valid status> Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe