SV-257823r1155641_rule
V-257823
SRG-OS-000480-GPOS-00227
RHEL-09-214030
CAT II
10
Configure RHEL 9 so that the cryptographic hashes of system files match vendor values.
Given output from the check command, identify the package that provides the output and reinstall it. The following trimmed example output shows a package that has failed verification, been identified, and been reinstalled:
$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"'
S.5....T. /usr/bin/znew
$ sudo dnf provides /usr/bin/znew
[...]
gzip-1.10-8.el9.x86_64 : The GNU data compression program
[...]
$ sudo dnf -y reinstall gzip
[...]
$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"'
[no output]
Verify RHEL 9 is configured so that the cryptographic hashes of system files match vendor values.
List files on the system that have file hashes different from what is expected by the RPM database with the following command:
$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"'
If there is output, this is a finding.
V-257823
False
RHEL-09-214030
Verify RHEL 9 is configured so that the cryptographic hashes of system files match vendor values.
List files on the system that have file hashes different from what is expected by the RPM database with the following command:
$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"'
If there is output, this is a finding.
M
5551