summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch29
-rw-r--r--meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch31
-rw-r--r--meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch2
-rw-r--r--meta/recipes-devtools/python/python3/CVE-2020-14422.patch79
4 files changed, 140 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
new file mode 100644
index 0000000000..acf8e1e9b5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
@@ -0,0 +1,29 @@
1From 85e8f86ad2b7dec0848cd55b8e810a5e2722b20a Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Wed, 4 Mar 2020 00:06:42 +0000
4Subject: [PATCH] Don't search system for headers/libraries
5
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
8---
9 setup.py | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/setup.py b/setup.py
13index 9da1b3a..59782c0 100644
14--- a/setup.py
15+++ b/setup.py
16@@ -674,8 +674,8 @@ class PyBuildExt(build_ext):
17 add_dir_to_list(self.compiler.include_dirs,
18 sysconfig.get_config_var("INCLUDEDIR"))
19
20- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
21- system_include_dirs = ['/usr/include']
22+ system_lib_dirs = []
23+ system_include_dirs = []
24 # lib_dirs and inc_dirs are used to search for files;
25 # if a file is found in one of those directories, it can
26 # be assumed that no additional -I,-L directives are needed.
27--
282.24.1
29
diff --git a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
new file mode 100644
index 0000000000..c15295c034
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
@@ -0,0 +1,31 @@
1From e3b59cb9658e1d3efa3535840939a0fa92a70a5a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 7 Oct 2019 13:22:14 +0200
4Subject: [PATCH] setup.py: do not report missing dependencies for disabled
5 modules
6
7Reporting those missing dependencies is misleading as the modules would not
8have been built anyway. This particularly matters in oe-core's automated
9build completeness checker which relies on the report.
10
11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 setup.py | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/setup.py b/setup.py
18index 4b53668..0097643 100644
19--- a/setup.py
20+++ b/setup.py
21@@ -365,6 +365,10 @@ class PyBuildExt(build_ext):
22 print("%-*s %-*s %-*s" % (longest, e, longest, f,
23 longest, g))
24
25+ # There is no need to report missing module dependencies,
26+ # if the modules have been disabled in the first place.
27+ missing = list(set(missing) - set(sysconf_dis))
28+
29 if missing:
30 print()
31 print("Python build finished successfully!")
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index 0bafec73c0..d49604ba4d 100644
--- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,4 +1,4 @@
1From 6229502e5ae6cbb22240594f002638e9ef78f831 Mon Sep 17 00:00:00 2001 1From a274ba778838824efcacaba57c415b7262f779ec Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 14 May 2013 15:00:26 -0700 3Date: Tue, 14 May 2013 15:00:26 -0700
4Subject: [PATCH] python3: Add target and native recipes 4Subject: [PATCH] python3: Add target and native recipes
diff --git a/meta/recipes-devtools/python/python3/CVE-2020-14422.patch b/meta/recipes-devtools/python/python3/CVE-2020-14422.patch
new file mode 100644
index 0000000000..31ad82d7c5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/CVE-2020-14422.patch
@@ -0,0 +1,79 @@
1From b98e7790c77a4378ec4b1c71b84138cb930b69b7 Mon Sep 17 00:00:00 2001
2From: Tapas Kundu <39723251+tapakund@users.noreply.github.com>
3Date: Wed, 1 Jul 2020 00:50:21 +0530
4Subject: [PATCH] [3.7] bpo-41004: Resolve hash collisions for IPv4Interface
5 and IPv6Interface (GH-21033) (GH-21231)
6
7CVE-2020-14422
8The __hash__() methods of classes IPv4Interface and IPv6Interface had issue
9of generating constant hash values of 32 and 128 respectively causing hash collisions.
10The fix uses the hash() function to generate hash values for the objects
11instead of XOR operation
12(cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28)
13
14Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
15
16Signed-off-by: Tapas Kundu <tkundu@vmware.com>
17
18Upstream-Status: Backport [https://github.com/python/cpython/commit/b98e7790c77a4378ec4b1c71b84138cb930b69b7]
19CVE: CVE-2020-14422
20Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
21
22---
23 Lib/ipaddress.py | 4 ++--
24 Lib/test/test_ipaddress.py | 11 +++++++++++
25 .../Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst | 1 +
26 3 files changed, 14 insertions(+), 2 deletions(-)
27 create mode 100644 Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst
28
29diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py
30index 80249288d73ab..54882934c3dc1 100644
31--- a/Lib/ipaddress.py
32+++ b/Lib/ipaddress.py
33@@ -1442,7 +1442,7 @@ def __lt__(self, other):
34 return False
35
36 def __hash__(self):
37- return self._ip ^ self._prefixlen ^ int(self.network.network_address)
38+ return hash((self._ip, self._prefixlen, int(self.network.network_address)))
39
40 __reduce__ = _IPAddressBase.__reduce__
41
42@@ -2088,7 +2088,7 @@ def __lt__(self, other):
43 return False
44
45 def __hash__(self):
46- return self._ip ^ self._prefixlen ^ int(self.network.network_address)
47+ return hash((self._ip, self._prefixlen, int(self.network.network_address)))
48
49 __reduce__ = _IPAddressBase.__reduce__
50
51diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py
52index 455b893fb126f..1fb6a929dc2d9 100644
53--- a/Lib/test/test_ipaddress.py
54+++ b/Lib/test/test_ipaddress.py
55@@ -2091,6 +2091,17 @@ def testsixtofour(self):
56 sixtofouraddr.sixtofour)
57 self.assertFalse(bad_addr.sixtofour)
58
59+ # issue41004 Hash collisions in IPv4Interface and IPv6Interface
60+ def testV4HashIsNotConstant(self):
61+ ipv4_address1 = ipaddress.IPv4Interface("1.2.3.4")
62+ ipv4_address2 = ipaddress.IPv4Interface("2.3.4.5")
63+ self.assertNotEqual(ipv4_address1.__hash__(), ipv4_address2.__hash__())
64+
65+ # issue41004 Hash collisions in IPv4Interface and IPv6Interface
66+ def testV6HashIsNotConstant(self):
67+ ipv6_address1 = ipaddress.IPv6Interface("2001:658:22a:cafe:200:0:0:1")
68+ ipv6_address2 = ipaddress.IPv6Interface("2001:658:22a:cafe:200:0:0:2")
69+ self.assertNotEqual(ipv6_address1.__hash__(), ipv6_address2.__hash__())
70
71 if __name__ == '__main__':
72 unittest.main()
73diff --git a/Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst b/Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst
74new file mode 100644
75index 0000000000000..f5a9db52fff52
76--- /dev/null
77+++ b/Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst
78@@ -0,0 +1 @@
79+CVE-2020-14422: The __hash__() methods of ipaddress.IPv4Interface and ipaddress.IPv6Interface incorrectly generated constant hash values of 32 and 128 respectively. This resulted in always causing hash collisions. The fix uses hash() to generate hash values for the tuple of (address, mask length, network address).