{"description": "Crypto Policies provide a centralized control over crypto algorithms usage of many packages.\nOpenSSH is supported by system crypto policy, but the OpenSSH configuration may be\nset up incorrectly.\n\nTo check that Crypto Policies settings are configured correctly, ensure that\n<tt>/etc/crypto-policies/back-ends/opensshserver.config</tt> contains the following\ntext and is not commented out:\n<tt>-oMACS=<sub idref=\"sshd_approved_macs\" /></tt>", "rationale": "Overriding the system crypto policy makes the behavior of the OpenSSH\nserver violate expectations, and makes system configuration more\nfragmented.", "severity": "medium", "references": {"nist": ["AC-17(2)"], "srg": ["SRG-OS-000125-GPOS-00065", "SRG-OS-000250-GPOS-00093"]}, "control_references": {}, "components": [], "identifiers": {}, "ocil_clause": "Crypto Policy for OpenSSH Server is not configured correctly", "ocil": "To verify if the OpenSSH server uses defined MACs in the Crypto Policy, run:\n<pre>$ grep -Po '(-oMACs=\\S+)' /etc/crypto-policies/back-ends/opensshserver.config</pre>\nand verify that the line matches:\n<pre>-oMACS=<sub idref=\"sshd_approved_macs\" /></pre>", "oval_external_content": null, "fixtext": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [{"general": "The system needs to be rebooted for these changes to take effect."}, {"regulatory": "System Crypto Modules must be provided by a vendor that undergoes\nFIPS-140 certifications.\nFIPS-140 is applicable to all Federal agencies that use\ncryptographic-based security systems to protect sensitive information\nin computer and telecommunication systems (including voice systems) as\ndefined in Section 5131 of the Information Technology Management Reform\nAct of 1996, Public Law 104-106. This standard shall be used in\ndesigning and implementing cryptographic modules that Federal\ndepartments and agencies operate or are operated for them under\ncontract. See <b>\n<a xmlns='http://www.w3.org/1999/xhtml' href='https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf'>https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf</a></b>\nTo meet this, the system has to have cryptographic software provided by\na vendor that has undergone this certification. This means providing\ndocumentation, test results, design information, and independent third\nparty review by an accredited lab. While open source software is\ncapable of meeting this, it does not meet FIPS-140 unless the vendor\nsubmits to this process."}], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 SSH server must be configured to use only Message Authentication Codes (MACs) employing FIPS 140-2 validated cryptographic hash algorithms.", "vuldiscussion": "Without cryptographic integrity protections, information can be altered by unauthorized users without detection.\n\nRemote access (e.g., RDP) is access to DoD nonpublic information systems by an authorized user (or an information system) communicating through an external, non-organization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.\n\nCryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.\n\nUbuntu 22.04 incorporates system-wide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/opensshserver.config file.", "checktext": "Verify SSH server is configured to use only ciphers employing FIPS 140-3 approved algorithms with the following command:\n\n$ sudo grep -i macs /etc/crypto-policies/back-ends/opensshserver.config\nMACs hmac-sha2-512,hmac-sha2-256\n\n\nIf the MACs entries in the \"opensshserver.config\" file have any hashes other than \"hmac-sha2-512\" and \"hmac-sha2-256\", the order differs from the example above, they are missing, or commented out, this is a finding.", "fixtext": "Configure the Ubuntu 22.04 SSH client to use only MACs employing FIPS 140-3 approved algorithms by updating the \"/etc/crypto-policies/back-ends/openssh.config\" file with the following line:\n\nMACs hmac-sha2-512,hmac-sha2-256\n\nA reboot is required for the changes to take effect."}}, "platform": "system_with_kernel", "platforms": ["system_with_kernel"], "sce_metadata": {}, "inherited_platforms": [], "cpe_platform_names": ["system_with_kernel"], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Configure SSH Server to Use FIPS 140-2 Validated MACs: opensshserver.config", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/software/integrity/crypto/harden_sshd_macs_opensshserver_conf_crypto_policy/rule.yml", "template": null}