Improper use of Hash for MAC

Bug #1191466 reported by Donald Stufft
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Security Advisory
Invalid
Undecided
Unassigned
python-keystoneclient
Invalid
Undecided
Unassigned

Bug Description

I noticed that within python-keystone client the memcache_crypt middleware uses a simple sha1 as a MAC. This is bad to do because a general hash function is not designed to work as a MAC and thus are often vulnerable to a number of attacks. I suggest that instead the hmac library in the python stdlib is used.

The code in question is here:
    https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/middleware/memcache_crypt.py#L89-L106

Revision history for this message
Thierry Carrez (ttx) wrote :

Several improvements are being rolled up in a security advisory going out Wednesday. We'll see if this still applies after that one is disclosed.

Changed in ossa:
status: New → Incomplete
Revision history for this message
Thierry Carrez (ttx) wrote :

@Donald: could you check that the vulnerability still applies with the recent change in memcache hashing implementation ?

See https://review.openstack.org/#/c/33661 for details

Revision history for this message
Donald Stufft (dstufft) wrote :

It appears this issue, and the timing attack issue have both been resolved with that changeset.

Revision history for this message
Thierry Carrez (ttx) wrote :

Awesome. I'll close this bug and make it public in a short while.

Changed in python-keystoneclient:
status: New → Invalid
Thierry Carrez (ttx)
Changed in ossa:
status: Incomplete → Invalid
information type: Private Security → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.