1.6.5 Ensure system wide crypto policy disables chacha20-poly1305 for ssh

Information

ChaCha20-Poly1305 is an authenticated encryption with additional data (AEAD) algorithm, that combines the ChaCha20 stream cipher with the Poly1305 message authentication code. Its usage in IETF protocols is standardized in RFC 8439.

Note: If CVE-2023-48795 (the Terrapin SSH attack) has been addressed - for example, the system runs OpenSSH 9.6 or later, where strict key exchange is negotiated automatically - this recommendation is Not Applicable.

A vulnerability exists in ChaCha20-Poly1305 as referenced in CVE-2023-48795

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

- IF - CVE-2023-48795 (the Terrapin attack) has been addressed - for example, the system runs OpenSSH 9.6 or later - and this meets local site policy, this recommendation may be skipped.

Create or edit a file in /etc/crypto-policies/policies/modules/ ending in .pmod and add or modify one of the following lines:

cipher@SSH = -CHACHA20-POLY1305 # Disables the chacha20-poly1305 cipher for SSH

Example:

# printf '%s\n' "# This is a subpolicy to disable the chacha20-poly1305 ciphers" "# for the SSH protocol (libssh and OpenSSH)" "cipher@SSH = -CHACHA20-POLY1305" >> /etc/crypto-policies/policies/modules/NO-SSHCHACHA20.pmod

Run the following command to update the system-wide cryptographic policy

# 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 to make your cryptographic settings effective for already running services and applications:

# reboot

Impact:

Disabling the chacha20-poly1305 cipher for SSH may cause interoperability problems with clients or servers that only offer that cipher.

See Also

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

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: 438fd3fdd51a6d66adbfbf97e44719b0b6bb73be274f74bb72398e3fafcf6a76