Skip to content

Conversation

@rhmdnd
Copy link
Collaborator

@rhmdnd rhmdnd commented Nov 26, 2025

  • Add parameter for obsolete sshd configuration options
  • Only check ssh protocol if openssh < 7.0
  • Only check UsePrivilegeSeparation if openssh < 7.5

Certain SSH options are obsolete in that even if you set the value,
OpenSSH is going to ignore it. This is true for UsePrivilegeSeparation,
Protocol, and RhostsRSAAuthentication options.

This commit updates the SSH oval templates to add another template
variable called `obsolete_since_version` which gives us the flexibility
of saying "only run this rule if the system has a version of OpenSSH
less than version X". Otherwise, the check will short-circuit since
OpenSSH is defaulting to a more secure configuration.

This makes the rules more accurate, even if a user is setting something
that doesn't make sense at run time (e.g., Protocol 1).
OpenSSH made the `Protocol` option obsolete in version 7.0. Even if you
try to specify it, it's not going to use the version you set for
security reasons:

  Potentially-incompatible Changes
  --------------------------------

   * Support for the legacy SSH version 1 protocol is disabled by
     default at compile time.

See the release notes for version 7.0 for more details.

https://www.openssh.org/releasenotes.html
OpenSSH hardcoded the `UsePrivilegeSeparation` option to `sandbox` in
7.5:

  Potentially-incompatible changes
  ================================

  This release includes a number of changes that may affect existing
  configurations:

   * This release deprecates the sshd_config UsePrivilegeSeparation
     option, thereby making privilege separation mandatory. Privilege
     separation has been on by default for almost 15 years and
     sandboxing has been on by default for almost the last five.

https://www.openssh.org/releasenotes.html

Let's only check it if the ssh version is applicable.
<criteria comment="sshd installed and option is obsolete" operator="AND">
<extend_definition comment="sshd is required or requirement is unset"
definition_ref="sshd_required_or_unset" />
{{% if product == "sle12" %}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need other package manager support here?

@rhmdnd rhmdnd changed the title CMP 3978 CMP-3978: Incorporate SSH version into obsolete parameter rules Nov 26, 2025
@openshift-ci
Copy link

openshift-ci bot commented Nov 26, 2025

@rhmdnd: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 06e03c8 link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@evgenyz
Copy link
Member

evgenyz commented Nov 27, 2025

Why not just platform: package[openssh-server]<7.0?

@evgenyz
Copy link
Member

evgenyz commented Nov 27, 2025

See: linux_os/guide/services/ssh/ssh_server/sshd_disable_compression/rule.yml

@jan-cerny jan-cerny added the OpenShift OpenShift product related. label Nov 28, 2025
@jan-cerny jan-cerny added this to the 0.1.80 milestone Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OpenShift OpenShift product related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants