Repository navigation
[14.5-stable] debug: let sshd offer only publickey login - #6879
eriknordmark merged 1 commit into
Conversation
49e3ee2 to
c3346a1
Compare
|
Go Tests fails here because the bpftrace-compiler tests run past their 1h timeout on the self-hosted runners. #6936 raised the timeout to 5h on 14.5-stable. Re-running doesn't help, because the job tests the PR head. Please rebase onto the current 14.5-stable. |
sshd in the debug container ran with Alpine's defaults, which offer password and keyboard-interactive authentication to anyone who connects. No account has a password, so none of those logins could succeed, but that can only be established by inspecting the image, not from the network. Turning both methods off leaves what is allowed unchanged and makes it observable: the evetest port scans now require that SSH offers publickey only. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 97f726a) Backport note: 14.5-stable builds sshd from source and ships its own pkg/debug/ssh/sshd_config without a sshd_config.d include, so the two directives are appended to that file instead of a drop-in. The eve-debug hash bump in pkg/installer/Dockerfile is left to the usual hash update.
c3346a1 to
61130bb
Compare
Done |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 14.5-stable #6879 +/- ##
===============================================
+ Coverage 24.97% 25.60% +0.62%
===============================================
Files 8 14 +6
Lines 1185 2882 +1697
===============================================
+ Hits 296 738 +442
- Misses 820 1992 +1172
- Partials 69 152 +83 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
evetest skip decision for this PR: This PR only appends
These suites exercise app/network lifecycle, controller communication, datastores, hardware, pciback error reporting, AppArmor/vTPM/cert security, storage, telemetry, and upgrade behavior. They only use SSH incidentally as a transport to reach the device shell and never exercise which SSH auth methods are offered. Kept: An engineer can comment |
Build the verified upstream release to include the musl password authentication bypass fix before Alpine 3.22 packages it. Preserve publickey-only access and register the source-built version in the SBOM. Add an isolated regression that reproduces the bypass on 10.6p1 and verifies rejection, publickey login and SFTP on 10.6p2. Signed-off-by: Shahriyar Jalayeri <shahriyar@posteo.de> (cherry picked from commit 8553375) Backport notes: Adapt to the existing source build: bump the verified release, retain GPG verification, remove the utmpx patch already included upstream, install sshd-auth, align helper paths with the shipped SFTP configuration, and add the unchanged master SBOM helper and regression test. Refresh the installer debug image hash. Publickey-only authentication is already present via PR lf-edge#6879.
Description
Backport of #6665 to
14.5-stable.Only the
debug: let sshd offer only publickey logincommit is backported (cherry-picked with-xfrom97f726ab16). The evetest port scan commit is part of the evetest backport (#6873) and the remaining commits of the PR do not apply to14.5-stable.The cherry-pick needed a different change of the same effect.
14.5-stablebuilds sshd from source and ships its ownpkg/debug/ssh/sshd_configwithout asshd_config.dinclude, soPasswordAuthentication noandKbdInteractiveAuthentication noare appended to that file instead of a drop-in. The Dockerfile hash updates of the original commit are not applied.Without this fix
TestExternalPortScanKVMfails, because the port scan requires that SSH offers publickey only.PR dependencies
None.
How to test and validate this PR
Covered by the evetest test
TestExternalPortScanKVM(added to14.5-stableby #6873):Changelog notes
The SSH server of the debug container now offers only publickey login.
Checklist
For backport PRs (remove it if it's not a backport):
And the last but not least:
check them.