Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ This bug was initially created as a clone of Bug #479990 +++
RPMs in RHEL currently use 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 (and updating brew to match): brew 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 RHEL package format does 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 after changing the build configuration (or perhaps the other way, the build configuration should be changed before the mass rebuild).