Change RPM to use Sequoia based OpenPGP parser instead of it's own, flawed and limited implementation.
- Name: Panu Matilainen
- Email: email@example.com
- Targeted release: Fedora Linux 38
- Last updated: 2023-02-28
- devel thread
- FESCo issue: #2881
- Tracker bug: #2130122
- Release notes tracker: #892
For the last 20 years or so, RPM has used a home-grown OpenPGP parser for dealing with keys and signatures. That parser is rather infamous for its limitations and flaws, and especially in recent years has proven a significant burden to RPM development. In order to improve security and free developer resources for dealing with RPM's "core business" instead, RPM upstream is in the process of deprecating the internal parser in favor of Sequoia PGP based solution written in Rust. At this point the change is mostly invisible in normal daily use.
Benefit to Fedora
The main, direct benefit to Fedora is improved security and standards-compliance (RFC-4880) in one of the corner-stones of the whole distribution. Longer term, we can expect better error messages and other functional improvements regarding key and signature handling.
- Proposal owners:
- Help package/review rpm-sequoia
- Build rpm with --with-crypto=sequoia
- Watch out for the unexpected
- Other developers:
- Release engineering: #11077
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with Objectives: N/A
Within Fedora package set, this has no impact as everything is already using sufficiently strong crypto. Third party repositories / packages could be signed with insecure crypto, and those may require working around with --nosignature. However this incidentally overlaps with https://fedoraproject.org/wiki/Changes/StrongCryptoSettings3Forewarning2 which has effectively the same effect on rpm.
How To Test
In general, normal rpm/dnf use provides sufficient test coverage. For more advanced testers: try signing and verifying with different keys and their subkeys, using different algorithms etc.
For normal usage, the change is quite invisible. The notable exceptions are
- Some old, insecure (MD5/SHA1 based) signatures are rejected (this is in line with the stronger crypto settings proposed elsewhere for F38)
- Key import may accept some previously rejected keys, in part due to limitations of old parser etc but in particular, the old implementation verifies self-signatures at import time whereas Sequoia verifies them at time of use.
- Key import may reject some previously accepted keys due to better validation.
The change introduces one new direct dependency: rpm-sequoia. The rpm-sequoia package also takes over other crypto besides OpenPGP, currently Sequoia uses nettle as its low-level crypto provider, but work is underway to support openssl in Sequoia, and the plan is to have Sequoia in Fedora use that once it becomes available. This plan has support of the crypto team.
- Contingency mechanism: Revert back to the internal PGP parser
- Contingency deadline: Beta release
- Blocks release? No
There's not much in the way of documentation as there's not much to document, except for the deprecation of the internal parser: https://github.com/rpm-software-management/rpm/issues/1935
rpm-sequoia build instructions can be found in https://github.com/rpm-software-management/rpm-sequoia/