RPM signing and the GPG key chain: rpm -K for packages, rpm -V for files, the Oracle keys
What you will learn
Section titled “What you will learn”The three pieces of Oracle Linux’s RPM integrity story: package signature verification (rpm -K), installed-file verification (rpm -V), and key chain management (gpg-pubkey). Plus two pits found by measurement: the SIGPGP query trap and config files that skip content checks.
The key chain: two Oracle keys
Section titled “The key chain: two Oracle keys”rpm -q gpg-pubkey --qf "%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n"gpg-pubkey-8d8b756f-61e772ef Oracle Linux (release key 1) <[email protected]> public keygpg-pubkey-8b4efbe6-61e77439 Oracle Linux (backup key 1) <[email protected]> public key- The primary signing key is
8d8b756f, the backup8b4efbe6— the backup takes over during a rotation or a primary-key compromise; - The key file lives at
/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle; repository files reference it viagpgkey=file:///..., andgpgcheck=1is enforced at both/etc/dnf/dnf.confand per-repo level; - The official release keys and fingerprints: linux.oracle.com/security/gpg (the same trust domain as the ISO checksum signatures).
rpm -K: verify a package file’s signature (the authoritative entry point)
Section titled “rpm -K: verify a package file’s signature (the authoritative entry point)”dnf download hostnamerpm -K hostname-3.23-14.el10.aarch64.rpm# hostname-3.23-14.el10.aarch64.rpm: digests signatures OK
rpm -Kv hostname-3.23-14.el10.aarch64.rpm | head -4# Header V4 RSA/SHA256 Signature, key ID 8d8b756f: OK# Header SHA256 digest: OK# Header SHA1 digest: OKrpm -K verifies digests and signatures together, and the key ID matches the key chain directly. Any RPM obtained outside dnf (vendor bundles, intranet transfers, mirrors) should pass rpm -K before reaching production.
rpm -V: verify whether installed files were modified
Section titled “rpm -V: verify whether installed files were modified”printf "tampered" > /usr/bin/hostnamerpm -V hostname; echo rc=$?# S.5....T. /usr/bin/hostname# rc=1
dnf reinstall -y hostname # the official recovery pathrpm -V hostname && echo cleanReading the flags: S=size, 5=digest, T=mtime — S.5....T. means size, content and time all changed: the classic tamper signature.
The pit: config files skip content verification
Section titled “The pit: config files skip content verification”Measured: append one line to /etc/passwd (owned by the setup package) and rpm -V setup stays completely silent — the setup package disables content verification for high-churn config files like /etc/passwd and /etc/motd to avoid alarming on every machine. Compliance audits that must cover these files need OpenSCAP/aide rather than rpm -V (see the OpenSCAP compliance page).
Relation to other pages
Section titled “Relation to other pages”- ISO verification (the other trust chain: GPG-signed checksum archive) is covered on the ISO download and verification page;
- ELSA advisories (the trust origin of security updates) are covered on the ELSA advisory page;
- Key rotation/expiry handling:
rpm -e gpg-pubkey-<old>+rpm --import <new>, with official announcements giving advance notice.
Evidence and limits on this page
Section titled “Evidence and limits on this page”- Measured: the two keys in the chain, repo references, rpm -K signature verification, the rpm -V tamper test and recovery, the config exception, and the SIGPGP query trap (E2 container, aarch64 variant);
- Not measured: a live key rotation (no expired key available to operate on);
- Sources: the Oracle GPG key page, the —K/-V sections of
rpm(8).