Red Hat Bugzilla – Bug 1303486
CVE-2015-8234 openstack-glance: MD5 used for cryptographic signature verification
Last modified: 2016-04-26 14:09:52 EDT
Daniel P. Berrange reports:
In the OpenStack Liberty release, the Glance project added support for image signature verification.
The verification code was added in the following git commit
Unfortunately the design of this signature verification method is flawed by design.
The generalized approach to creating signatures of content is to apply a hash to the content and then encrypt it in some manner. Consider that the signature is defined to use hash=sha256 and cipher=rsa we can describe the signature computation as
signature = rsa(sha256(content))
In the case of verifying a disk image, the content we care about verifying is the complete disk image file. Unfortunately, the glance specification chose *not* to compute the signature against the disk image file. Glance already had an MD5 checksum calculated for the disk image file, so they instead chose to compute the signature against the MD5 checksum instead. ie glance is running
signature = rsa(sha256(md5(disk-image-content)))
This degrades the security of the system to that of the weakest hash, which is obviously MD5 here.