File CVE-2019-5010-null-defer-x509-cert-DOS.patch of Package python (Revision 381d91ea0ab10fc5235c75951d42564a)
Currently displaying revision 381d91ea0ab10fc5235c75951d42564a , Show latest
59
1
From 280917872027ee991416d2623fc16ff1eed48f50 Mon Sep 17 00:00:00 2001
2
From: Christian Heimes <christian@python.org>
3
Date: Tue, 15 Jan 2019 23:47:42 +0100
4
Subject: [PATCH] bpo-35746: Fix segfault in ssl's cert parser (GH-11569)
5
6
Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
7
distribution points with empty DP or URI correctly. A malicious or buggy
8
certificate can result into segfault.
9
10
Signed-off-by: Christian Heimes <christian@python.org>
11
12
https://bugs.python.org/issue35746
13
(cherry picked from commit a37f52436f9aa4b9292878b72f3ff1480e2606c3)
14
15
Co-authored-by: Christian Heimes <christian@python.org>
16
---
17
Lib/test/test_ssl.py | 21 ++++++++++
18
Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst | 3 +
19
2 files changed, 24 insertions(+)
20
create mode 100644 Lib/test/talos-2019-0758.pem
21
create mode 100644 Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
22
23
--- a/Lib/test/test_ssl.py
24
+++ b/Lib/test/test_ssl.py
25
26
}
27
)
28
29
+ def test_parse_cert_CVE_2019_5010(self):
30
+ p = ssl._ssl._test_decode_cert(TALOS_INVALID_CRLDP)
31
+ if support.verbose:
32
+ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
33
+ self.assertEqual(
34
+ p,
35
+ {
36
+ 'issuer': (
37
+ (('countryName', 'UK'),), (('commonName', 'cody-ca'),)),
38
+ 'notAfter': 'Jun 14 18:00:58 2028 GMT',
39
+ 'notBefore': 'Jun 18 18:00:58 2018 GMT',
40
+ 'serialNumber': '02',
41
+ 'subject': ((('countryName', 'UK'),),
42
+ (('commonName',
43
+ 'codenomicon-vm-2.test.lal.cisco.com'),)),
44
+ 'subjectAltName': (
45
+ ('DNS', 'codenomicon-vm-2.test.lal.cisco.com'),),
46
+ 'version': 3
47
+ }
48
+ )
49
+
50
def test_parse_cert_CVE_2013_4238(self):
51
p = ssl._ssl._test_decode_cert(NULLBYTECERT)
52
if support.verbose:
53
--- /dev/null
54
+++ b/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
55
56
+[CVE-2019-5010] Fix a NULL pointer deref in ssl module. The cert parser did
57
+not handle CRL distribution points with empty DP or URI correctly. A
58
+malicious or buggy certificate can result into segfault.
59