1.6.2 Ensure system wide crypto policy disables sha1 hash and signature support

Information

SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function that produces a 160-bit hash value, used both for hashing and as the basis of digital signature algorithms. The system-wide crypto policy sets which hash and signature algorithms the operating system's cryptographic backends will use and accept, and controls SHA-1 in three places: the global hash and sign algorithm sets, per-backend scope overrides ( hash@<scope> / sign@<scope> ), and the sha1_in_certs setting that governs SHA-1 signatures in X.509 certificates. The policy also enables SHA-1 by default within a bounded set of legacy-interop scopes, such as package-signature verification, so existing artifacts can still be validated.

The SHA-1 hash function has an inherently weak design, and advancing cryptanalysis has made it vulnerable to attacks. The most significant danger for a hash algorithm is when a "collision" which happens when two different pieces of data produce the same hash value occurs. This hashing algorithm has been considered weak since 2005.

Note: The use of SHA-1 with hash-based message authentication codes (HMAC) do not rely on the collision resistance of the corresponding hash function, and therefore the recent attacks on SHA-1 have a significantly lower impact on the use of SHA-1 for HMAC. Because of this, the recommendation does not disable the hmac-sha1 MAC.

Solution

- Run the following command to set the system-wide cryptographic policy so it includes the operating system's provided NO-SHA1 subpolicy, listed together with every other subpolicy that should remain active (a subpolicy that is not listed is not applied):

# update-crypto-policies --set <CRYPTO_POLICY>:<CRYPTO_SUBPOLICY1>:<CRYPTO_SUBPOLICY2>:<CRYPTO_SUBPOLICY3>

Example:

# update-crypto-policies --set DEFAULT:NO-SHA1:NO-WEAKMAC:NO-SSHCBC:NO-SSHCHACHA20

- Run the following command to reboot the system so all services load the updated policy:

# reboot

Note: NO-SHA1 disables SHA-1 in the global directives only; the operating system's legacy-interop scopes (such as RPM ) are left at their defaults. If the audit returned SHA-1 enabled in a specific non-exempt backend scope, create an additional subpolicy module (a .pmod file with an upper-case name) containing hash@<scope> = -SHA1 and include it in the --set list above.

Impact:

Disabling SHA-1 hash and signature support may cause interoperability problems with older peers, legacy certificates, or applications that still rely on SHA-1 signatures. HMAC-SHA1 is intentionally left enabled (see the description) to preserve compatibility where the collision weakness does not apply.

See Also

https://workbench.cisecurity.org/benchmarks/27891

Item Details

Category: ACCESS CONTROL, IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|AC-17(2), 800-53|IA-5, 800-53|IA-5(1), 800-53|SC-8, 800-53|SC-8(1), CSCv7|14.4

Plugin: Unix

Control ID: 0db1657a1f432c865c05ab20d056fdce1a465539d5c6fd9880d9658bcda46726