Update to nss-softokn 3.14.3-19 breaks RPM
Environment
- Red Hat Enterprise Linux 6.6 and older
- nss-softokn-3.14.3-19.el6_6 rpm
Issue
-
bad signature errors when running rpm commands:
# rpm -qa error: rpmdbNextIterator: skipping h# 496 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 241 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 498 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 243 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 500 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD ... -
"Problem with the SSL CA cert" errors when download rpm files in yum:
# yum update -y [...] system-config-firewall-base-1.2.27-7.2.el6_6.noarch: failed to retrieve getPackage/system-config-firewall-base-1.2.27-7.2.el6_6.noarch.rpm from rhel-x86_64-server-6 error was [Errno 14] PYCURL ERROR 77 - "Problem with the SSL CA cert (path? access rights?)" -
rpm query commands don't show any packages installed, or only show gpg-pubkey packages as follows:
# rpm -q kernel error: rpmdbNextIterator: skipping h# 206 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD package kernel is not installed # rpm -qa 2>/dev/null gpg-pubkey-2fa658e0-45700c69 gpg-pubkey-fd431d51-4ae0493b #
Resolution
-
Create a
/usr/lib*/libfreeblpriv3.sosymlink-
[64-bit systems] Run the following command:
# ln -sv libfreebl3.so /usr/lib64/libfreeblpriv3.so -
[32-bit systems] Run the following command:
# ln -sv libfreebl3.so /usr/lib/libfreeblpriv3.so
-
-
Check the output of
rpm -qaor any otherrpm -qcommand-
If the output looks good, normal operations can resume
However, it is recommended to update thenss-softokn*packages (RHBA-2015:0110), e.g.:# yum update nss-softokn\* -
If output is not as expected:
-
Check the size of the
/var/lib/rpm/Packagesfile withls -lh-- if its size can be measured inKinstead ofM, it has been wiped by someone running anrpm --rebuilddbcommand (probably as advised byrpmoryum)-
The only way to recover from this is by replacing the
Packagesfile from a backup or an identical system -
After replacing
/var/lib/rpm/Packages, runrpm --rebuilddband then re-checkrpm -qaoutput -
Finally, check
rpm -Vaoutput to look for inconsistencies (which could be caused by restoring aPackagesfile from a system that was not actually identical
-
-
-
Root Cause
-
The
nss-softokn-3.14.3-19.el6_6package was built with an incorrect dependency onnss-softokn-freeblversion 3.14.3, instead of the correct 3.14.3-19 version -
If a system installs
nss-softokn-3.14.3-19.el6_6, it will not get the appropriately matched version ofnss-softokn-freeblas a dependency and rpm operations will cease to work until the symlink work-around is implemented-
This happened to many machines before Red Hat released an updated
nss-softoknpackage; however, it could only happen for machines which did selective updates (e.g.,yum update --security) -
Now that there are newer versions of
nss-softokn, this can only happen if a machine explicitly asks for thenss-softokn-3.14.3-19.el6_6package
-
-
A machine facing this nss-softokn problem is usually discovered to have an issue during
yumorrpmoperations and in some of those situations,rpmhelpfully suggests the following:Could not determine what version of Red Hat Linux you are running. If you get this error, try running rpm --rebuilddbThe above error is printed because
rpmcan't access the rpm database and decides it must be corrupt -- if that were actually the case, running that command would be a good idea; however in this situation the problem is simply thatrpmdoesn't have a library it needs for db operations, so running the above command will actually irreparably destroy the/var/lib/rpm/Packagesfile. As described in the Resolution, this can only be fixed be implementing the symlink, restoring thePackagesfile from a backup, and THEN doing anrpm --rebuilddb.
Diagnostic Steps
The following would likely be seen on a system facing this issue.
-
Check for
rpmdbNextIteratorsignature errors inrpm -qoutput-
Package listing reports errors as follows
# rpm -qa error: rpmdbNextIterator: skipping h# 257 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 2 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 259 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD error: rpmdbNextIterator: skipping h# 4 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD ... -
NOTE: these errors will be hidden if someone has already rebuilt the database with
rpm --rebuilddb
-
-
Check for normal rpm output
-
Re-check installed pacakges, hiding errors, and only a handful of packages are shown
# rpm -q kernel error: rpmdbNextIterator: skipping h# 103 Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD package kernel is not installed # rpm -qa 2>/dev/null gpg-pubkey-2fa658e0-45700c69 gpg-pubkey-fd431d51-4ae0493b
-
-
Check yum history for installs of nss-softokn
-
Last installed version is
nss-softokn-3.14.3-19.el6_6according toyum historyyum history packages-list nss-softokn -
NOTE:
yum historywill show no history and only error out withRPM error. ... try running rpm --rebuilddbif someone has already rebuilt the database -
Alternatively, the same might be visible in the yum log
grep nss-softokn /var/log/yum.log
-
-
Check for a
/usr/lib*/libfreeblpriv3.sosymlink-
The following command shows no
libfreeblpriv3.sofile:ls -l /usr/lib{,64}/*freeb*so
-
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.