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 969370 - Coverage fails to generate html report in fips mode
Summary: Coverage fails to generate html report in fips mode
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-coverage
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 839624
TreeView+ depends on / blocked
 
Reported: 2013-05-31 10:03 UTC by Bohuslav "Slavek" Kabrda
Modified: 2015-02-05 11:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-05 11:33:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bohuslav "Slavek" Kabrda 2013-05-31 10:03:40 UTC
Coverage implements a "Hasher" class in coverage/misc.py [1] that uses MD5 to create hash of an arbitrary structure. The only place where Hasher is instantiated is coverage/html.py [2] that hashes settings of the html generator and compares them with other settings.
So from one point of view, this seems to be a good candidate to use usedforsecurity=False. But that would need to be done inside the Hasher class and if a developer used this in some other library, that would use Hasher for security purposes, it would be a problem.
I guess the best thing to do here is to leave html report generation from coverage just fail in fips.


[1] https://bitbucket.org/ned/coveragepy/src/111428bde2cd47e368843aa3f5af428e22cd804d/coverage/misc.py?at=default#cl-106
[2] https://bitbucket.org/ned/coveragepy/src/111428bde2cd47e368843aa3f5af428e22cd804d/coverage/html.py?at=default#cl-78

Comment 2 Miloslav Trmač 2013-05-31 18:51:54 UTC
Or perhaps drop the Hasher completely, and do an explicit comparison of the two objects:

def compare(a, b):
  if type(a) != type(b): return False
  if isinstance(a, (string_class, int)): return a == b
  if isinstance(a, float): return whatever_is_the_right_way_to_compare_floats_including_NaN(a, b)
  # etc.

This has the additional advantage of being always correct, whereas hashes can in principle have collisions.

Comment 4 Bohuslav "Slavek" Kabrda 2015-02-05 11:33:10 UTC
Since I'm not assuming this package is actually being used by someone in fips mode, I think it's not worth the effort to fix. Therefore I'm closing as wontfix - if someone hits this issue, please feel free to reopen.


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