summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2020-12-09 09:09:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-18 14:20:19 +0000
commit31e97c2cae0b54cd8858c8956d97a6d6f51fffdd (patch)
tree57be48d9c70379e156c0e4102d292689e6c5bf0c /meta/recipes-devtools
parentcc2e2c2d065530a5ab33fed139d16fe1dcdca4d9 (diff)
downloadpoky-31e97c2cae0b54cd8858c8956d97a6d6f51fffdd.tar.gz
python3: fix CVE-2019-20907
- move fixing patch for CVE-2020-8492 to the right location (From OE-Core rev: f7e7378ea7099af8555de809787cf8e2cb5208fd) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python3/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch (renamed from meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch)0
-rw-r--r--meta/recipes-devtools/python/python3/CVE-2019-20907.patch44
-rw-r--r--meta/recipes-devtools/python/python3_3.8.2.bb1
3 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch b/meta/recipes-devtools/python/python3/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch
index e16b99bcb9..e16b99bcb9 100644
--- a/meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch
+++ b/meta/recipes-devtools/python/python3/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch
diff --git a/meta/recipes-devtools/python/python3/CVE-2019-20907.patch b/meta/recipes-devtools/python/python3/CVE-2019-20907.patch
new file mode 100644
index 0000000000..a2e72372dd
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/CVE-2019-20907.patch
@@ -0,0 +1,44 @@
1From a06a6bf4e67a50561f6d6fb33534df1d3035ea34 Mon Sep 17 00:00:00 2001
2From: Rishi <rishi_devan@mail.com>
3Date: Wed, 15 Jul 2020 13:51:00 +0200
4Subject: [PATCH] bpo-39017: Avoid infinite loop in the tarfile module
5 (GH-21454)
6
7Avoid infinite loop when reading specially crafted TAR files using the tarfile module
8(CVE-2019-20907).
9(cherry picked from commit 5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4)
10
11Co-authored-by: Rishi <rishi_devan@mail.com>
12
13Removed testing 'recursion.tar' tar file due to binary data
14
15Upstream-Status: Backport [https://github.com/python/cpython/commit/c55479556db015f48fc8bbca17f64d3e65598559]
16CVE: CVE-2019-20907
17Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
18---
19 Lib/tarfile.py | 2 ++
20 .../2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst | 1 +
21 4 files changed, 10 insertions(+)
22 create mode 100644 Lib/test/recursion.tar
23 create mode 100644 Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst
24
25diff --git a/Lib/tarfile.py b/Lib/tarfile.py
26index d31b9cbb51d65..7a69e1b1aa544 100755
27--- a/Lib/tarfile.py
28+++ b/Lib/tarfile.py
29@@ -1241,6 +1241,8 @@ def _proc_pax(self, tarfile):
30
31 length, keyword = match.groups()
32 length = int(length)
33+ if length == 0:
34+ raise InvalidHeaderError("invalid header")
35 value = buf[match.end(2) + 1:match.start(1) + length - 1]
36
37 # Normally, we could just use "utf-8" as the encoding and "strict"
38diff --git a/Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst b/Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst
39new file mode 100644
40index 0000000000000..ad26676f8b856
41--- /dev/null
42+++ b/Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst
43@@ -0,0 +1 @@
44+Avoid infinite loop when reading specially crafted TAR files using the tarfile module (CVE-2019-20907).
diff --git a/meta/recipes-devtools/python/python3_3.8.2.bb b/meta/recipes-devtools/python/python3_3.8.2.bb
index b4cce88e87..9eddad4ad4 100644
--- a/meta/recipes-devtools/python/python3_3.8.2.bb
+++ b/meta/recipes-devtools/python/python3_3.8.2.bb
@@ -33,6 +33,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
33 file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \ 33 file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
34 file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \ 34 file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
35 file://0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch \ 35 file://0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch \
36 file://CVE-2019-20907.patch \
36 file://CVE-2020-14422.patch \ 37 file://CVE-2020-14422.patch \
37 file://CVE-2020-26116.patch \ 38 file://CVE-2020-26116.patch \
38 file://CVE-2020-27619.patch \ 39 file://CVE-2020-27619.patch \