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 976661 - python-webob fails to generate http body md5 hash in fips mode
Summary: python-webob fails to generate http body md5 hash in fips mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-webob
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Charalampos Stratakis
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On:
Blocks: 839624 1380359 1393868
TreeView+ depends on / blocked
 
Reported: 2013-06-21 06:48 UTC by Bohuslav "Slavek" Kabrda
Modified: 2017-08-01 17:58 UTC (History)
5 users (show)

Fixed In Version: python-webob-1.2.3-7.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-08-01 17:58:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1890 0 normal SHIPPED_LIVE python-webob bug fix update 2017-08-01 18:04:32 UTC

Description Bohuslav "Slavek" Kabrda 2013-06-21 06:48:59 UTC
Since MD5 is used for generating hash of message body, python-webob fails in fips mode when trying to do so. IMHO this could be modified by using "usedforsecurity=False" parameter, since as the standard states, "MIC is good for detecting accidental modification of the entity-body in transit, but is not proof against malicious attacks" [1].

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.15

Comment 2 Miloslav Trmač 2013-06-21 19:24:01 UTC
(In reply to Bohuslav "Slavek" Kabrda from comment #0)
> Since MD5 is used for generating hash of message body, python-webob fails in
> fips mode when trying to do so. IMHO this could be modified by using
> "usedforsecurity=False" parameter, since as the standard states, "MIC is
> good for detecting accidental modification of the entity-body in transit,
> but is not proof against malicious attacks" [1].

Yes.

Comment 5 Charalampos Stratakis 2017-01-24 13:24:12 UTC
So in order to reproduce this issue, a rhel 7 machine with fips mode enabled and python-webob and python-nose installed, is required.

From python-webob sources copy the test_response.py file somewhere to the testing machine (as this file is not installed with the package) and invoke the tests with: nosetests test_response.py

3 tests will fail while in fips mode.

======================================================================
ERROR: test_response.test_response_copy_content_md5
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/harris/Desktop/test_response.py", line 146, in test_response_copy_content_md5
    res.md5_etag(set_content_md5=True)
  File "/usr/lib/python2.7/site-packages/webob/response.py", line 1000, in md5_etag
    md5_digest = md5(body).digest()
ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips

======================================================================
ERROR: test_response.test_md5_etag
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/harris/Desktop/test_response.py", line 270, in test_md5_etag
    res.md5_etag()
  File "/usr/lib/python2.7/site-packages/webob/response.py", line 1000, in md5_etag
    md5_digest = md5(body).digest()
ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips

======================================================================
ERROR: test_response.test_md5_etag_set_content_md5
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/harris/Desktop/test_response.py", line 280, in test_md5_etag_set_content_md5
    res.md5_etag(body, set_content_md5=True)
  File "/usr/lib/python2.7/site-packages/webob/response.py", line 1000, in md5_etag
    md5_digest = md5(body).digest()
ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips

This can be fixed at the response.py file of webob, by adding the keyword 'usedforsecurity=False' when generating an etag for the response object using an MD5 hash of the body, so the line 'md5_digest = md5(body).digest()' will need to be changed to 'md5_digest = md5(body, usedforsecurity=False).digest()' at the 'def md5_etag' function.

Comment 9 errata-xmlrpc 2017-08-01 17:58:28 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-2017:1890


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