RPM

Enable SHA2 file digests in RPMs

Bug #638601 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
Fedora
Fix Released
Medium

Bug Description

tracker

Revision history for this message
In , Miloslav (miloslav-redhat-bugs) wrote :

RPMs in Fedora currently uses MD5 to verify contents of installed files during package installation and (rpm -V). MD5 has significant weaknesses, and should be replaced by a stronger hash. See https://fedoraproject.org/wiki/Features/StrongerHashes for more rationale and information.

To enable SHA-256, define the following macros in the build environment:
_source_filedigest_algorithm 8
_binary_filedigest_algorithm 8

This depends on #479869 - RPM currently does not handle updates that change the used digest algorithm correctly.

Another dependency is koji#119: koji currently cannot handle RPMs that use digest algorithms with larger output than MD5.

The configuration replaces the RPMTAG_FILEDIGESTS==RPMTAG_FILEMD5S contents by a non-MD5 hash, which can break tools that work with the rpm file format directly (whether using librpm or not). Linux Standard Base specifies that the tag contains MD5 hashes, but the Fedora package format do not have to conform to LSB for the same reason package contents do not have to conform to LSB: we only need to be able to handle LSB packages correctly.

To ensure full system integrity protection, all packages have to be rebuilt; I'd personally be happy enough if the larger hashes were supported in F11 and newly built packages used them, hoping for a full rebuild for F12.

Jeff Johnson (n3npq)
tags: added: fedora filedigests
Changed in rpm:
milestone: none → 4.6.1
Changed in fedora:
importance: Unknown → Medium
status: Unknown → Fix Released
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.