Update OVAL check and remediations for sshd_use_priv_separation. #6022
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
sshd_use_priv_separation
and remove template entry from itsrule.yml
as it is not needed.- Per V-72265sshd_use_priv_separation
should accept bothsandbox
andyes
values forUsePrivilegeSeparation
:Uncomment the "UsePrivilegeSeparation" keyword in "/etc/ssh/sshd_config" (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor) and set the value to "sandbox" or "yes":
So the OVAL check has to use the regex(sandbox|yes)
similar to what is done in sshd_disable_compressionThe variablevar_sshd_priv_separation
is still being used so remediations (including the new Ansible one) know how to remediate.And last but not least, the default value for this parameter isyes
so we have to switchmissing_parameter_pass
totrue
:UsePrivilegeSeparation Specifies whether sshd(8) separates privileges by creating an unprivileged child process to deal with incoming network traffic. After successful authentication, another process will be created that has the privilege of the authenticated user. The goal of privilege separation is to prevent privilege escalation by containing any corruption within the unprivileged processes. The default is ''yes''.
Reference: https://linux.die.net/man/5/sshd_configRationale: