Information
Encrypt-then-MAC (EtM) - The ciphertext is generated by encrypting the plaintext and then appending a MAC of the encrypted plaintext
There is an effective attack against SSH's use of Cypher-Block-Chaining (CBC) with Encrypt-then-MAC as referenced in CVE-2023-48795
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 the following line:
etm@SSH = DISABLE_ETM # This disables EtM for openSSH and libssh
Example:
# printf '%s\n' "# This is a subpolicy to disable Encrypt then MAC" "# for the SSH protocol (libssh and OpenSSH)" "etm@SSH = DISABLE_ETM" >> /etc/crypto-policies/policies/modules/NO-SSHETM.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:NO-SSHETM
Run the following command to reboot the system to make your cryptographic settings effective for already running services and applications:
# reboot
Impact:
Disabling Encrypt-then-MAC (EtM) for SSH may cause interoperability problems with clients or servers that only offer EtM MAC modes.