Skip to content

accept TCPKeepAlive false in sshd-35 - #219

Open
jimmykarily wants to merge 1 commit into
dev-sec:masterfrom
jimmykarily:fix/sshd-35-tcpkeepalive-false
Open

jimmykarily wants to merge 1 commit into
dev-sec:masterfrom
jimmykarily:fix/sshd-35-tcpkeepalive-false

Conversation

@jimmykarily

Copy link
Copy Markdown

sshd-35 fails on OpenSSH 10.6 when the profile reads the output of sshd -T, although keepalives are disabled.

OpenSSH 10.6 extended TCPKeepAlive from a yes/no flag to a multi-valued option (yes, no, true, false, transport, all):

false is now a valid value, and sshd -T prints the disabled state as false rather than no. The value table lists false before no (servconf.c L1115-L1122), and sshd -T prints the first name that matches the value (L4145-L4154, L4177-L4178). In 10.5 the option was parsed as a plain yes/no flag.

This change makes sshd-35 accept both no and false. yes, true, transport and all still fail.

We hit this in Kairos, where the ssh hardening test runs this profile against sshd -T output on an OpenSSH 10.6 image: kairos-io/kairos#5571.

Tested with Cinc Auditor 7.1.7 running only sshd-35 against an sshd_config holding each value:

TCPKeepAlive master this branch
no passed passed
false failed passed
true failed failed
yes failed failed

Rubocop reports the same offenses on controls/sshd_spec.rb before and after the change.

This change was written with Claude Code and reviewed by me before submitting.

OpenSSH 10.6 made TCPKeepAlive multi-valued, and `sshd -T` now prints
the disabled state as "false" rather than "no". Accept both spellings
of the off state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
jimmykarily added a commit to kairos-io/kairos that referenced this pull request Oct 23, 2026
OpenSSH 10.6, which hadron v0.6.0 brought in, prints a disabled
TCPKeepAlive as "false" in sshd -T, and DevSec's sshd-35 only accepts
"no". Map that spelling back so the control keeps checking that
keepalives are off.

Won't be needed if this lands:
dev-sec/ssh-baseline#219

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
jimmykarily added a commit to kairos-io/kairos that referenced this pull request Oct 23, 2026
OpenSSH 10.6, which hadron v0.6.0 brought in, prints a disabled
TCPKeepAlive as "false" in sshd -T, and DevSec's sshd-35 only accepts
"no". Map that spelling back so the control keeps checking that
keepalives are off.

Won't be needed if this lands:
dev-sec/ssh-baseline#219

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant