1.6.4 Ensure system wide crypto policy disables cbc for ssh

Information

Cipher Block Chaining (CBC) is an algorithm that uses a block cipher.

A vulnerability exists in SSH messages that employ CBC mode that may allow an attacker to recover plaintext from a block of ciphertext. If exploited, this attack can potentially allow an attacker to recover up to 32 bits of plaintext from an arbitrary block of ciphertext from a connection secured using the SSH protocol.

Solution

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 = -*-CBC # Disables the CBC cipher for SSH

Example:

# printf '%s\n' "# This is a subpolicy to disable all CBC mode ciphers" "# for the SSH protocol (libssh and OpenSSH)" "cipher@SSH = -*-CBC" >> /etc/crypto-policies/policies/modules/NO-SSHCBC.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

Run the following command to reboot the system to make your cryptographic settings effective for already running services and applications:

# reboot

Impact:

CBC ciphers might be the only common ciphers when connecting to older SSH clients and servers

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: a8966cce8d42c749613c89bd8b0011f921309499ae86688e3b9d09ad056ba63f