Patch review
cover Patch review
This is what has been backported from master or patches.
Comments by Monday.
The following changes since commit 59938780e7e776d87146002ea939b185f8704408:
build-appliance-image: Update to master head revision (2019-10-09 22:28:44 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib stable/zeus-next
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/zeus-next
Alexander Kanavin (1):
runqemu: unset another environment variable for 'egl-headless'
André Draszik (1):
connman: mark connman-wait-online as SYSTEMD_PACKAGE
Changqing Li (3):
qemu: Fix CVE-2019-12068
python: Fix CVE-2019-10160
sudo: fix CVE-2019-14287
Chee Yang Lee (1):
wic/engine: use 'linux-swap' for swap file system
Chen Qi (3):
python: CVE-2019-16056
python3: CVE-2019-16056
go: fix CVE-2019-16276
Douglas Royds via Openembedded-core (1):
icecc: Export ICECC_CC and friends via wrapper-script
Eugene Smirnov (1):
wic/rawcopy: Support files in sub-directories
George McCollister (1):
openssl: make OPENSSL_ENGINES match install path
Hongxu Jia (1):
openssh: fix CVE-2019-16905
Joerg Vehlow (1):
runqemu: Remove disabling of high resolution timer
Liwei Song (1):
util-linux: fix PKNAME name is NULL when use lsblk [LIN1019-2963]
Michael Ho (1):
cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH
[email protected] (1):
sqlite3: fix CVE-2019-16168
Ricardo Ribalda Delgado (1):
i2c-tools: Add missing RDEPEND
Ross Burton (3):
sanity: check the format of SDK_VENDOR
file: explicitly disable seccomp
python3: -dev should depend on distutils
Stefan Agner (1):
uninative: check .done file instead of tarball
Tom Benn (1):
dbus: update dbus-1.init to reflect new PID file
Trevor Gamblin (2):
aspell: fix CVE-2019-17544
ncurses: fix CVE-2019-17594, CVE-2019-17595
Wenlin Kang (1):
sysstat: fix CVE-2019-16167
Yi Zhao (2):
libsdl2: fix CVE-2019-13616
libgcrypt: fix CVE-2019-12904
meta/classes/cmake.bbclass | 3 +- meta/classes/icecc.bbclass | 32 +- meta/classes/sanity.bbclass | 5 + meta/classes/uninative.bbclass | 2 +- meta/recipes-connectivity/connman/connman.inc | 2 +- ...x-integer-overflow-in-XMSS-private-key-pa.patch | 40 +++ meta/recipes-connectivity/openssh/openssh_8.0p1.bb | 1 + .../recipes-connectivity/openssl/openssl_1.1.1d.bb | 2 +- meta/recipes-core/dbus/dbus/dbus-1.init | 4 +- ...rses-selective-backport-of-20191012-patch.patch | 169 +++++++++++ meta/recipes-core/ncurses/ncurses_6.1+20190803.bb | 1 + ...lsblk-force-to-print-PKNAME-for-partition.patch | 36 +++ meta/recipes-core/util-linux/util-linux_2.34.bb | 1 + meta/recipes-devtools/file/file_5.37.bb | 2 + meta/recipes-devtools/go/go-1.12.inc | 1 + ...nch.go1.12-security-net-textproto-don-t-n.patch | 163 ++++++++++ meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb | 1 + ...55-Dont-parse-domains-containing-GH-13079.patch | 90 ++++++ .../python/python/bpo-36742-cve-2019-10160.patch | 81 +++++ ...55-Dont-parse-domains-containing-GH-13079.patch | 132 ++++++++ .../python/python3/python3-manifest.json | 3 +- meta/recipes-devtools/python/python3_3.7.4.bb | 1 + meta/recipes-devtools/python/python_2.7.16.bb | 2 + meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2019-12068.patch | 108 +++++++ .../sudo/sudo/CVE-2019-14287-1.patch | 178 +++++++++++ .../sudo/sudo/CVE-2019-14287-2.patch | 112 +++++++ meta/recipes-extended/sudo/sudo_1.8.27.bb | 2 + ...ory-corruption-bug-due-to-Integer-Overflo.patch | 46 +++ meta/recipes-extended/sysstat/sysstat_12.1.6.bb | 4 +- ...538-validate-image-size-when-loading-BMP-.patch | 34 +++ meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb | 1 + .../0001-Fix-various-bugs-found-by-OSS-Fuze.patch | 56 ++++ meta/recipes-support/aspell/aspell_0.60.7.bb | 4 +- .../files/0001-Prefetch-GCM-look-up-tables.patch | 90 ++++++ ...ok-up-tables-to-.data-section-and-unshare.patch | 332 +++++++++++++++++++++ ...ok-up-table-to-.data-section-and-unshare-.patch | 178 +++++++++++ meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb | 3 + .../sqlite/files/0001-Fix-CVE-2019-16168.patch | 40 +++ meta/recipes-support/sqlite/sqlite3_3.29.0.bb | 3 +- scripts/lib/wic/engine.py | 2 +- scripts/lib/wic/plugins/source/rawcopy.py | 3 + scripts/runqemu | 5 +- 43 files changed, 1951 insertions(+), 25 deletions(-) create mode 100644 meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch create mode 100644 meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch create mode 100644 meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch create mode 100644 meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch create mode 100644 meta/recipes-devtools/python/python/bpo-36742-cve-2019-10160.patch create mode 100644 meta/recipes-devtools/python/python3/0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch create mode 100644 meta/recipes-extended/sudo/sudo/CVE-2019-14287-1.patch create mode 100644 meta/recipes-extended/sudo/sudo/CVE-2019-14287-2.patch create mode 100644 meta/recipes-extended/sysstat/sysstat/0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch create mode 100644 meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch create mode 100644 meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch create mode 100644 meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch create mode 100644 meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch create mode 100644 meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch
Signature · 1 line
2.7.4
PATCH 1/28 sqlite3: fix CVE-2019-16168
From: "[email protected]" <[email protected]>
--- .../sqlite/files/0001-Fix-CVE-2019-16168.patch | 40 ++++++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.29.0.bb | 3 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch
meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch new file +40 -0
@@ -0,0 +1,40 @@ +From fcf06b0b426e6c243d6ca2d6c6a02830717ab6a3 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Tue, 15 Oct 2019 13:22:52 +0800 +Subject: [PATCH] Fix CVE-2019-16168 + +CVE: CVE-2019-16168 + +Upstream-Status: Backport [https://www.sqlite.org/src/vpatch?from=4f5b2d938194fab7&to=98357d8c1263920b] + +Signed-off-by: Chen Qi <[email protected]> +--- + sqlite3.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 61bfdeb..b3e6ae2 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -105933,7 +105933,9 @@ static void decodeIntArray( + if( sqlite3_strglob("unordered*", z)==0 ){ + pIndex->bUnordered = 1; + }else if( sqlite3_strglob("sz=[0-9]*", z)==0 ){ +- pIndex->szIdxRow = sqlite3LogEst(sqlite3Atoi(z+3)); ++ int sz = sqlite3Atoi(z+3); ++ if( sz<2 ) sz = 2; ++ pIndex->szIdxRow = sqlite3LogEst(sz); + }else if( sqlite3_strglob("noskipscan*", z)==0 ){ + pIndex->noSkipScan = 1; + } +@@ -143260,6 +143262,7 @@ static int whereLoopAddBtreeIndex( + ** it to pNew->rRun, which is currently set to the cost of the index + ** seek only. Then, if this is a non-covering index, add the cost of + ** visiting the rows in the main table. */ ++ assert( pSrc->pTab->szTabRow>0 ); + rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow; + pNew->rRun = sqlite3LogEstAdd(rLogSize, rCostIdx); + if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){ +-- +2.17.1 +
meta/recipes-support/sqlite/sqlite3_3.29.0.bb +2 -1
@@ -3,6 +3,7 @@ require sqlite3.inc LICENSE = "PD" LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" -SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz" +SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz \ + file://0001-Fix-CVE-2019-16168.patch" SRC_URI[md5sum] = "8f3dfe83387e62ecb91c7c5c09c688dc" SRC_URI[sha256sum] = "8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b"
Signature · 1 line
2.7.4
PATCH 2/28 aspell: fix CVE-2019-17544
In reply to Armin KusterFrom: Trevor Gamblin <[email protected]>
Backport CVE-2019-17544 fix to zeus.
--- .../0001-Fix-various-bugs-found-by-OSS-Fuze.patch | 56 ++++++++++++++++++++++ meta/recipes-support/aspell/aspell_0.60.7.bb | 4 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch
meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch new file +56 -0
@@ -0,0 +1,56 @@ +From 80fa26c74279fced8d778351cff19d1d8f44fe4e Mon Sep 17 00:00:00 2001 +From: Kevin Atkinson <[email protected]> +Date: Sun, 4 Aug 2019 04:20:29 -0400 +Subject: [PATCH] Fix various bugs found by OSS-Fuze. + +--- + common/config.cpp | 2 +- + common/file_util.cpp | 1 + + common/getdata.cpp | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +Upstream-Status: Backport [https://github.com/GNUAspell/aspell/commit/80fa26c74279fced8d778351cff19d1d8f44fe4e] +CVE: CVE-2019-17544 +Signed-off-by: Trevor Gamblin <[email protected]> + +diff --git a/common/config.cpp b/common/config.cpp +index 017e741..e117d3c 100644 +--- a/common/config.cpp ++++ b/common/config.cpp +@@ -763,7 +763,7 @@ namespace acommon { + } + res.append(':'); + } +- if (res.back() == ':') res.pop_back(); ++ if (!res.empty() && res.back() == ':') res.pop_back(); + } + + struct ListAddHelper : public AddableContainer +diff --git a/common/file_util.cpp b/common/file_util.cpp +index 8515832..56ea501 100644 +--- a/common/file_util.cpp ++++ b/common/file_util.cpp +@@ -181,6 +181,7 @@ namespace acommon { + while ( (dir = els.next()) != 0 ) + { + path = dir; ++ if (path.empty()) continue; + if (path.back() != '/') path += '/'; + unsigned dir_len = path.size(); + path += filename; +diff --git a/common/getdata.cpp b/common/getdata.cpp +index 7e822c9..1b04823 100644 +--- a/common/getdata.cpp ++++ b/common/getdata.cpp +@@ -64,7 +64,7 @@ namespace acommon { + char * unescape(char * dest, const char * src) + { + while (*src) { +- if (*src == '\\') { ++ if (*src == '\\' && src[1]) { + ++src; + switch (*src) { + case 'n': *dest = '\n'; break; +-- +2.17.1 +
meta/recipes-support/aspell/aspell_0.60.7.bb +3 -1
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" PR = "r1" -SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" +SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz \ + file://0001-Fix-various-bugs-found-by-OSS-Fuze.patch \ + " SRC_URI[md5sum] = "8ef2252609c511cd2bb26f3a3932ef28" SRC_URI[sha256sum] = "5ca8fc8cb0370cc6c9eb5b64c6d1bc5d57b3750dbf17887726c3407d833b70e4"
Signature · 1 line
2.7.4
PATCH 3/28 python: CVE-2019-16056
In reply to Armin KusterFrom: Chen Qi <[email protected]>
--- ...55-Dont-parse-domains-containing-GH-13079.patch | 90 ++++++++++++++++++++++ meta/recipes-devtools/python/python_2.7.16.bb | 1 + 2 files changed, 91 insertions(+) create mode 100644 meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch
meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch new file +90 -0
@@ -0,0 +1,90 @@ +From 532ed09c5454bb789a301bb6f1339a0818255610 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Roberto=20C=2E=20S=C3=A1nchez?= <[email protected]> +Date: Sat, 14 Sep 2019 13:26:38 -0400 +Subject: [PATCH] [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) + (GH-16006) + +This change skips parsing of email addresses where domains include a "@" character, which can be maliciously used since the local part is returned as a complete address. + +(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9) + +Excludes changes to Lib/email/_header_value_parser.py, which did not +exist in 2.7. + +Co-authored-by: jpic <[email protected]> + +https://bugs.python.org/issue34155 + +Upstream-Status: Backport [https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9] + +CVE: CVE-2019-16056 + +Signed-off-by: Chen Qi <[email protected]> +--- + Lib/email/_parseaddr.py | 11 ++++++++++- + Lib/email/test/test_email.py | 14 ++++++++++++++ + .../2019-05-04-13-33-37.bpo-34155.MJll68.rst | 1 + + 3 files changed, 25 insertions(+), 1 deletion(-) + create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst + +diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py +index 690db2c22d..dc49d2e45a 100644 +--- a/Lib/email/_parseaddr.py ++++ b/Lib/email/_parseaddr.py +@@ -336,7 +336,12 @@ class AddrlistClass: + aslist.append('@') + self.pos += 1 + self.gotonext() +- return EMPTYSTRING.join(aslist) + self.getdomain() ++ domain = self.getdomain() ++ if not domain: ++ # Invalid domain, return an empty address instead of returning a ++ # local part to denote failed parsing. ++ return EMPTYSTRING ++ return EMPTYSTRING.join(aslist) + domain + + def getdomain(self): + """Get the complete domain name from an address.""" +@@ -351,6 +356,10 @@ class AddrlistClass: + elif self.field[self.pos] == '.': + self.pos += 1 + sdlist.append('.') ++ elif self.field[self.pos] == '@': ++ # bpo-34155: Don't parse domains with two `@` like ++ # `[email protected]@important.com`. ++ return EMPTYSTRING + elif self.field[self.pos] in self.atomends: + break + else: +diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py +index 4b4dee3d34..2efe44ac5a 100644 +--- a/Lib/email/test/test_email.py ++++ b/Lib/email/test/test_email.py +@@ -2306,6 +2306,20 @@ class TestMiscellaneous(TestEmailBase): + self.assertEqual(Utils.parseaddr('<>'), ('', '')) + self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '') + ++ def test_parseaddr_multiple_domains(self): ++ self.assertEqual( ++ Utils.parseaddr('a@b@c'), ++ ('', '') ++ ) ++ self.assertEqual( ++ Utils.parseaddr('[email protected]@c'), ++ ('', '') ++ ) ++ self.assertEqual( ++ Utils.parseaddr('[email protected]@c'), ++ ('', '') ++ ) ++ + def test_noquote_dump(self): + self.assertEqual( + Utils.formataddr(('A Silly Person', '[email protected]')), +diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst +new file mode 100644 +index 0000000000..50292e29ed +--- /dev/null ++++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst +@@ -0,0 +1 @@ ++Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@[email protected].) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic.
meta/recipes-devtools/python/python_2.7.16.bb +1 -0
@@ -30,6 +30,7 @@ SRC_URI += " \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ file://float-endian.patch \ file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \ + file://0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch \ " S = "${WORKDIR}/Python-${PV}"
Signature · 1 line
2.7.4
PATCH 4/28 python3: CVE-2019-16056
In reply to Armin KusterFrom: Chen Qi <[email protected]>
--- ...55-Dont-parse-domains-containing-GH-13079.patch | 132 +++++++++++++++++++++ meta/recipes-devtools/python/python3_3.7.4.bb | 1 + 2 files changed, 133 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch
meta/recipes-devtools/python/python3/0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch new file +132 -0
@@ -0,0 +1,132 @@ +From 90d56127ae15b1e452755e62c77dc475dedf7161 Mon Sep 17 00:00:00 2001 +From: jpic <[email protected]> +Date: Wed, 17 Jul 2019 23:54:25 +0200 +Subject: [PATCH] bpo-34155: Dont parse domains containing @ (GH-13079) + +Before: + + >>> email.message_from_string('From: [email protected]@important.com', policy=email.policy.default)['from'].addresses + (Address(display_name='', username='a', domain='malicious.org'),) + + >>> parseaddr('[email protected]@important.com') + ('', '[email protected]') + + After: + + >>> email.message_from_string('From: [email protected]@important.com', policy=email.policy.default)['from'].addresses + (Address(display_name='', username='', domain=''),) + + >>> parseaddr('[email protected]@important.com') + ('', 'a@') + +https://bugs.python.org/issue34155 + +Upstream-Status: Backport [https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9] + +CVE: CVE-2019-16056 + +Signed-off-by: Chen Qi <[email protected]> +--- + Lib/email/_header_value_parser.py | 2 ++ + Lib/email/_parseaddr.py | 11 ++++++++++- + Lib/test/test_email/test__header_value_parser.py | 10 ++++++++++ + Lib/test/test_email/test_email.py | 14 ++++++++++++++ + .../2019-05-04-13-33-37.bpo-34155.MJll68.rst | 1 + + 5 files changed, 37 insertions(+), 1 deletion(-) + create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst + +diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py +index fc00b4a098..bbc026ec71 100644 +--- a/Lib/email/_header_value_parser.py ++++ b/Lib/email/_header_value_parser.py +@@ -1582,6 +1582,8 @@ def get_domain(value): + token, value = get_dot_atom(value) + except errors.HeaderParseError: + token, value = get_atom(value) ++ if value and value[0] == '@': ++ raise errors.HeaderParseError('Invalid Domain') + if leader is not None: + token[:0] = [leader] + domain.append(token) +diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py +index cdfa3729ad..41ff6f8c00 100644 +--- a/Lib/email/_parseaddr.py ++++ b/Lib/email/_parseaddr.py +@@ -379,7 +379,12 @@ class AddrlistClass: + aslist.append('@') + self.pos += 1 + self.gotonext() +- return EMPTYSTRING.join(aslist) + self.getdomain() ++ domain = self.getdomain() ++ if not domain: ++ # Invalid domain, return an empty address instead of returning a ++ # local part to denote failed parsing. ++ return EMPTYSTRING ++ return EMPTYSTRING.join(aslist) + domain + + def getdomain(self): + """Get the complete domain name from an address.""" +@@ -394,6 +399,10 @@ class AddrlistClass: + elif self.field[self.pos] == '.': + self.pos += 1 + sdlist.append('.') ++ elif self.field[self.pos] == '@': ++ # bpo-34155: Don't parse domains with two `@` like ++ # `[email protected]@important.com`. ++ return EMPTYSTRING + elif self.field[self.pos] in self.atomends: + break + else: +diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py +index 693487bc96..7dc4de1b7b 100644 +--- a/Lib/test/test_email/test__header_value_parser.py ++++ b/Lib/test/test_email/test__header_value_parser.py +@@ -1438,6 +1438,16 @@ class TestParser(TestParserMixin, TestEmailBase): + self.assertEqual(addr_spec.domain, 'example.com') + self.assertEqual(addr_spec.addr_spec, '[email protected]') + ++ def test_get_addr_spec_multiple_domains(self): ++ with self.assertRaises(errors.HeaderParseError): ++ parser.get_addr_spec('[email protected]@example.com') ++ ++ with self.assertRaises(errors.HeaderParseError): ++ parser.get_addr_spec('star@[email protected]') ++ ++ with self.assertRaises(errors.HeaderParseError): ++ parser.get_addr_spec('[email protected]@example.com') ++ + # get_obs_route + + def test_get_obs_route_simple(self): +diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py +index c29cc56203..aa775881c5 100644 +--- a/Lib/test/test_email/test_email.py ++++ b/Lib/test/test_email/test_email.py +@@ -3041,6 +3041,20 @@ class TestMiscellaneous(TestEmailBase): + self.assertEqual(utils.parseaddr('<>'), ('', '')) + self.assertEqual(utils.formataddr(utils.parseaddr('<>')), '') + ++ def test_parseaddr_multiple_domains(self): ++ self.assertEqual( ++ utils.parseaddr('a@b@c'), ++ ('', '') ++ ) ++ self.assertEqual( ++ utils.parseaddr('[email protected]@c'), ++ ('', '') ++ ) ++ self.assertEqual( ++ utils.parseaddr('[email protected]@c'), ++ ('', '') ++ ) ++ + def test_noquote_dump(self): + self.assertEqual( + utils.formataddr(('A Silly Person', '[email protected]')), +diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst +new file mode 100644 +index 0000000000..50292e29ed +--- /dev/null ++++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst +@@ -0,0 +1 @@ ++Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@[email protected].) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic.
meta/recipes-devtools/python/python3_3.7.4.bb +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://reformat_sysconfig.py \ file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ file://0001-test_locale.py-correct-the-test-output-format.patch \ + file://0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch \ " SRC_URI_append_class-native = " \
Signature · 1 line
2.7.4
PATCH 5/28 runqemu: unset another environment variable for 'egl-headless'
In reply to Armin KusterFrom: Alexander Kanavin <[email protected]>
Some host distributions (opensuse for example) are using 'pkgconf', which, unlike the original pkg-config, appends PKG_CONFIG_SYSROOT_DIR to every directory from the .pc file.
--- scripts/runqemu | 1 + 1 file changed, 1 insertion(+)
scripts/runqemu +1 -0
@@ -457,6 +457,7 @@ class BaseConfig(object): del os.environ['PKG_CONFIG_PATH'] del os.environ['PKG_CONFIG_DIR'] del os.environ['PKG_CONFIG_LIBDIR'] + del os.environ['PKG_CONFIG_SYSROOT_DIR'] except KeyError: pass try:
Signature · 1 line
2.7.4
PATCH 6/28 runqemu: Remove disabling of high resolution timer
In reply to Armin KusterFrom: Joerg Vehlow <[email protected]>
The option 'highres=off' sneaked itself into the runqemu script for all configurations, where the root filesystem type is not 'cpio' or 'cpio.gz'.
See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13590
--- scripts/runqemu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +2 -2
@@ -1198,12 +1198,12 @@ class BaseConfig(object): # All branches above set vm_drive. self.rootfs_options = '%s -no-reboot' % vm_drive - self.kernel_cmdline = 'root=%s rw highres=off' % (self.get('QB_KERNEL_ROOT')) + self.kernel_cmdline = 'root=%s rw' % (self.get('QB_KERNEL_ROOT')) if self.fstype == 'nfs': self.rootfs_options = '' k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, os.path.abspath(self.rootfs), self.unfs_opts) - self.kernel_cmdline = 'root=%s rw highres=off' % k_root + self.kernel_cmdline = 'root=%s rw' % k_root if self.fstype == 'none': self.rootfs_options = ''
Signature · 1 line
2.7.4
PATCH 7/28 ncurses: fix CVE-2019-17594, CVE-2019-17595
In reply to Armin KusterFrom: Trevor Gamblin <[email protected]>
Backport changes to tinfo/comp_hash.c, tinfo/parse_entry.c, and progs/dump_entry.c from upstream to fix CVEs.
--- ...rses-selective-backport-of-20191012-patch.patch | 169 +++++++++++++++++++++ meta/recipes-core/ncurses/ncurses_6.1+20190803.bb | 1 + 2 files changed, 170 insertions(+) create mode 100644 meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch
meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch new file +169 -0
@@ -0,0 +1,169 @@ +From 064b77f173337aa790f1cec0d741bfbc61a33d31 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <[email protected]> +Date: Fri, 18 Oct 2019 09:57:43 -0400 +Subject: [PATCH] ncurses: selective backport of 20191012 patch + +Upstream-Status: Backport [https://salsa.debian.org/debian/ncurses/commit/243908b1e3d81] + +Contents of the upstream patch that are not applied to comp_hash.c, +parse_entry.c, or dump_entry.c have been omitted. + +CVE: CVE-2019-17594 +CVE: CVE-2019-17595 + +Signed-off-by: Trevor Gamblin <[email protected]> + +--- + ncurses/tinfo/comp_hash.c | 14 ++++++++++---- + ncurses/tinfo/parse_entry.c | 32 ++++++++++++++++---------------- + progs/dump_entry.c | 7 ++++--- + 3 files changed, 30 insertions(+), 23 deletions(-) + +diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c +index 21f165ca..a62d38f9 100644 +--- a/ncurses/tinfo/comp_hash.c ++++ b/ncurses/tinfo/comp_hash.c +@@ -44,7 +44,7 @@ + #include <tic.h> + #include <hashsize.h> + +-MODULE_ID("$Id: comp_hash.c,v 1.49 2019/03/10 00:06:48 tom Exp $") ++MODULE_ID("$Id: comp_hash.c,v 1.51 2019/10/12 16:32:13 tom Exp $") + + /* + * Finds the entry for the given string in the hash table if present. +@@ -63,7 +63,9 @@ _nc_find_entry(const char *string, + + hashvalue = data->hash_of(string); + +- if (data->table_data[hashvalue] >= 0) { ++ if (hashvalue >= 0 ++ && (unsigned) hashvalue < data->table_size ++ && data->table_data[hashvalue] >= 0) { + + real_table = _nc_get_table(termcap); + ptr = real_table + data->table_data[hashvalue]; +@@ -96,7 +98,9 @@ _nc_find_type_entry(const char *string, + const HashData *data = _nc_get_hash_info(termcap); + int hashvalue = data->hash_of(string); + +- if (data->table_data[hashvalue] >= 0) { ++ if (hashvalue >= 0 ++ && (unsigned) hashvalue < data->table_size ++ && data->table_data[hashvalue] >= 0) { + const struct name_table_entry *const table = _nc_get_table(termcap); + + ptr = table + data->table_data[hashvalue]; +@@ -124,7 +128,9 @@ _nc_find_user_entry(const char *string) + + hashvalue = data->hash_of(string); + +- if (data->table_data[hashvalue] >= 0) { ++ if (hashvalue >= 0 ++ && (unsigned) hashvalue < data->table_size ++ && data->table_data[hashvalue] >= 0) { + + real_table = _nc_get_userdefs_table(); + ptr = real_table + data->table_data[hashvalue]; +diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c +index f8cca8b5..064376c5 100644 +--- a/ncurses/tinfo/parse_entry.c ++++ b/ncurses/tinfo/parse_entry.c +@@ -47,7 +47,7 @@ + #include <ctype.h> + #include <tic.h> + +-MODULE_ID("$Id: parse_entry.c,v 1.97 2019/08/03 23:10:38 tom Exp $") ++MODULE_ID("$Id: parse_entry.c,v 1.98 2019/10/12 00:50:31 tom Exp $") + + #ifdef LINT + static short const parametrized[] = +@@ -654,12 +654,12 @@ _nc_capcmp(const char *s, const char *t) + } + + static void +-append_acs0(string_desc * dst, int code, int src) ++append_acs0(string_desc * dst, int code, char *src, size_t off) + { +- if (src != 0) { ++ if (src != 0 && off < strlen(src)) { + char temp[3]; + temp[0] = (char) code; +- temp[1] = (char) src; ++ temp[1] = src[off]; + temp[2] = 0; + _nc_safe_strcat(dst, temp); + } +@@ -669,7 +669,7 @@ static void + append_acs(string_desc * dst, int code, char *src) + { + if (VALID_STRING(src) && strlen(src) == 1) { +- append_acs0(dst, code, *src); ++ append_acs0(dst, code, src, 0); + } + } + +@@ -1038,17 +1038,17 @@ postprocess_terminfo(TERMTYPE2 *tp) + _nc_str_init(&result, buf2, sizeof(buf2)); + _nc_safe_strcat(&result, acs_chars); + +- append_acs0(&result, 'l', box_chars_1[0]); /* ACS_ULCORNER */ +- append_acs0(&result, 'q', box_chars_1[1]); /* ACS_HLINE */ +- append_acs0(&result, 'k', box_chars_1[2]); /* ACS_URCORNER */ +- append_acs0(&result, 'x', box_chars_1[3]); /* ACS_VLINE */ +- append_acs0(&result, 'j', box_chars_1[4]); /* ACS_LRCORNER */ +- append_acs0(&result, 'm', box_chars_1[5]); /* ACS_LLCORNER */ +- append_acs0(&result, 'w', box_chars_1[6]); /* ACS_TTEE */ +- append_acs0(&result, 'u', box_chars_1[7]); /* ACS_RTEE */ +- append_acs0(&result, 'v', box_chars_1[8]); /* ACS_BTEE */ +- append_acs0(&result, 't', box_chars_1[9]); /* ACS_LTEE */ +- append_acs0(&result, 'n', box_chars_1[10]); /* ACS_PLUS */ ++ append_acs0(&result, 'l', box_chars_1, 0); /* ACS_ULCORNER */ ++ append_acs0(&result, 'q', box_chars_1, 1); /* ACS_HLINE */ ++ append_acs0(&result, 'k', box_chars_1, 2); /* ACS_URCORNER */ ++ append_acs0(&result, 'x', box_chars_1, 3); /* ACS_VLINE */ ++ append_acs0(&result, 'j', box_chars_1, 4); /* ACS_LRCORNER */ ++ append_acs0(&result, 'm', box_chars_1, 5); /* ACS_LLCORNER */ ++ append_acs0(&result, 'w', box_chars_1, 6); /* ACS_TTEE */ ++ append_acs0(&result, 'u', box_chars_1, 7); /* ACS_RTEE */ ++ append_acs0(&result, 'v', box_chars_1, 8); /* ACS_BTEE */ ++ append_acs0(&result, 't', box_chars_1, 9); /* ACS_LTEE */ ++ append_acs0(&result, 'n', box_chars_1, 10); /* ACS_PLUS */ + + if (buf2[0]) { + acs_chars = _nc_save_str(buf2); +diff --git a/progs/dump_entry.c b/progs/dump_entry.c +index d0e420ec..8a47084a 100644 +--- a/progs/dump_entry.c ++++ b/progs/dump_entry.c +@@ -39,7 +39,7 @@ + #include "termsort.c" /* this C file is generated */ + #include <parametrized.h> /* so is this */ + +-MODULE_ID("$Id: dump_entry.c,v 1.173 2019/05/11 21:02:24 tom Exp $") ++MODULE_ID("$Id: dump_entry.c,v 1.175 2019/10/12 15:59:07 tom Exp $") + + #define DISCARD(string) string = ABSENT_STRING + #define PRINTF (void) printf +@@ -1136,7 +1136,8 @@ fmt_entry(TERMTYPE2 *tterm, + *d++ = '\\'; + *d = ':'; + } else if (*d == '\\') { +- *++d = *s++; ++ if ((*++d = *s++) == '\0') ++ break; + } + d++; + *d = '\0'; +@@ -1396,7 +1397,7 @@ one_one_mapping(const char *mapping) + + if (VALID_STRING(mapping)) { + int n = 0; +- while (mapping[n] != '\0') { ++ while (mapping[n] != '\0' && mapping[n + 1] != '\0') { + if (isLine(mapping[n]) && + mapping[n] != mapping[n + 1]) { + result = FALSE; +-- +2.17.1 +
meta/recipes-core/ncurses/ncurses_6.1+20190803.bb +1 -0
@@ -3,6 +3,7 @@ require ncurses.inc SRC_URI += "file://0001-tic-hang.patch \ file://0002-configure-reproducible.patch \ file://config.cache \ + file://0001-ncurses-selective-backport-of-20191012-patch.patch \ " # commit id corresponds to the revision in package version SRCREV = "3c9b2677c96c645496997321bf2fe465a5e7e21f"
Signature · 1 line
2.7.4
PATCH 8/28 sysstat: fix CVE-2019-16167
In reply to Armin KusterFrom: Wenlin Kang <[email protected]>
This commit is another part of CVE-2019-16167, please see
https://github.com/sysstat/sysstat/issues/232.
--- ...ory-corruption-bug-due-to-Integer-Overflo.patch | 46 ++++++++++++++++++++++ meta/recipes-extended/sysstat/sysstat_12.1.6.bb | 4 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/sysstat/sysstat/0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch
meta/recipes-extended/sysstat/sysstat/0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch new file +46 -0
@@ -0,0 +1,46 @@ +From 603ae4ed8cd65abf0776ef7f68354a5c24a3411c Mon Sep 17 00:00:00 2001 +From: Sebastien GODARD <[email protected]> +Date: Tue, 15 Oct 2019 14:39:33 +0800 +Subject: [PATCH] Fix #232: Memory corruption bug due to Integer Overflow in + remap_struct() + +Try to avoid integer overflow when reading a corrupted binary datafile +with sadf. + +Upstream-Status: Backport [https://github.com/sysstat/sysstat/commit/83fad9c895d1ac13f76af5883b7451b3302beef5] +CVE: CVE-2019-16167 + +Signed-off-by: Sebastien GODARD <[email protected]> +Signed-off-by: Wenlin Kang <[email protected]> +--- + sa_common.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/sa_common.c b/sa_common.c +index 395c11c..cfa9007 100644 +--- a/sa_common.c ++++ b/sa_common.c +@@ -1336,7 +1336,8 @@ int remap_struct(unsigned int gtypes_nr[], unsigned int ftypes_nr[], + /* Remap [unsigned] int fields */ + d = gtypes_nr[1] - ftypes_nr[1]; + if (d) { +- if (ftypes_nr[1] * UL_ALIGNMENT_WIDTH < ftypes_nr[1]) ++ if (gtypes_nr[0] * ULL_ALIGNMENT_WIDTH + ++ ftypes_nr[1] * UL_ALIGNMENT_WIDTH < ftypes_nr[1]) + /* Overflow */ + return -1; + +@@ -1365,7 +1366,9 @@ int remap_struct(unsigned int gtypes_nr[], unsigned int ftypes_nr[], + /* Remap possible fields (like strings of chars) following int fields */ + d = gtypes_nr[2] - ftypes_nr[2]; + if (d) { +- if (ftypes_nr[2] * U_ALIGNMENT_WIDTH < ftypes_nr[2]) ++ if (gtypes_nr[0] * ULL_ALIGNMENT_WIDTH + ++ gtypes_nr[1] * UL_ALIGNMENT_WIDTH + ++ ftypes_nr[2] * U_ALIGNMENT_WIDTH < ftypes_nr[2]) + /* Overflow */ + return -1; + +-- +1.9.1 +
meta/recipes-extended/sysstat/sysstat_12.1.6.bb +3 -1
@@ -2,7 +2,9 @@ require sysstat.inc LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" -SRC_URI += "file://0001-Include-needed-headers-explicitly.patch" +SRC_URI += "file://0001-Include-needed-headers-explicitly.patch \ + file://0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch \ +" SRC_URI[md5sum] = "d8e3bbb9c873dd370f6d33664e326570" SRC_URI[sha256sum] = "f752f3c406153a6fc446496f1102872505ace3f0931d975c1d664c81ec09f129"
Signature · 1 line
2.7.4
PATCH 9/28 libsdl2: fix CVE-2019-13616
In reply to Armin KusterFrom: Yi Zhao <[email protected]>
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2019-13616
Patch from:
https://hg.libsdl.org/SDL/rev/e7ba650a643a
--- ...538-validate-image-size-when-loading-BMP-.patch | 34 ++++++++++++++++++++++ meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch
meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 85138c1ec673e05263ae666baf61f79384daf7e0 Mon Sep 17 00:00:00 2001 +From: Sam Lantinga <[email protected]> +Date: Tue, 30 Jul 2019 11:00:00 -0700 +Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files + +Upstream-Status: Backport +[https://hg.libsdl.org/SDL/rev/e7ba650a643a] + +CVE: CVE-2019-13616 + +Signed-off-by: Yi Zhao <[email protected]> +--- + src/video/SDL_bmp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c +index 0b68918..a06b0c9 100644 +--- a/src/video/SDL_bmp.c ++++ b/src/video/SDL_bmp.c +@@ -226,6 +226,11 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) + SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR); + } + } ++ if (biWidth <= 0 || biHeight == 0) { ++ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight); ++ was_error = SDL_TRUE; ++ goto done; ++ } + if (biHeight < 0) { + topDown = SDL_TRUE; + biHeight = -biHeight; +-- +2.7.4 +
meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb +1 -0
@@ -14,6 +14,7 @@ PROVIDES = "virtual/libsdl2" SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ file://more-gen-depends.patch \ + file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \ " S = "${WORKDIR}/SDL2-${PV}"
Signature · 1 line
2.7.4
PATCH 10/28 sanity: check the format of SDK_VENDOR
In reply to Armin KusterFrom: Ross Burton <[email protected]>
If SDK_VENDOR isn't formatted as -foosdk and is instead for example -foo-sdk then the triple that are constructed are not in fact triples, which results in mysterious compile errors.
Check in sanity.bbclass so this failure is detected early.
[ YOCTO #13573 ]
--- meta/classes/sanity.bbclass | 5 +++++ 1 file changed, 5 insertions(+)
meta/classes/sanity.bbclass +5 -0
@@ -798,6 +798,11 @@ def check_sanity_everybuild(status, d): elif d.getVar('SDK_ARCH', False) == "${BUILD_ARCH}": status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE may have been set too late (e.g. in the distro configuration)\n') + # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early + sdkvendor = d.getVar("SDK_VENDOR") + if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1): + status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n") + check_supported_distro(d) omask = os.umask(0o022)
Signature · 1 line
2.7.4
PATCH 11/28 uninative: check .done file instead of tarball
In reply to Armin KusterFrom: Stefan Agner <[email protected]>
In case multiple builds share UNINATIVE_DLDIR's location, one build might be in the process of downloading the tarball while another is just checking whether the tarball exists. Check for the done file instead and rely on the fetchers lockfile mechanism in case two builds are running.
--- meta/classes/uninative.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/uninative.bbclass +1 -1
@@ -45,7 +45,7 @@ python uninative_event_fetchloader() { tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR"), chksum) tarballpath = os.path.join(tarballdir, tarball) - if not os.path.exists(tarballpath): + if not os.path.exists(tarballpath + ".done"): bb.utils.mkdirhier(tarballdir) if d.getVar("UNINATIVE_URL") == "unset": bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL")
Signature · 1 line
2.7.4
PATCH 12/28 openssh: fix CVE-2019-16905
In reply to Armin KusterFrom: Hongxu Jia <[email protected]>
Backport a patch from upstream to fix CVE-2019-16905
https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a
--- ...x-integer-overflow-in-XMSS-private-key-pa.patch | 40 ++++++++++++++++++++++ meta/recipes-connectivity/openssh/openssh_8.0p1.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 2014fad3d28090b59d2f8a0971166c06e5fa6da6 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Fri, 18 Oct 2019 14:56:58 +0800 +Subject: [PATCH] upstream: fix integer overflow in XMSS private key parsing. + +Reported by Adam Zabrocki via SecuriTeam's SSH program. + +Note that this code is experimental and not compiled by default. + +ok markus@ + +OpenBSD-Commit-ID: cd0361896d15e8a1bac495ac583ff065ffca2be1 + +Signed-off-by: "[email protected]" <[email protected]> + +Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a] +CVE: CVE-2019-16905 + +Signed-off-by: Hongxu Jia <[email protected]> +--- + sshkey-xmss.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sshkey-xmss.c b/sshkey-xmss.c +index aaae702..c57681a 100644 +--- a/sshkey-xmss.c ++++ b/sshkey-xmss.c +@@ -977,7 +977,8 @@ sshkey_xmss_decrypt_state(const struct sshkey *k, struct sshbuf *encoded, + goto out; + } + /* check that an appropriate amount of auth data is present */ +- if (sshbuf_len(encoded) < encrypted_len + authlen) { ++ if (sshbuf_len(encoded) < authlen || ++ sshbuf_len(encoded) - authlen < encrypted_len) { + r = SSH_ERR_INVALID_FORMAT; + goto out; + } +-- +2.7.4 +
meta/recipes-connectivity/openssh/openssh_8.0p1.bb +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ file://sshd_check_keys \ file://add-test-support-for-busybox.patch \ + file://0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch \ " SRC_URI[md5sum] = "bf050f002fe510e1daecd39044e1122d" SRC_URI[sha256sum] = "bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68"
Signature · 1 line
2.7.4
PATCH 13/28 wic/rawcopy: Support files in sub-directories
In reply to Armin KusterFrom: Eugene Smirnov <[email protected]>
If the source file is located in a subdirectory of DEPLOY_DIR rawcopy will currently fail in sparse_copy function on open(dst_fname, 'wb'), as the parent directory for destination file does not exist.
This patch helps to avoid that by recursively creating parent directories.
--- scripts/lib/wic/plugins/source/rawcopy.py | 3 +++ 1 file changed, 3 insertions(+)
scripts/lib/wic/plugins/source/rawcopy.py +3 -0
@@ -59,6 +59,9 @@ class RawCopyPlugin(SourcePlugin): src = os.path.join(kernel_dir, source_params['file']) dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) + if not os.path.exists(os.path.dirname(dst)): + os.makedirs(os.path.dirname(dst)) + if 'skip' in source_params: sparse_copy(src, dst, skip=int(source_params['skip'])) else:
Signature · 1 line
2.7.4
PATCH 14/28 file: explicitly disable seccomp
In reply to Armin KusterFrom: Ross Burton <[email protected]>
file will automatically enable seccomp if the seccomp headers are available, but the build will fail on Opensuse Tumbleweed because the include paths are wrong.
Enabling seccomp is a bad idea because it interacts badly with pseudo (causing build failures), so explicitly and globally disable seccomp.
--- meta/recipes-devtools/file/file_5.37.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/file/file_5.37.bb +2 -0
@@ -21,6 +21,8 @@ S = "${WORKDIR}/git" inherit autotools update-alternatives +EXTRA_OECONF += "--disable-libseccomp" + ALTERNATIVE_${PN} = "file" ALTERNATIVE_LINK_NAME[file] = "${bindir}/file"
Signature · 1 line
2.7.4
PATCH 15/28 i2c-tools: Add missing RDEPEND
In reply to Armin KusterFrom: Ricardo Ribalda Delgado <[email protected]>
Fixes:
# decode-dimms Can't locate Carp.pm in @INC (you may need to install the Carp module) (@INC contains: /usr/lib/perl5/site_perl/5.28.1/x86_64-linux /usr/lib/perl5/site_perl/5.28.1 /usr/lib/perl5/vendor_perl/5.28.1/x86_64-linux /usr/lib/perl5/vendor_perl/5.28.1 /usr/lib/perl5/5.28.1/x86_64-linux /usr/lib/perl5/5.28.1 .) at /usr/lib/perl5/5.28.1/Tie/Hash.pm line 190. BEGIN failed--compilation aborted at /usr/lib/perl5/5.28.1/Tie/Hash.pm line 190. Compilation failed in require at /usr/lib/perl5/5.28.1/x86_64-linux/POSIX.pm line 505. Compilation failed in require at /usr/bin/decode-dimms line 41. BEGIN failed--compilation aborted at /usr/bin/decode-dimms line 41. root@qt5222:~# apt-get install perl-module-carp
--- meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb +1 -0
@@ -31,6 +31,7 @@ FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \ RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \ perl-module-constant perl-module-file-basename \ perl-module-fcntl perl-module-strict perl-module-vars \ + perl-module-carp \ " ALTERNATIVE_PRIORITY = "100"
Signature · 1 line
2.7.4
PATCH 16/28 python3: -dev should depend on distutils
In reply to Armin KusterFrom: Ross Burton <[email protected]>
python3-config uses distutils:
Traceback (most recent call last):
File "/usr/bin/python3-config", line 9, in <module>
from distutils import sysconfig
ModuleNotFoundError: No module named 'distutils'
Add the dependency so that distutils is always present.
[ YOCTO #13592 ]
--- meta/recipes-devtools/python/python3/python3-manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/python/python3/python3-manifest.json +2 -1
@@ -498,7 +498,8 @@ "${libdir}/pkgconfig" ], "rdepends": [ - "core" + "core", + "distutils" ], "summary": "Python development package" },
Signature · 1 line
2.7.4
PATCH 17/28 qemu: Fix CVE-2019-12068
In reply to Armin KusterFrom: Changqing Li <[email protected]>
--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2019-12068.patch | 108 +++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0009-Fix-webkitgtk-builds.patch \ file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ file://CVE-2019-15890.patch \ + file://CVE-2019-12068.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 18/28 cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH
In reply to Armin KusterFrom: Michael Ho <[email protected]>
The find_program command will fail if it is used on a tool that is listed in ASSUME_PROVIDED. This is because these tools are in the hosttools directory which is not listed in CMAKE_FIND_ROOT_PATH so cmake will not find them.
Adding the directory HOSTTOOLS_DIR to the CMAKE_FIND_ROOT_PATH variable fixes the initial issue of needing to search for tools in ASSUME_PROVIDED.
Note that this change alone does not fix the issue because find_program will by default only look into the subdirectories bin and usr/bin under the paths in CMAKE_FIND_ROOT_PATH to find the programs and the hosttools directory has instead the symlinks directly present without these subdirectories.
Set CMAKE_PROGRAM_PATH to by default include the root directory so find_program can search the hosttools directory without needing the prefix directories.
--- meta/classes/cmake.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/cmake.bbclass +2 -1
@@ -106,11 +106,12 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" ) # only search in the paths provided so cmake doesnt pick # up libraries and tools from the native build machine -set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN}) +set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN} ${HOSTTOOLS_DIR}) set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) +set( CMAKE_PROGRAM_PATH "/" ) # Use qt.conf settings set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf )
Signature · 1 line
2.7.4
Re: [zeus 18/28] cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH
Quoted 21 lines · Armin Kuster
From: Michael Ho <[email protected]>
The
find_programcommand will fail if it is used on a tool that is listed inASSUME_PROVIDED. This is because these tools are in the hosttools directory
which is not listed inCMAKE_FIND_ROOT_PATHso cmake will not find them.Adding the directory
HOSTTOOLS_DIRto theCMAKE_FIND_ROOT_PATHvariable fixes
the initial issue of needing to search for tools inASSUME_PROVIDED.Note that this change alone does not fix the issue because
find_programwill
by default only look into the subdirectories bin and usr/bin under the paths
inCMAKE_FIND_ROOT_PATHto find the programs and the hosttools directory has
instead the symlinks directly present without these subdirectories.
Quoted 8 lines
Set
CMAKE_PROGRAM_PATHto by default include the root directory sofind_programcan search the hosttools directory without needing the prefix
directories.Signed-off-by Ross Burton <[email protected]>(cherry picked from commit 7847f431cd8db59fce8c9401a603c4b0678ee16d)Signed-off-by Armin Kuster <[email protected]>
Given the fallout in meta-oe, I don't plan to take this.
Cheers,
Richard
Re: [zeus 18/28] cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH
Quoted 27 lines · Richard Purdie
Quoted 26 lines · Armin Kuster
From: Michael Ho <[email protected]>
The
find_programcommand will fail if it is used on a tool that is listed inASSUME_PROVIDED. This is because these tools are in the hosttools directory
which is not listed inCMAKE_FIND_ROOT_PATHso cmake will not find them.Adding the directory
HOSTTOOLS_DIRto theCMAKE_FIND_ROOT_PATHvariable fixes
the initial issue of needing to search for tools inASSUME_PROVIDED.Note that this change alone does not fix the issue because
find_programwill
by default only look into the subdirectories bin and usr/bin under the paths
inCMAKE_FIND_ROOT_PATHto find the programs and the hosttools directory has
instead the symlinks directly present without these subdirectories.Set
CMAKE_PROGRAM_PATHto by default include the root directory sofind_programcan search the hosttools directory without needing the prefix
directories.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Ross Burton <[email protected]>(cherry picked from commit 7847f431cd8db59fce8c9401a603c4b0678ee16d)Signed-off-by Armin Kuster <[email protected]>Given the fallout in meta-oe, I don't plan to take this.
+1
Quoted 10 lines
Cheers,
Richard
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [zeus 18/28] cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH
Quoted 39 lines · Khem Raj
On Tue, Oct 29, 2019 at 9:19 AM Richard Purdie <[email protected] <mailto:[email protected]>> wrote:
On Fri, 2019-10-25 at 23:49 -0700, Armin Kuster wrote:
> From: Michael Ho <[email protected] <mailto:[email protected]>> >
> Thefind_programcommand will fail if it is used on a tool that is > listed in
>ASSUME_PROVIDED. This is because these tools are in the hosttools > directory
> which is not listed inCMAKE_FIND_ROOT_PATHso cmake will not find > them.
>
> Adding the directoryHOSTTOOLS_DIRto theCMAKE_FIND_ROOT_PATH> variable fixes
> the initial issue of needing to search for tools inASSUME_PROVIDED. >
> Note that this change alone does not fix the issue because >find_programwill
> by default only look into the subdirectories bin and usr/bin under > the paths
> inCMAKE_FIND_ROOT_PATHto find the programs and the hosttools > directory has
> instead the symlinks directly present without these subdirectories. >
> SetCMAKE_PROGRAM_PATHto by default include the root directory so >find_programcan search the hosttools directory without needing the > prefix
> directories.
>
> Signed-off-by: Ross Burton <[email protected] <mailto:[email protected]>>
> (cherry picked from commit7847f431cd8db59fce8c9401a603c4b0678ee16d) > Signed-off-by: Armin Kuster <[email protected] <mailto:[email protected]>>
Quoted 4 lines
Given the fallout in meta-oe, I don't plan to take this.
+1
So is this why to took me on a 3 mile walk up a hill?
Quoted 13 lines
Cheers,
Richard
--
_______________________________________________
Openembedded-core mailing list
[email protected]
<mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-coreRe: [zeus 18/28] cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH
Quoted 4 lines · On Wed, 2019-10-30 at 05:29 +0100, akuster808 wrote:
Quoted 1 line · Khem Raj
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines · Richard Purdie
Given the fallout in meta-oe, I don't plan to take this.
+1
So is this why to took me on a 3 mile walk up a hill?
What would have happened if I merged it?! :)
Cheers,
Richard
PATCH 19/28 openssl: make OPENSSL_ENGINES match install path
In reply to Armin KusterFrom: George McCollister <[email protected]>
Set OPENSSL_ENGINES to the path where engines are actually installed.
--- meta/recipes-connectivity/openssl/openssl_1.1.1d.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssl/openssl_1.1.1d.bb +1 -1
@@ -148,7 +148,7 @@ do_install_append_class-native () { OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ - OPENSSL_ENGINES=${libdir}/ssl-1.1/engines + OPENSSL_ENGINES=${libdir}/engines-1.1 } do_install_append_class-nativesdk () {
Signature · 1 line
2.7.4
PATCH 20/28 icecc: Export ICECC_CC and friends via wrapper-script
In reply to Armin KusterFrom: Douglas Royds via Openembedded-core <[email protected]>
By exporting ICECC_CC, ICECC_CXX, and ICECC_VERSION in a wrapper-script, and putting this wrapper-script in the PATH, the Makefiles generated by CMake or the autotools are able to function correctly outside of bitbake. This provides a convenient developer workflow in which the modify-compile-unittest cycle can happen directly in the ${B} directory.
The rm -f $ICE_PATH/$compiler line is transitional, and can go at some later date (October 2020 or later, perhaps).
--- meta/classes/icecc.bbclass | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-)
meta/classes/icecc.bbclass +20 -12
@@ -356,17 +356,6 @@ set_icecc_env() { return fi - # Create symlinks to icecc in the recipe-sysroot directory - mkdir -p ${ICE_PATH} - if [ -n "${KERNEL_CC}" ]; then - compilers="${@get_cross_kernel_cc(bb,d)}" - else - compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++" - fi - for compiler in $compilers; do - ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler - done - ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix
@@ -385,6 +374,26 @@ set_icecc_env() { return fi + # Create symlinks to icecc and wrapper-scripts in the recipe-sysroot directory + mkdir -p $ICE_PATH/symlinks + if [ -n "${KERNEL_CC}" ]; then + compilers="${@get_cross_kernel_cc(bb,d)}" + else + compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++" + fi + for compiler in $compilers; do + ln -sf $ICECC_BIN $ICE_PATH/symlinks/$compiler + rm -f $ICE_PATH/$compiler + cat <<-__EOF__ > $ICE_PATH/$compiler + #!/bin/sh -e + export ICECC_VERSION=$ICECC_VERSION + export ICECC_CC=$ICECC_CC + export ICECC_CXX=$ICECC_CXX + $ICE_PATH/symlinks/$compiler "\$@" + __EOF__ + chmod 775 $ICE_PATH/$compiler + done + ICECC_AS="`${ICECC_CC} -print-prog-name=as`" # for target recipes should return something like: # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as
@@ -417,7 +426,6 @@ set_icecc_env() { export CCACHE_PATH="$PATH" export CCACHE_DISABLE="1" - export ICECC_VERSION ICECC_CC ICECC_CXX export PATH="$ICE_PATH:$PATH" bbnote "Using icecc path: $ICE_PATH"
Signature · 1 line
2.7.4
PATCH 21/28 python: Fix CVE-2019-10160
In reply to Armin KusterFrom: Changqing Li <[email protected]>
--- .../python/python/bpo-36742-cve-2019-10160.patch | 81 ++++++++++++++++++++++ meta/recipes-devtools/python/python_2.7.16.bb | 1 + 2 files changed, 82 insertions(+) create mode 100644 meta/recipes-devtools/python/python/bpo-36742-cve-2019-10160.patch
meta/recipes-devtools/python/python/bpo-36742-cve-2019-10160.patch new file +81 -0
@@ -0,0 +1,81 @@ +From 5a1033fe5be764a135adcfff2fdc14edc3e5f327 Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 10 Oct 2019 16:32:19 +0800 +Subject: [PATCH] bpo-36742: Fixes handling of pre-normalization characters in + urlsplit() bpo-36742: Corrects fix to handle decomposition in usernames + +Upstream-Status: Backport + +https://github.com/python/cpython/commit/98a4dcefbbc3bce5ab07e7c0830a183157250259 +https://github.com/python/cpython/commit/f61599b050c621386a3fc6bc480359e2d3bb93de#diff-b577545d73dd0cdb2c337a4c5f89e1d7 + +CVE: CVE-2019-10160 + +Signed-off-by: Changqing Li <[email protected]> +--- + Lib/test/test_urlparse.py | 19 +++++++++++++------ + Lib/urlparse.py | 14 +++++++++----- + 2 files changed, 22 insertions(+), 11 deletions(-) + +diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py +index 1830d0b..857ed96 100644 +--- a/Lib/test/test_urlparse.py ++++ b/Lib/test/test_urlparse.py +@@ -641,13 +641,20 @@ class UrlParseTestCase(unittest.TestCase): + self.assertIn(u'\u2100', denorm_chars) + self.assertIn(u'\uFF03', denorm_chars) + ++ # bpo-36742: Verify port separators are ignored when they ++ # existed prior to decomposition ++ urlparse.urlsplit(u'http://\u30d5\u309a:80') ++ with self.assertRaises(ValueError): ++ urlparse.urlsplit(u'http://\u30d5\u309a\ufe1380') ++ + for scheme in [u"http", u"https", u"ftp"]: +- for c in denorm_chars: +- url = u"{}://netloc{}false.netloc/path".format(scheme, c) +- if test_support.verbose: +- print "Checking %r" % url +- with self.assertRaises(ValueError): +- urlparse.urlsplit(url) ++ for netloc in [u"netloc{}false.netloc", u"n{}user@netloc"]: ++ for c in denorm_chars: ++ url = u"{}://{}/path".format(scheme, netloc.format(c)) ++ if test_support.verbose: ++ print "Checking %r" % url ++ with self.assertRaises(ValueError): ++ urlparse.urlsplit(url) + + def test_main(): + test_support.run_unittest(UrlParseTestCase) +diff --git a/Lib/urlparse.py b/Lib/urlparse.py +index 54eda08..e34b368 100644 +--- a/Lib/urlparse.py ++++ b/Lib/urlparse.py +@@ -171,14 +171,18 @@ def _checknetloc(netloc): + # looking for characters like \u2100 that expand to 'a/c' + # IDNA uses NFKC equivalence, so normalize for this check + import unicodedata +- netloc2 = unicodedata.normalize('NFKC', netloc) +- if netloc == netloc2: ++ n = netloc.replace(u'@', u'') # ignore characters already included ++ n = n.replace(u':', u'') # but not the surrounding text ++ n = n.replace(u'#', u'') ++ n = n.replace(u'?', u'') ++ ++ netloc2 = unicodedata.normalize('NFKC', n) ++ if n == netloc2: + return +- _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay + for c in '/?#@:': + if c in netloc2: +- raise ValueError("netloc '" + netloc2 + "' contains invalid " + +- "characters under NFKC normalization") ++ raise ValueError(u"netloc '" + netloc + u"' contains invalid " + ++ u"characters under NFKC normalization") + + def urlsplit(url, scheme='', allow_fragments=True): + """Parse a URL into 5 components: +-- +2.7.4 +
meta/recipes-devtools/python/python_2.7.16.bb +1 -0
@@ -31,6 +31,7 @@ SRC_URI += " \ file://float-endian.patch \ file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \ file://0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch \ + file://bpo-36742-cve-2019-10160.patch \ " S = "${WORKDIR}/Python-${PV}"
Signature · 1 line
2.7.4
PATCH 22/28 libgcrypt: fix CVE-2019-12904
In reply to Armin KusterFrom: Yi Zhao <[email protected]>
In Libgcrypt 1.8.4, the C implementation of AES is vulnerable to a flush-and-reload side-channel attack because physical addresses are available to other processes. (The C implementation is used on platforms where an assembly-language implementation is unavailable.)
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2019-12904
Patches from:
https://github.com/gpg/libgcrypt/commit/1374254c2904ab5b18ba4a890856824a102d4705
https://github.com/gpg/libgcrypt/commit/daedbbb5541cd8ecda1459d3b843ea4d92788762
https://github.com/gpg/libgcrypt/commit/a4c561aab1014c3630bc88faf6f5246fee16b020
--- .../files/0001-Prefetch-GCM-look-up-tables.patch | 90 ++++++ ...ok-up-tables-to-.data-section-and-unshare.patch | 332 +++++++++++++++++++++ ...ok-up-table-to-.data-section-and-unshare-.patch | 178 +++++++++++ meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb | 3 + 4 files changed, 603 insertions(+) create mode 100644 meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch create mode 100644 meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch create mode 100644 meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch
meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch new file +90 -0
@@ -0,0 +1,90 @@ +From 1374254c2904ab5b18ba4a890856824a102d4705 Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna <[email protected]> +Date: Sat, 27 Apr 2019 19:33:28 +0300 +Subject: [PATCH 1/3] Prefetch GCM look-up tables + +* cipher/cipher-gcm.c (prefetch_table, do_prefetch_tables) +(prefetch_tables): New. +(ghash_internal): Call prefetch_tables. +-- + +Signed-off-by: Jussi Kivilinna <[email protected]> + +Upstream-Status: Backport +[https://github.com/gpg/libgcrypt/commit/1374254c2904ab5b18ba4a890856824a102d4705] + +CVE: CVE-2019-12904 + +Signed-off-by: Yi Zhao <[email protected]> +--- + cipher/cipher-gcm.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c +index c19f09f..11f119a 100644 +--- a/cipher/cipher-gcm.c ++++ b/cipher/cipher-gcm.c +@@ -118,6 +118,34 @@ static const u16 gcmR[256] = { + 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe, + }; + ++static inline ++void prefetch_table(const void *tab, size_t len) ++{ ++ const volatile byte *vtab = tab; ++ size_t i; ++ ++ for (i = 0; i < len; i += 8 * 32) ++ { ++ (void)vtab[i + 0 * 32]; ++ (void)vtab[i + 1 * 32]; ++ (void)vtab[i + 2 * 32]; ++ (void)vtab[i + 3 * 32]; ++ (void)vtab[i + 4 * 32]; ++ (void)vtab[i + 5 * 32]; ++ (void)vtab[i + 6 * 32]; ++ (void)vtab[i + 7 * 32]; ++ } ++ ++ (void)vtab[len - 1]; ++} ++ ++static inline void ++do_prefetch_tables (const void *gcmM, size_t gcmM_size) ++{ ++ prefetch_table(gcmM, gcmM_size); ++ prefetch_table(gcmR, sizeof(gcmR)); ++} ++ + #ifdef GCM_TABLES_USE_U64 + static void + bshift (u64 * b0, u64 * b1) +@@ -365,6 +393,8 @@ do_ghash (unsigned char *result, const unsigned char *buf, const u32 *gcmM) + #define fillM(c) \ + do_fillM (c->u_mode.gcm.u_ghash_key.key, c->u_mode.gcm.gcm_table) + #define GHASH(c, result, buf) do_ghash (result, buf, c->u_mode.gcm.gcm_table) ++#define prefetch_tables(c) \ ++ do_prefetch_tables(c->u_mode.gcm.gcm_table, sizeof(c->u_mode.gcm.gcm_table)) + + #else + +@@ -430,6 +460,7 @@ do_ghash (unsigned char *hsub, unsigned char *result, const unsigned char *buf) + + #define fillM(c) do { } while (0) + #define GHASH(c, result, buf) do_ghash (c->u_mode.gcm.u_ghash_key.key, result, buf) ++#define prefetch_tables(c) do {} while (0) + + #endif /* !GCM_USE_TABLES */ + +@@ -441,6 +472,8 @@ ghash_internal (gcry_cipher_hd_t c, byte *result, const byte *buf, + const unsigned int blocksize = GCRY_GCM_BLOCK_LEN; + unsigned int burn = 0; + ++ prefetch_tables (c); ++ + while (nblocks) + { + burn = GHASH (c, result, buf); +-- +2.7.4 +
meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch new file +332 -0
332 lines not on this page · raw message
meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch new file +178 -0
178 lines not on this page · raw message
meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb +3 -0
@@ -21,6 +21,9 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \ file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ + file://0001-Prefetch-GCM-look-up-tables.patch \ + file://0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch \ + file://0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch \ " SRC_URI[md5sum] = "fbfdaebbbc6d7e5fbbf6ffdb3e139573" SRC_URI[sha256sum] = "f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227"
Signature · 1 line
2.7.4
PATCH 23/28 dbus: update dbus-1.init to reflect new PID file
In reply to Armin KusterFrom: Tom Benn <[email protected]>
The PID file referenced in dbus-1.init script was out of date and no longer existed. This meant that dbus could not be restarted via init.d without force removing the old PID file.
--- meta/recipes-core/dbus/dbus/dbus-1.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus/dbus-1.init +2 -2
@@ -21,8 +21,8 @@ DAEMON=@bindir@/dbus-daemon NAME=dbus -DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf -PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf +DAEMONUSER=messagebus # must match /usr/share/dbus-1/system.conf +PIDFILE=/var/run/dbus/pid # must match /usr/share/dbus-1/system.conf UUIDDIR=/var/lib/dbus DESC="system message bus" EVENTDIR=/etc/dbus-1/event.d
Signature · 1 line
2.7.4
PATCH 24/28 sudo: fix CVE-2019-14287
In reply to Armin KusterFrom: Changqing Li <[email protected]>
In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer account can bypass certain policy blacklists and session PAM modules, and can cause incorrect logging, by invoking sudo with a crafted user ID. For example, this allows bypass of !root configuration, and USER= logging, for a "sudo -u \#$((0xffffffff))" command.
--- .../sudo/sudo/CVE-2019-14287-1.patch | 178 +++++++++++++++++++++ .../sudo/sudo/CVE-2019-14287-2.patch | 112 +++++++++++++ meta/recipes-extended/sudo/sudo_1.8.27.bb | 2 + 3 files changed, 292 insertions(+) create mode 100644 meta/recipes-extended/sudo/sudo/CVE-2019-14287-1.patch create mode 100644 meta/recipes-extended/sudo/sudo/CVE-2019-14287-2.patch
meta/recipes-extended/sudo/sudo/CVE-2019-14287-1.patch new file +178 -0
@@ -0,0 +1,178 @@ +From f752ae5cee163253730ff7cdf293e34a91aa5520 Mon Sep 17 00:00:00 2001 +From: "Todd C. Miller" <[email protected]> +Date: Thu, 10 Oct 2019 10:04:13 -0600 +Subject: [PATCH] Treat an ID of -1 as invalid since that means "no change". + Fixes CVE-2019-14287. Found by Joe Vennix from Apple Information Security. + +Upstream-Status: Backport [https://github.com/sudo-project/sudo/commit/f752ae5cee163253730ff7cdf293e34a91aa5520] +CVE: CVE-2019-14287 + +Signed-off-by: Changqing Li <[email protected]> + +--- + lib/util/strtoid.c | 100 ++++++++++++++++++++++++++++------------------------- + 1 files changed, 53 insertions(+), 46 deletions(-) + +diff --git a/lib/util/strtoid.c b/lib/util/strtoid.c +index 2dfce75..6b3916b 100644 +--- a/lib/util/strtoid.c ++++ b/lib/util/strtoid.c +@@ -49,6 +49,27 @@ + #include "sudo_util.h" + + /* ++ * Make sure that the ID ends with a valid separator char. ++ */ ++static bool ++valid_separator(const char *p, const char *ep, const char *sep) ++{ ++ bool valid = false; ++ debug_decl(valid_separator, SUDO_DEBUG_UTIL) ++ ++ if (ep != p) { ++ /* check for valid separator (including '\0') */ ++ if (sep == NULL) ++ sep = ""; ++ do { ++ if (*ep == *sep) ++ valid = true; ++ } while (*sep++ != '\0'); ++ } ++ debug_return_bool(valid); ++} ++ ++/* + * Parse a uid/gid in string form. + * If sep is non-NULL, it contains valid separator characters (e.g. comma, space) + * If endp is non-NULL it is set to the next char after the ID. +@@ -62,36 +83,33 @@ sudo_strtoid_v1(const char *p, const char *sep, char **endp, const char **errstr + char *ep; + id_t ret = 0; + long long llval; +- bool valid = false; + debug_decl(sudo_strtoid, SUDO_DEBUG_UTIL) + + /* skip leading space so we can pick up the sign, if any */ + while (isspace((unsigned char)*p)) + p++; +- if (sep == NULL) +- sep = ""; ++ ++ /* While id_t may be 64-bit signed, uid_t and gid_t are 32-bit unsigned. */ + errno = 0; + llval = strtoll(p, &ep, 10); +- if (ep != p) { +- /* check for valid separator (including '\0') */ +- do { +- if (*ep == *sep) +- valid = true; +- } while (*sep++ != '\0'); ++ if ((errno == ERANGE && llval == LLONG_MAX) || llval > (id_t)UINT_MAX) { ++ errno = ERANGE; ++ if (errstr != NULL) ++ *errstr = N_("value too large"); ++ goto done; + } +- if (!valid) { ++ if ((errno == ERANGE && llval == LLONG_MIN) || llval < INT_MIN) { ++ errno = ERANGE; + if (errstr != NULL) +- *errstr = N_("invalid value"); +- errno = EINVAL; ++ *errstr = N_("value too small"); + goto done; + } +- if (errno == ERANGE) { +- if (errstr != NULL) { +- if (llval == LLONG_MAX) +- *errstr = N_("value too large"); +- else +- *errstr = N_("value too small"); +- } ++ ++ /* Disallow id -1, which means "no change". */ ++ if (!valid_separator(p, ep, sep) || llval == -1 || llval == (id_t)UINT_MAX) { ++ if (errstr != NULL) ++ *errstr = N_("invalid value"); ++ errno = EINVAL; + goto done; + } + ret = (id_t)llval; +@@ -108,30 +126,15 @@ sudo_strtoid_v1(const char *p, const char *sep, char **endp, const char **errstr + { + char *ep; + id_t ret = 0; +- bool valid = false; + debug_decl(sudo_strtoid, SUDO_DEBUG_UTIL) + + /* skip leading space so we can pick up the sign, if any */ + while (isspace((unsigned char)*p)) + p++; +- if (sep == NULL) +- sep = ""; ++ + errno = 0; + if (*p == '-') { + long lval = strtol(p, &ep, 10); +- if (ep != p) { +- /* check for valid separator (including '\0') */ +- do { +- if (*ep == *sep) +- valid = true; +- } while (*sep++ != '\0'); +- } +- if (!valid) { +- if (errstr != NULL) +- *errstr = N_("invalid value"); +- errno = EINVAL; +- goto done; +- } + if ((errno == ERANGE && lval == LONG_MAX) || lval > INT_MAX) { + errno = ERANGE; + if (errstr != NULL) +@@ -144,28 +147,31 @@ sudo_strtoid_v1(const char *p, const char *sep, char **endp, const char **errstr + *errstr = N_("value too small"); + goto done; + } +- ret = (id_t)lval; +- } else { +- unsigned long ulval = strtoul(p, &ep, 10); +- if (ep != p) { +- /* check for valid separator (including '\0') */ +- do { +- if (*ep == *sep) +- valid = true; +- } while (*sep++ != '\0'); +- } +- if (!valid) { ++ ++ /* Disallow id -1, which means "no change". */ ++ if (!valid_separator(p, ep, sep) || lval == -1) { + if (errstr != NULL) + *errstr = N_("invalid value"); + errno = EINVAL; + goto done; + } ++ ret = (id_t)lval; ++ } else { ++ unsigned long ulval = strtoul(p, &ep, 10); + if ((errno == ERANGE && ulval == ULONG_MAX) || ulval > UINT_MAX) { + errno = ERANGE; + if (errstr != NULL) + *errstr = N_("value too large"); + goto done; + } ++ ++ /* Disallow id -1, which means "no change". */ ++ if (!valid_separator(p, ep, sep) || ulval == UINT_MAX) { ++ if (errstr != NULL) ++ *errstr = N_("invalid value"); ++ errno = EINVAL; ++ goto done; ++ } + ret = (id_t)ulval; + } + if (errstr != NULL) +-- +2.7.4 +
meta/recipes-extended/sudo/sudo/CVE-2019-14287-2.patch new file +112 -0
112 lines not on this page · raw message
meta/recipes-extended/sudo/sudo_1.8.27.bb +2 -0
@@ -3,6 +3,8 @@ require sudo.inc SRC_URI = "http://www.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ file://0001-Include-sys-types.h-for-id_t-definition.patch \ + file://CVE-2019-14287-1.patch \ + file://CVE-2019-14287-2.patch \ " PAM_SRC_URI = "file://sudo.pam"
Signature · 1 line
2.7.4
PATCH 25/28 go: fix CVE-2019-16276
In reply to Armin KusterFrom: Chen Qi <[email protected]>
--- meta/recipes-devtools/go/go-1.12.inc | 1 + ...nch.go1.12-security-net-textproto-don-t-n.patch | 163 +++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch
meta/recipes-devtools/go/go-1.12.inc +1 -0
@@ -16,6 +16,7 @@ SRC_URI += "\ file://0006-cmd-dist-separate-host-and-target-builds.patch \ file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ + file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \ " SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch new file +163 -0
163 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [zeus 25/28] go: fix CVE-2019-16276
This seems to cause:
ERROR: go-native-1.12.1-r0 do_patch: Fuzz detected:
Applying patch 0001-release-branch.go1.12-security-net-textproto-don-t-n.patch patching file src/net/http/serve_test.go
patching file src/net/http/transport_test.go
Hunk #1 succeeded at 5059 with fuzz 2 (offset -74 lines). patching file src/net/textproto/reader.go
patching file src/net/textproto/reader_test.go
The context lines in the patches can be updated with devtool:
devtool modify go-native
devtool finish --force-patch-refresh go-native <layer_path>
Don't forget to review changes done by devtool!
ERROR: go-native-1.12.1-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]
and the same for go-cross and go-runtime.
The version currently in master is the same, so I guess both are showing this QA issue.
Regards,
Quoted 239 lines · Armin Kuster
From: Chen Qi <[email protected]>
Signed-off-by Chen Qi <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit e31f87e289dfd3bbca961e927447a9c7ba816d3f)Signed-off-by Armin Kuster <[email protected]>--- meta/recipes-devtools/go/go-1.12.inc | 1 + ...nch.go1.12-security-net-textproto-don-t-n.patch | 163 +++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644
meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchmeta/recipes-devtools/go/go-1.12.inc +1
-0@@ -16,6 +16,7 @@ SRC_URI += "\ file://0006-cmd-dist-separate-host-and-target-builds.patch \ file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ + file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \ " SRC_URI_append_libc-musl = "file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
diff --git
a/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchb/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchnew file mode 100644
index 0000000..7b39dbd
---/dev/null
+++b/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchmeta/recipes-devtools/go/go-1.12.inc +11
-0@@ -0,0 +1,163 @@ +From 265b691ac440bfb711d8de323346f7d72e620efe Mon Sep 17 00:00:00 2001 +From: Filippo Valsorda <[email protected]> +Date: Thu, 12 Sep 2019 12:37:36 -0400 +Subject: [PATCH] [release-branch.go1.12-security] net/textproto: don't + normalize headers with spaces before the colon + +RFC 7230 is clear about headers with a space before the colon, like + +X-Answer : 42 + +being invalid, but we've been accepting and normalizing them forcompatibility
meta/recipes-devtools/go/go-1.12.inc +3
-0+purposes since CL 5690059 in 2012. + +On the client side, this is harmless and indeed most browsers behave thesame
meta/recipes-devtools/go/go-1.12.inc +2
-0+to this day. On the server side, this becomes a security issue when the +behavior doesn't match that of a reverse proxy sitting in front of theserver.
meta/recipes-devtools/go/go-1.12.inc +5
-0+ +For example, if a WAF accepts them without normalizing them, it might be +possible to bypass its filters, because the Go server would interpret the +header differently. Worse, if the reverse proxy coalesces requests onto a +single HTTP/1.1 connection to a Go server, the understanding of therequest
+boundaries can get out of sync between them, allowing an attacker to tack anmeta/recipes-devtools/go/go-1.12.inc +10
-0+arbitrary method and path onto a request by other clients, including +authentication headers unknown to the attacker. + +This was recently presented at multiple security conferences: +https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn + +net/http servers already reject header keys with invalid characters. +Simply stop normalizing extra spaces in net/textproto, let it return them +unchanged like it does for other invalid headers, and let net/http enforce +RFC 7230, which is HTTP specific. This loses us normalization on theclient
+side, but there's no right answer on the client side anyway, and hiding themeta/recipes-devtools/go/go-1.12.inc +6
-0+issue sounds worse than letting the application decide. + +Fixes CVE-2019-16276 + +Change-Id: I6d272de827e0870da85d93df770d6a0e161bbcf1 +Reviewed-on:https://team-review.git.corp.google.com/c/golang/go-private/+/549719
+Reviewed-by
<https://team-review.git.corp.google.com/c/golang/go-private/+/549719+Reviewed-by>:
Brad Fitzpatrick <[email protected]>meta/recipes-devtools/go/go-1.12.inc +2
-0+(cherry picked from commit 1280b868e82bf173ea3e988be3092d160ee66082) +Reviewed-on:https://team-review.git.corp.google.com/c/golang/go-private/+/558776
+Reviewed-by
<https://team-review.git.corp.google.com/c/golang/go-private/+/558776+Reviewed-by>:
Dmitri Shuralyov <[email protected]>meta/recipes-devtools/go/go-1.12.inc +4
-0+ +CVE: CVE-2019-16276 + +Upstream-Status: Backport [https://github.com/golang/go/commit/6e6f4aaf70c8b1cc81e65a26332aa9409de03ad8
]meta/recipes-devtools/go/go-1.12.inc +15
-0+ +Signed-off-by: Chen Qi <[email protected]> +--- + src/net/http/serve_test.go | 4 ++++ + src/net/http/transport_test.go | 27 +++++++++++++++++++++++++++ + src/net/textproto/reader.go | 10 ++-------- + src/net/textproto/reader_test.go | 13 ++++++------- + 4 files changed, 39 insertions(+), 15 deletions(-) + +diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go +index 6eb0088a96..89bfdfbb82 100644 +--- a/src/net/http/serve_test.go ++++ b/src/net/http/serve_test.go +@@ -4748,6 +4748,10 @@ func TestServerValidatesHeaders(t *testing.T) { + {"foo\xffbar: foo\r\n", 400}, //binary in header
+ {"foo\x00bar: foo\r\n", 400}, //
binary in header
+ {"Foo: " +strings.Repeat("x", 1<<21)+ "\r\n", 431}, //
header too large++ // Spaces between the header key and colon are not allowed. ++ // See RFC 7230, Section 3.2.4. ++ {"Foo : bar\r\n", 400}, ++ {"Foo\t: bar\r\n", 400},meta/recipes-devtools/go/go-1.12.inc +4
-0+ + {"foo: foo foo\r\n", 200}, // LWS space is okay + {"foo: foo\tfoo\r\n", 200}, // LWS tab is okay +diff --git a/src/net/http/transport_test.gob/src/net/http/transport_test.go
meta/recipes-devtools/go/go-1.12.inc +6
-0+index 5c329543e2..5e5438a708 100644 +--- a/src/net/http/transport_test.go ++++ b/src/net/http/transport_test.go +@@ -5133,3 +5133,30 @@ func TestTransportIgnores408(t *testing.T) { + } + t.Fatalf("timeout after %v waiting for Transport connections todie off",
time.Since(t0))
+ }
++
++funcTestInvalidHeaderResponse(t *testing.T){++ setParallel(t) ++ defer afterTest(t) ++ cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) { ++ conn, buf, _ := w.(Hijacker).Hijack() ++ buf.Write([]byte("HTTP/1.1 200 OK\r\n" + ++ "Date: Wed, 30 Aug 2017 19:09:27 GMT\r\n" + ++ "Content-Type: text/html; charset=utf-8\r\n" + ++ "Content-Length: 0\r\n" + ++ "Foo : bar\r\n\r\n")) ++ buf.Flush() ++ conn.Close() ++ })) ++ defer cst.close() ++ res, err := cst.c.Get(cst.ts.URL) ++ if err != nil { ++ t.Fatal(err) ++ } ++ defer res.Body.Close() ++ if v := res.Header.Get("Foo"); v != "" {++ t.Errorf(
unexpected "Foo" header: %q, v)
++ }
++ if v :=res.Header.Get("Foo "); v != "bar" {
++ t.Errorf(bad "Foo " header value: %q, want %q, v, "bar")
++ }
++}meta/recipes-devtools/go/go-1.12.inc +5
-0+diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go +index 2c4f25d5ae..1a5e364cf7 100644 +--- a/src/net/textproto/reader.go ++++ b/src/net/textproto/reader.go +@@ -493,18 +493,12 @@ func (r *Reader) ReadMIMEHeader() (MIMEHeader,error) {
meta/recipes-devtools/go/go-1.12.inc +5
-0+ return m, err + } + +- // Key ends at first colon; should not have trailing spaces +- // but they appear in the wild, violating specs, so weremove
+- // them if present. ++ // Key ends at first colon.meta/recipes-devtools/go/go-1.12.inc +3
-0+ i := bytes.IndexByte(kv, ':') + if i < 0 { + return m, ProtocolError("malformed MIME headerline: " + string(kv))
meta/recipes-devtools/go/go-1.12.inc +9
-0+ } +- endKey := i +- for endKey > 0 && kv[endKey-1] == ' ' { +- endKey-- +- } +- key := canonicalMIMEHeaderKey(kv[:endKey]) ++ key := canonicalMIMEHeaderKey(kv[:i]) + + // As per RFC 7230 field-name is a token, tokens consistof one or more chars.
+ // We could return a ProtocolError here, but better to be
liberal in what we
+diff --git a/src/net/textproto/reader_test.go
b/src/net/textproto/reader_test.gometa/recipes-devtools/go/go-1.12.inc +15
-0+index f85fbdc36d..b92fdcd3c7 100644 +--- a/src/net/textproto/reader_test.go ++++ b/src/net/textproto/reader_test.go +@@ -188,11 +188,10 @@ func TestLargeReadMIMEHeader(t *testing.T) { + } + } + +-// Test that we read slightly-bogus MIME headers seen in the wild, +-// with spaces before colons, and spaces in keys. ++// TestReadMIMEHeaderNonCompliant checks that we don't normalize headers ++// with spaces before colons, and accept spaces in keys. + func TestReadMIMEHeaderNonCompliant(t *testing.T) { +- // Invalid HTTP response header as sent by an Axis security +- // camera: (this is handled by IE, Firefox, Chrome, curl, etc.) ++ // These invalid headers will be rejected by net/http according toRFC 7230.
meta/recipes-devtools/go/go-1.12.inc +16
-0+ r := reader("Foo: bar\r\n" + + "Content-Language: en\r\n" + + "SID : 0\r\n" + +@@ -202,9 +201,9 @@ func TestReadMIMEHeaderNonCompliant(t *testing.T) { + want := MIMEHeader{ + "Foo": {"bar"}, + "Content-Language": {"en"}, +- "Sid": {"0"}, +- "Audio Mode": {"None"}, +- "Privilege": {"127"}, ++ "SID ": {"0"}, ++ "Audio Mode ": {"None"}, ++ "Privilege ": {"127"}, + } + if !reflect.DeepEqual(m, want) || err != nil { + t.Fatalf("ReadMIMEHeader =\n%v, %v; want:\n%v", m, err,want)
--
2.7.4--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [zeus 25/28] go: fix CVE-2019-16276
I'm sorry I was looking at wrong build before.
It doesn't happen in zeus and master. Only with warrior where this was backported as well in:
"[OE-core] [warrior 18/19] go: fix CVE-2019-16276"
Probably because warrior is using older minor version of 1.12 go:
-GO_MINOR = ".1"
+GO_MINOR = ".9"
Quoted 275 lines · Martin Jansa
This seems to cause:
ERROR: go-native-1.12.1-r0
do_patch: Fuzz detected:Applying patch 0001-release-branch.go1.12-security-net-textproto-don-t-n.patch patching file src/net/http/serve_test.go
patching file src/net/http/transport_test.go
Hunk #1 succeeded at 5059 with fuzz 2 (offset -74 lines). patching file src/net/textproto/reader.go
patching file src/net/textproto/reader_test.goThe context lines in the patches can be updated with devtool:
devtool modify go-native
devtool finish --force-patch-refresh go-native <layer_path>Don't forget to review changes done by devtool!
ERROR: go-native-1.12.1-r0
do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]and the same for go-cross and go-runtime.
The version currently in master is the same, so I guess both are showing this QA issue.
Regards,
Quoted 243 lines · Armin Kuster
From: Chen Qi <[email protected]>
Signed-off-by Chen Qi <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit e31f87e289dfd3bbca961e927447a9c7ba816d3f)Signed-off-by Armin Kuster <[email protected]>--- meta/recipes-devtools/go/go-1.12.inc | 1 + ...nch.go1.12-security-net-textproto-don-t-n.patch | 163 +++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644
meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchmeta/recipes-devtools/go/go-1.12.inc +1
-0@@ -16,6 +16,7 @@ SRC_URI += "\ file://0006-cmd-dist-separate-host-and-target-builds.patch \ file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ + file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \ " SRC_URI_append_libc-musl = "file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
diff --git
a/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchb/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchnew file mode 100644
index 0000000..7b39dbd
---/dev/null
+++b/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patchmeta/recipes-devtools/go/go-1.12.inc +11
-0@@ -0,0 +1,163 @@ +From 265b691ac440bfb711d8de323346f7d72e620efe Mon Sep 17 00:00:00 2001 +From: Filippo Valsorda <[email protected]> +Date: Thu, 12 Sep 2019 12:37:36 -0400 +Subject: [PATCH] [release-branch.go1.12-security] net/textproto: don't + normalize headers with spaces before the colon + +RFC 7230 is clear about headers with a space before the colon, like + +X-Answer : 42 + +being invalid, but we've been accepting and normalizing them forcompatibility
meta/recipes-devtools/go/go-1.12.inc +3
-0+purposes since CL 5690059 in 2012. + +On the client side, this is harmless and indeed most browsers behave thesame
meta/recipes-devtools/go/go-1.12.inc +2
-0+to this day. On the server side, this becomes a security issue when the +behavior doesn't match that of a reverse proxy sitting in front of theserver.
meta/recipes-devtools/go/go-1.12.inc +5
-0+ +For example, if a WAF accepts them without normalizing them, it might be +possible to bypass its filters, because the Go server would interpret the +header differently. Worse, if the reverse proxy coalesces requests onto a +single HTTP/1.1 connection to a Go server, the understanding of therequest
+boundaries can get out of sync between them, allowing an attacker to tack anmeta/recipes-devtools/go/go-1.12.inc +5
-0+arbitrary method and path onto a request by other clients, including +authentication headers unknown to the attacker. + +This was recently presented at multiple security conferences: +https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn
meta/recipes-devtools/go/go-1.12.inc +4
-0+ +net/http servers already reject header keys with invalid characters. +Simply stop normalizing extra spaces in net/textproto, let it return them +unchanged like it does for other invalid headers, and let net/httpenforce
+RFC 7230, which is HTTP specific. This loses us normalization on the client
+side, but there's no right answer on the client side anyway, and hiding themeta/recipes-devtools/go/go-1.12.inc +6
-0+issue sounds worse than letting the application decide. + +Fixes CVE-2019-16276 + +Change-Id: I6d272de827e0870da85d93df770d6a0e161bbcf1 +Reviewed-on:https://team-review.git.corp.google.com/c/golang/go-private/+/549719
+Reviewed-by
<https://team-review.git.corp.google.com/c/golang/go-private/+/549719+Reviewed-by>:
Brad Fitzpatrick <[email protected]>meta/recipes-devtools/go/go-1.12.inc +2
-0+(cherry picked from commit 1280b868e82bf173ea3e988be3092d160ee66082) +Reviewed-on:https://team-review.git.corp.google.com/c/golang/go-private/+/558776
+Reviewed-by
<https://team-review.git.corp.google.com/c/golang/go-private/+/558776+Reviewed-by>:
Dmitri Shuralyov <[email protected]>meta/recipes-devtools/go/go-1.12.inc +4
-0+ +CVE: CVE-2019-16276 + +Upstream-Status: Backport [https://github.com/golang/go/commit/6e6f4aaf70c8b1cc81e65a26332aa9409de03ad8
]meta/recipes-devtools/go/go-1.12.inc +15
-0+ +Signed-off-by: Chen Qi <[email protected]> +--- + src/net/http/serve_test.go | 4 ++++ + src/net/http/transport_test.go | 27 +++++++++++++++++++++++++++ + src/net/textproto/reader.go | 10 ++-------- + src/net/textproto/reader_test.go | 13 ++++++------- + 4 files changed, 39 insertions(+), 15 deletions(-) + +diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go +index 6eb0088a96..89bfdfbb82 100644 +--- a/src/net/http/serve_test.go ++++ b/src/net/http/serve_test.go +@@ -4748,6 +4748,10 @@ func TestServerValidatesHeaders(t *testing.T) { + {"foo\xffbar: foo\r\n", 400}, //binary in header
+ {"foo\x00bar: foo\r\n", 400}, //
binary in header
+ {"Foo: " +strings.Repeat("x", 1<<21)+ "\r\n", 431}, //
header too large
++ // Spaces between the header key and colon are not
allowed.++ // See RFC 7230, Section 3.2.4. ++ {"Foo : bar\r\n", 400}, ++ {"Foo\t: bar\r\n", 400},meta/recipes-devtools/go/go-1.12.inc +4
-0+ + {"foo: foo foo\r\n", 200}, // LWS space is okay + {"foo: foo\tfoo\r\n", 200}, // LWS tab is okay +diff --git a/src/net/http/transport_test.gob/src/net/http/transport_test.go
meta/recipes-devtools/go/go-1.12.inc +6
-0+index 5c329543e2..5e5438a708 100644 +--- a/src/net/http/transport_test.go ++++ b/src/net/http/transport_test.go +@@ -5133,3 +5133,30 @@ func TestTransportIgnores408(t *testing.T) { + } + t.Fatalf("timeout after %v waiting for Transport connections todie off",
time.Since(t0))
+ }
++
++funcTestInvalidHeaderResponse(t *testing.T){++ setParallel(t) ++ defer afterTest(t) ++ cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) { ++ conn, buf, _ := w.(Hijacker).Hijack() ++ buf.Write([]byte("HTTP/1.1 200 OK\r\n" + ++ "Date: Wed, 30 Aug 2017 19:09:27 GMT\r\n" + ++ "Content-Type: text/html; charset=utf-8\r\n" + ++ "Content-Length: 0\r\n" + ++ "Foo : bar\r\n\r\n")) ++ buf.Flush() ++ conn.Close() ++ })) ++ defer cst.close() ++ res, err := cst.c.Get(cst.ts.URL) ++ if err != nil { ++ t.Fatal(err) ++ } ++ defer res.Body.Close() ++ if v := res.Header.Get("Foo"); v != "" {++ t.Errorf(
unexpected "Foo" header: %q, v)
++ }
++ if v :=res.Header.Get("Foo "); v != "bar" {
++ t.Errorf(bad "Foo " header value: %q, want %q, v, "bar")
++ }
++}meta/recipes-devtools/go/go-1.12.inc +5
-0+diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go +index 2c4f25d5ae..1a5e364cf7 100644 +--- a/src/net/textproto/reader.go ++++ b/src/net/textproto/reader.go +@@ -493,18 +493,12 @@ func (r *Reader) ReadMIMEHeader() (MIMEHeader,error) {
meta/recipes-devtools/go/go-1.12.inc +4
-0+ return m, err + } + +- // Key ends at first colon; should not have trailingspaces
+- // but they appear in the wild, violating specs, so we
remove+- // them if present. ++ // Key ends at first colon.meta/recipes-devtools/go/go-1.12.inc +3
-0+ i := bytes.IndexByte(kv, ':') + if i < 0 { + return m, ProtocolError("malformed MIME headerline: " + string(kv))
meta/recipes-devtools/go/go-1.12.inc +9
-0+ } +- endKey := i +- for endKey > 0 && kv[endKey-1] == ' ' { +- endKey-- +- } +- key := canonicalMIMEHeaderKey(kv[:endKey]) ++ key := canonicalMIMEHeaderKey(kv[:i]) + + // As per RFC 7230 field-name is a token, tokens consistof one or more chars.
+ // We could return a ProtocolError here, but better to be
liberal in what we
+diff --git a/src/net/textproto/reader_test.go
b/src/net/textproto/reader_test.gometa/recipes-devtools/go/go-1.12.inc +15
-0+index f85fbdc36d..b92fdcd3c7 100644 +--- a/src/net/textproto/reader_test.go ++++ b/src/net/textproto/reader_test.go +@@ -188,11 +188,10 @@ func TestLargeReadMIMEHeader(t *testing.T) { + } + } + +-// Test that we read slightly-bogus MIME headers seen in the wild, +-// with spaces before colons, and spaces in keys. ++// TestReadMIMEHeaderNonCompliant checks that we don't normalize headers ++// with spaces before colons, and accept spaces in keys. + func TestReadMIMEHeaderNonCompliant(t *testing.T) { +- // Invalid HTTP response header as sent by an Axis security +- // camera: (this is handled by IE, Firefox, Chrome, curl, etc.) ++ // These invalid headers will be rejected by net/http accordingto RFC 7230.
meta/recipes-devtools/go/go-1.12.inc +16
-0+ r := reader("Foo: bar\r\n" + + "Content-Language: en\r\n" + + "SID : 0\r\n" + +@@ -202,9 +201,9 @@ func TestReadMIMEHeaderNonCompliant(t *testing.T) { + want := MIMEHeader{ + "Foo": {"bar"}, + "Content-Language": {"en"}, +- "Sid": {"0"}, +- "Audio Mode": {"None"}, +- "Privilege": {"127"}, ++ "SID ": {"0"}, ++ "Audio Mode ": {"None"}, ++ "Privilege ": {"127"}, + } + if !reflect.DeepEqual(m, want) || err != nil { + t.Fatalf("ReadMIMEHeader =\n%v, %v; want:\n%v", m, err,want)
--
2.7.4--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
PATCH 26/28 util-linux: fix PKNAME name is NULL when use lsblk [LIN1019-2963]
In reply to Armin KusterFrom: Liwei Song <[email protected]>
PKNAME is NULL when run "lsblk -o+PKNAME /dev/sda1" backport an upstream patch to fix it.
--- ...lsblk-force-to-print-PKNAME-for-partition.patch | 36 ++++++++++++++++++++++ meta/recipes-core/util-linux/util-linux_2.34.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch
meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch new file +36 -0
@@ -0,0 +1,36 @@ +From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001 +From: Karel Zak <[email protected]> +Date: Thu, 27 Jun 2019 09:22:18 +0200 +Subject: [PATCH] lsblk: force to print PKNAME for partition + +PKNAME (parent kernel device name) is based on printed tree according +to parent -> child relationship. The tree is optional and not printed +if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old +versions print the PKNAME also in this case. + +Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/e3bb9bfb76c17b1d05814436ced62c05c4011f48] + +Addresses: https://github.com/karelzak/util-linux/issues/813 +Signed-off-by: Karel Zak <[email protected]> +Signed-off-by: Liwei Song <[email protected]> +--- + misc-utils/lsblk.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index e95af7af0256..3ce6da730264 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -1019,6 +1019,9 @@ static void device_to_scols( + DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name)); + ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name)); + ++ if (!parent && dev->wholedisk) ++ parent = dev->wholedisk; ++ + /* Do not print device more than one in --list mode */ + if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) + return; +-- +2.17.1 +
meta/recipes-core/util-linux/util-linux_2.34.bb +1 -0
@@ -7,6 +7,7 @@ SRC_URI += "file://configure-sbindir.patch \ file://run-ptest \ file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ + file://0001-lsblk-force-to-print-PKNAME-for-partition.patch \ " SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50" SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
Signature · 1 line
2.7.4
PATCH 27/28 wic/engine: use 'linux-swap' for swap file system
In reply to Armin KusterFrom: Chee Yang Lee <[email protected]>
[YOCTO #13312]
see https://bugzilla.yoctoproject.org/show_bug.cgi?id=13312
wic/engine.Disk._get_part_image was looking at variable fstypes for supported fstype which is 'swap' but image build with 'linux-swap'. supported fstype should be 'linux-swap'.
--- scripts/lib/wic/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/wic/engine.py +1 -1
@@ -541,7 +541,7 @@ def wic_write(args, native_sysroot): """ Write image to a target device. """ - disk = Disk(args.image, native_sysroot, ('fat', 'ext', 'swap')) + disk = Disk(args.image, native_sysroot, ('fat', 'ext', 'linux-swap')) disk.write(args.target, args.expand) def find_canned(scripts_path, file_name):
Signature · 1 line
2.7.4
PATCH 28/28 connman: mark connman-wait-online as SYSTEMD_PACKAGE
In reply to Armin KusterFrom: André Draszik <[email protected]>
The connman-wait-online package currently isn't marked as systemd-enabled package. This means it is impossible to auto-enable the service during image creation or package installation, as no preset files and no pkg_postinst() snippet is being created.
This change should have been done as part of the
upgrade to v1.31
Note:
connman-wait-online is needed when connman is in use in more complex network/interface setups for systemd's network-online.target to report success. systemd-networkd's systemd-networkd-wait-online.service alone doesn't work in such scenarios and simply times out, as it know nothing about the expected network/ interface configuration, meaning the target doesn't boot successfully (systemctl list-units --failed), and long delays are seen, caused by waiting for the systemd-networkd-wait-online.service timeout.
--- meta/recipes-connectivity/connman/connman.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/connman/connman.inc +1 -1
@@ -59,7 +59,7 @@ INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." python __anonymous () { - systemd_packages = "${PN}" + systemd_packages = "${PN} ${PN}-wait-online" pkgconfig = d.getVar('PACKAGECONFIG') if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): systemd_packages += " ${PN}-vpn"
Signature · 1 line
2.7.4