RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1227505 - Fix exception handling when loading a private key
Summary: Fix exception handling when loading a private key
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pyOpenSSL
Version: 7.3
Hardware: All
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: Hubert Kario
URL:
Whiteboard:
Depends On:
Blocks: 1563605
TreeView+ depends on / blocked
 
Reported: 2015-06-02 20:08 UTC by Arie Bregman
Modified: 2018-10-30 09:48 UTC (History)
6 users (show)

Fixed In Version: pyOpenSSL-0.13.1-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:48:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test_parser_cert (1.89 KB, text/plain)
2015-06-02 20:08 UTC, Arie Bregman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3106 0 None None None 2018-10-30 09:48:47 UTC

Internal Links: 1283932

Description Arie Bregman 2015-06-02 20:08:24 UTC
Created attachment 1034008 [details]
test_parser_cert

Description of problem:
When running different tests in openstack components from upstream, I receive the following error: "bad password read" while expecting to different result

Apparently major changes introduced in 0.14 version, but the latest available pyOpenSSL rpm for rhel 7.x is 0.13.1-4

Version-Release number of selected component (if applicable):
0.13.1

How reproducible:
100%

Steps to Reproduce:
1. yum install pyOpenSSL on rhel 7.x machine
2. Download test_cert_parser attached to this bug
3. Run it: python test_cert_parser.py

Actual results:
OpenSSL.crypto.Error: [(None, 'UI_set_result', 'result too small'), ('PEM routines', 'PEM_def_callback', 'problems getting password'), ('PEM routines', 'PEM_READ_BIO_PRIVATEKEY', 'bad password read')]

Expected results:
Allow exceptions from passphrase callbacks to propagate up out of load_privatekey

Comment 2 Tomas Mraz 2015-06-03 08:48:44 UTC
The upstream completely changed the way the pyOpenSSL is written I do not think it is possible to rebase to 0.14 in RHEL-7.

Comment 3 Ihar Hrachyshka 2015-06-03 10:43:55 UTC
OK, if not a rebase, can we bisect a patch that fixes the test case and consider it for a backport?

Comment 4 Tomas Mraz 2015-06-03 11:38:36 UTC
Yes, fixing this via specific patch is definitely the way to go.

Comment 5 Arie Bregman 2015-08-25 20:37:54 UTC
I believe this will resolve the problem: https://github.com/pyca/pyopenssl/commit/56b2fb8abb3ea3d846bb336a7bc25fa2b0a9c0d9

From changelog: "* OpenSSL/crypto/crypto.c: Allow exceptions from passphrase callbacks to propagate up out of load_privatekey" 

Please let me know if any additional information needed.

Comment 6 Tomas Mraz 2015-08-26 07:44:37 UTC
This seems to be doable. You'll probably need to verify whether the backport fixes the problem yourself.

Comment 7 Arie Bregman 2015-08-27 10:31:19 UTC
No problem. Once this specific patch is in, I'll test it.

Comment 12 Arie Bregman 2017-11-28 18:54:41 UTC
Why is this being delayed for so many releases?

Comment 18 errata-xmlrpc 2018-10-30 09:48:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3106


Note You need to log in before you can comment on or make changes to this bug.