Bug 1004427

Summary: python-dns: random number generator lacks fork protection
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: python-dnsAssignee: Jeffrey C. Ollie <jeff>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: aviso, jeff, louiz, pwouters
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-dns-1.15.0-1.fc24 python-dns-1.15.0-1.fc25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-11 20:51:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1004424    

Description Florian Weimer 2013-09-04 15:33:45 UTC
The random number generator in dns/entropy.py does not clear the pool after a fork.  Parent and child will obtain the same sequence of random numbers as a result.  Reading directly from /dev/urandom probably offers sufficient performance for this application.  (Unfortunately, Python's ssl module does not expose the RAND_bytes function.)

Comment 2 Jaroslav Reznik 2015-03-03 15:02:14 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 3 Fedora End Of Life 2016-07-19 10:20:58 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Florian Weimer 2016-07-21 14:10:58 UTC
It should be sufficient to switch to os.urandom as the random number generator.

Comment 5 Jan Kurik 2016-07-26 04:23:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 6 Avram Lubkin 2016-08-04 13:24:01 UTC
Upstream switched to using random.SystemRandom as the primary source for random numbers [1] and retained the existing entropy pool as a fallback. I'm not sure when a fallback would be needed since random is included in the standard library. In the fallback, a pid check was added so the pool is reseeded if the pid changes [2].

Will be included in Fedora after the next upstream release. Upstream recently merged Python 2 and Python 3 codebases, and has been working through bugs and cleaning up pylint errors.


[1] https://github.com/rthalley/dnspython/commit/52e95798b4fe36e393ca7a90678f12ff0233c96a

[2] https://github.com/rthalley/dnspython/commit/6a6d2af0dcc94867f6b518d453aeaa7c05fb3352

Comment 7 Fedora Update System 2016-10-09 12:29:22 UTC
python-dns-1.15.0-1.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-4998c59ba3

Comment 8 Fedora Update System 2016-10-09 13:50:45 UTC
python-dns-1.15.0-1.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-1857421df6

Comment 9 Fedora Update System 2016-11-11 20:51:23 UTC
python-dns-1.15.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-11-19 21:00:50 UTC
python-dns-1.15.0-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.