Repository navigation
Closed
Labels
3.10 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifebuildThe build process and cross-buildThe build process and cross-buildtestsTests in the Lib/test dirTests in the Lib/test dirtopic-SSL
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/tiran'
closed_at = <Date 2021-04-12.10:26:28.003>
created_at = <Date 2020-08-16.04:10:49.115>
labels = ['expert-SSL', '3.8', '3.9', '3.10', 'build', 'tests']
title = 'test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch'
updated_at = <Date 2021-05-03.20:26:25.809>
user = 'https://bugs.python.org/bugsrep'bugs.python.org fields:
activity = <Date 2021-05-03.20:26:25.809>
actor = 'ned.deily'
assignee = 'christian.heimes'
closed = True
closed_date = <Date 2021-04-12.10:26:28.003>
closer = 'christian.heimes'
components = ['Build', 'Tests', 'SSL']
creation = <Date 2020-08-16.04:10:49.115>
creator = 'bugsrep'
dependencies = []
files = ['49450']
hgrepos = []
issue_num = 41561
keywords = ['patch']
message_count = 54.0
messages = ['375502', '376501', '376521', '376669', '376688', '376690', '376705', '376710', '376768', '376817', '377048', '377085', '377112', '377115', '377116', '377117', '377145', '377148', '377155', '377172', '377174', '377179', '377221', '377224', '377225', '377228', '377232', '377240', '377252', '377297', '377403', '377415', '377516', '377517', '378089', '378103', '378440', '378510', '378662', '381328', '381331', '381333', '381514', '388020', '389003', '389020', '389042', '389044', '389045', '390832', '390834', '390835', '392838', '392839']
nosy_count = 8.0
nosy_names = ['skip.montanaro', 'taleinat', 'christian.heimes', 'ned.deily', 'Vladyslav.Bondar', 'miss-islington', 'xtreak', 'bugsrep']
pr_nums = ['22308', '23363', '23364', '24915', '24925', '24926', '24928', '25355', '25358', '25359', '25858']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue41561'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']Metadata
Metadata
Assignees
Labels
3.10 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifebuildThe build process and cross-buildThe build process and cross-buildtestsTests in the Lib/test dirTests in the Lib/test dirtopic-SSL
Activity
bugsrep commentedon Aug 16, 2020
FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)
----------------------------------------------------------------------
smontanaro commentedon Sep 7, 2020
Has any progress been made on the Ubuntu 20.04 test_ssl failures? Is there any consensus about it being a Python or Ubuntu problem?
smontanaro commentedon Sep 7, 2020
This skips the breaking tests (but doesn't actually fix anything).
63 remaining items
tiran commentedon Mar 3, 2021
Downstream has asked me to file a separate bug for internal error during handshake. The problem is tracked at https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1917625 .
tiran commentedon Mar 18, 2021
I have discussed the problem with downstream engineers on the two issues
The gist of the issue is: Canonical has taken a different approach than Debian and other distros to set minimum TLS version.
Most distros use an openssl.cnf file to set "MinProtocol = TLSv1.2". The config file approach allows application to override the setting with SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION) and to detect the current minimum version with SSL_CTX_get_min_proto_version(ctx) == TLS1_VERSION.
Ubuntu doesn't set "MinProtocol = TLSv1.2". Instead the distro has patched OpenSSL source code and modified the meaning of security level "2". Security level is a new OpenSSL API to set various security related settings. On Ubuntu SECLEVEL=2 prevents TLS 1.0 and 1.1 connection. Further SSL_CTX_get_min_proto_version(ctx) returns 0 (dummy value for minimum supported version). SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION) does not fail although TLS 1.0 is prohibited.
https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html
Level 2: SSL version 3 is also not allowed
Level 4: TLS versions below 1.2 are not permitted.
https://manpages.ubuntu.com/manpages/focal/man3/SSL_CTX_set_security_level.3ssl.html
Level 2: On Ubuntu, TLS versions below 1.2 are not permitted
The combination of "Ubuntu changed the meaning of security level policy" and "SSL_CTX_get_min_proto_version(ctx) does not report minimum version" breaks our tests.
OpenSSL doesn't provide an easy way to check if a SSL_CTX has a sane configuration. There is a way to check if a security policy allows a TLS version. I'm not sure if we should include the check in CPython and where to best put the check:
tiran commentedon Mar 18, 2021
Dimitri John Ledkov from Canonical has opened a feature request for a context validation feature on the OpenSSL issue tracker, openssl/openssl#14607
miss-islington commentedon Mar 18, 2021
New changeset f6c6b58 by Christian Heimes in branch 'master':
bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915)
f6c6b58
miss-islington commentedon Mar 18, 2021
New changeset 3365e68 by Miss Islington (bot) in branch '3.9':
bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915)
3365e68
miss-islington commentedon Mar 18, 2021
New changeset 5051167 by Miss Islington (bot) in branch '3.8':
bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915)
5051167
tiran commentedon Apr 12, 2021
New changeset 3447750 by Christian Heimes in branch 'master':
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
3447750
miss-islington commentedon Apr 12, 2021
New changeset 04425a9 by Miss Islington (bot) in branch '3.8':
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
04425a9
miss-islington commentedon Apr 12, 2021
New changeset 0983e01 by Miss Islington (bot) in branch '3.9':
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
0983e01
ned-deily commentedon May 3, 2021
New changeset 64be96a by Christian Heimes in branch '3.7':
[3.7] bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915) (GH-24928)
64be96a
ned-deily commentedon May 3, 2021
New changeset 512742d by Miss Islington (bot) in branch '3.7':
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355) (GH-25858)
512742d