Bug 479990 - Enable SHA2 file digests in RPMs
Enable SHA2 file digests in RPMs
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: distribution (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Bill Nottingham
:
Depends On: 479869 485826
Blocks: fedora-sha2 479995
  Show dependency treegraph
 
Reported: 2009-01-14 09:34 EST by Miloslav Trmač
Modified: 2014-03-16 23:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 479995 (view as bug list)
Environment:
Last Closed: 2009-03-17 13:54:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miloslav Trmač 2009-01-14 09:34:27 EST
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.

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