Bug 1400922 - OpenSSL 1.0.2j deadlock in FIPS mode
Summary: OpenSSL 1.0.2j deadlock in FIPS mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openssl
Version: 24
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-02 10:15 UTC by Christian Heimes
Modified: 2016-12-27 10:49 UTC (History)
4 users (show)

Fixed In Version: openssl-1.0.2j-3.fc25 openssl-1.0.2j-3.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-22 16:49:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Python 28854 0 None None None 2016-12-02 10:15:06 UTC

Description Christian Heimes 2016-12-02 10:15:07 UTC
Description of problem:
OpenSSL 1.0.2j deadlocks in FIPS mode. The deadlock occurs in multithreaded applicaiton with an OpenSSL thread lock callback, e.g. Python's ssl module. It's triggered by reseed of the RNG during SSL handshake

Version-Release number of selected component (if applicable):
OpenSSL 1.0.2j

How reproducible:
always

Steps to Reproduce:
1. touch /etc/system-fips
2. OPENSSL_FORCE_FIPS_MODE=1 pip download somepackage

Actual results:
program deadlocks

Expected results:
pip works

Additional info:
https://bugs.python.org/issue28854
https://github.com/openssl/openssl/issues/2019

The bug is caused by a double lock acquire of CRYPTO_LOCK_RAND lock. My Python upstream bug contains more detailed information and gdb stack dumps.

Comment 1 Tomas Mraz 2016-12-02 10:30:08 UTC
You can close the upstream report as the FIPS mode support we have in Fedora is different from upstream.

I'll investigate and fix it.

Comment 4 Tomas Mraz 2016-12-02 17:09:16 UTC
Can you please test openssl-1.0.2j-3.fc24 from koji? According to my tests it should be fixed. I've dropped the read lock in drbg_status which is unnecessary.

Comment 5 Christian Heimes 2016-12-02 17:29:28 UTC
openssl-1.0.2j-3.fc24 from http://koji.fedoraproject.org/koji/taskinfo?taskID=16708277 fixes the bug and no longer causes deadlocks. Thanks a lot for the fast fix!

Comment 6 Fedora Update System 2016-12-21 08:16:23 UTC
openssl-1.0.2j-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f5c57e05b6

Comment 7 Fedora Update System 2016-12-21 08:16:32 UTC
openssl-1.0.2j-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5ccc141b9c

Comment 8 Fedora Update System 2016-12-21 15:49:17 UTC
openssl-1.0.2j-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f5c57e05b6

Comment 9 Fedora Update System 2016-12-21 15:51:22 UTC
openssl-1.0.2j-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5ccc141b9c

Comment 10 Fedora Update System 2016-12-22 16:49:54 UTC
openssl-1.0.2j-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-12-27 10:49:03 UTC
openssl-1.0.2j-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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