Skip to content

[13.4-stable] debug: upgrade OpenSSH to 10.6p2 - #7050

Merged
rene merged 1 commit into
lf-edge:13.4-stablefrom
shjala:backport/13.4-openssh-10.6p2
Nov 8, 2026
Merged

rene merged 1 commit into
lf-edge:13.4-stablefrom
shjala:backport/13.4-openssh-10.6p2

Conversation

@shjala

@shjala shjala commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Description

Standalone OpenSSH security upgrade for 13.4-stable. This is not a cherry-pick of #7046: master uses Alpine 3.22 packages, while this branch retains its existing source build. Alpine 3.16 now has a patched 9.0p1 package, but using it would downgrade this branch from 9.8p1.

This PR combines both required protections:

Keep this branch's existing OpenSSH source build and detached-signature verification. Upgrade to the checksum-pinned 10.6p2 archive, remove the utmpx patch already included upstream, install the new sshd-auth helper, and align the helper installation directory with the shipped SFTP configuration. No custom changes to upstream OpenSSH functions. Carry an unchanged copy of master's register-sbom-pkg.sh because the branch lacks that helper, so the SBOM records OpenSSH 10.6p2.

Update the installer debug-image pin to the hash built by this branch. The test accounts and keys are confined to disposable test stages; they are not shipped.

PR dependencies

None. This standalone source upgrade does not depend on master PR #7046. Password-authentication hardening is already merged on this branch.

How to test and validate this PR

  • make check-docker-hashes-consistency passes locally; the installer debug-image pin was also independently compared with linuxkit pkg show-tag pkg/debug (older branch checkers exclude that Dockerfile).
  • ShellCheck passes using the CI Yetus image.
  • The SSH regression deliberately enables password authentication for disposable accounts, sends a wrong password then a 300-character password on the same connection, and requires rejection. It also checks public-key login and SFTP.
  • Verify production sshd -T still reports PasswordAuthentication no and KbdInteractiveAuthentication no.
  • Build the debug test stage with docker build --target test pkg/debug.
  • On a device, verify authorized SSH/EdgeView access and SFTP and confirm ssh -V reports 10.6p2.

Local amd64 validation: the branch-specific OpenSSH build, bypass regression, public-key login, SFTP and production authentication settings passed. The complete debug test stage also passed using the same upstream lshw archive downloaded with curl after Docker's fetch of that pre-existing URL failed with an HTTP/2 stream error. The repository URL is unchanged.

GitHub CI package and full EVE image builds passed for amd64 and arm64. SPDX, Docker hash consistency and Yetus checks passed. Eden/evetest remains pending; Go Tests passed. No physical-device or RISC-V execution is claimed.

Changelog notes

Upgrade OpenSSH to 10.6p2 to fix the musl password-authentication bypass. SSH access is public-key only.

PR Backports

This is an independent change for 13.4-stable; do not cherry-pick the Alpine 3.22 package change from #7046. Related fixes: master #7046, 17.0-stable #7047, 16.0-stable #7048, 14.5-stable #7049 and 13.4-stable #7050. No hotfix branches are targeted.

Checklist

  • I've provided a proper description
  • I've added the proper documentation (build rationale and test instructions)
  • I've tested my PR on amd64 device (local container tests only)
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • PR's title follows the template
  • I've checked the boxes above, or provided the validation limitations

@shjala shjala added stable Should be backported to stable release(s) security Provides a security fix labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Reviewing PR #7050 — OpenSSH 10.6p2 backport to 13.4-stable

Working...

@shjala
shjala force-pushed the backport/13.4-openssh-10.6p2 branch from 216f4fe to 2575b81 Compare November 5, 2026 17:01
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @shjala's task in 4m 59s —— View job


Review: OpenSSH 10.6p2 backport to 13.4-stable

I reviewed this as a standalone backport (it intentionally keeps the branch's source-build + GPG detached-signature verification, rather than mechanically mirroring master's install-nokeys rework). No blocking bugs or security issues found. Details below.

Consistency checks that pass

  • sftp-server path alignment is correct. Helpers move from /usr/libexec → /usr/lib/ssh and sshd is built with --libexecdir=/usr/lib/ssh. The shipped pkg/debug/ssh/sshd_config already declares Subsystem sftp /usr/lib/ssh/sftp-server, so the two now agree (previously the config pointed at /usr/lib/ssh while the binary was installed to /usr/libexec — this PR actually resolves that pre-existing mismatch).
  • SBOM registration will not collide. The branch's PKGS contains no Alpine openssh* packages (OpenSSH is 100% source-built), so register-sbom-pkg.sh's P:openssh guard won't trip and the SBOM will record openssh 10.6p2 as intended.
  • --with-ssl-engine removal is required for OpenSSL 3 / OpenSSH 10 (ENGINE support dropped); correct.
  • ssh-keyscan is newly installed and is genuinely needed by the readiness probe in tests/openssh.sh; consistent.
  • Test isolation. The openssh-test/test stages branch FROM build and only mutate /out there; the production image is FROM scratch + COPY --from=build, and BuildKit prunes the unused test stages for the default target — so the ssh-test/ssh-salt accounts and test-only-password hash never ship.
  • Bypass regression logic is sound. *-password account + real-hash "salt donor", wrong-password-then-300-char on the same connection (NumberOfPasswordPrompts=2), expecting rejection + Failed password in the log. Under set -eu the publickey/SFTP assertions correctly fail the build if they regress. The production sshd -T check reads the real shipped config and asserts PasswordAuthentication no / KbdInteractiveAuthentication no.

Notes (non-blocking)

  • ssh-keysign is dropped (previously shipped setuid 4711). This disables host-based client auth and removes a setuid binary — a net security improvement and consistent with master (debug: use Alpine OpenSSH password-authentication fix #7046), which explicitly rm -fs it. Fine as long as no EVE/EdgeView flow relies on HostbasedAuthentication.
  • Unverifiable from here: the pkg/installer/Dockerfile debug-image pin (720cb20d…) must match the digest this branch actually builds — relies on make check-docker-hashes-consistency (claimed green). The sha256:9ae4487… tarball checksum is pinned alongside the retained GPG --verify; both are belt-and-suspenders and correct for 10.6p2.

No inline comments — I found nothing anchored to a specific line that needs changing.
· branch backport/13.4-openssh-10.6p2

@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.16%. Comparing base (8077a3d) to head (0d6f433).
⚠️ Report is 356 commits behind head on 13.4-stable.

Additional details and impacted files
@@               Coverage Diff                @@
##           13.4-stable    #7050       +/-   ##
================================================
+ Coverage        24.78%   36.16%   +11.38%     
================================================
  Files                8        9        +1     
  Lines             1138     1106       -32     
================================================
+ Hits               282      400      +118     
+ Misses             788      620      -168     
- Partials            68       86       +18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Upgrade this branch's existing source build from 9.8p1 to the verified
10.6p2 release, which fixes the musl password-authentication bypass.
Alpine 3.16's patched 9.0p1 package would downgrade the existing OpenSSH.
This is a standalone branch-specific change, independent of the Alpine
3.22 package update on master.

Retain detached-signature verification, remove the utmpx patch included
upstream, install sshd-auth and align helper paths with SFTP configuration.
Record the source-built version in the SBOM and add the isolated password
bypass, public-key login and SFTP regression tests. Preserve this branch's
existing public-key-only authentication and refresh the debug image pin.

Signed-off-by: Shahriyar Jalayeri <shahriyar@posteo.de>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @shjala's task in 2m 41s —— View job


Review: OpenSSH 10.6p2 backport to 13.4-stable

I reviewed this as a standalone backport that intentionally keeps the branch's source-build + GPG detached-signature verification. No blocking bugs or security issues found. Independently verified below.

Verified correct

  • Checksum + GPG pinning — --checksum=sha256:9ae4487… on the tarball ADD (labs syntax is enabled on line 1) plus the retained gpg --verify against RELEASE_KEY.asc. Belt-and-suspenders, correct for 10.6p2.
  • sftp-server path now consistent — binaries move to /usr/lib/ssh via --libexecdir=/usr/lib/ssh, and the shipped ssh/sshd_config declares Subsystem sftp /usr/lib/ssh/sftp-server. This resolves the pre-existing mismatch (config was already /usr/lib/ssh while the binary installed to /usr/libexec).
  • sshd-auth installed — required by the OpenSSH 10 auth-helper split; sshd resolves it relative to libexecdir, which now matches the install path.
  • --with-ssl-engine removal — required for OpenSSL 3 / OpenSSH 10 (ENGINE support dropped).
  • utmpx patch removal — the Zededa HAVE_ADDR_V6_IN_UTMPX fix is upstream now; --disable-utmp/--disable-wtmp/--disable-lastlog remain, so loginrec paths aren't exercised anyway.
  • SBOM registration won't collide — the branch's PKGS contains no Alpine openssh* (100% source build), so the P:openssh guard in register-sbom-pkg.sh won't trip; SBOM records openssh 10.6p2. The script's xxd -r -p/base64/sha1sum/apk --print-arch are all available in the Alpine build root (busybox provides xxd; openssl CLI is pulled via abuild).
  • Shipped production config confirmed — ssh/sshd_config has PasswordAuthentication no and KbdInteractiveAuthentication no; the test stage asserts both via sshd -T against the real config.
  • Test isolation — openssh-test/test branch FROM build and only mutate their own /out; the production image is FROM scratch + COPY --from=build /out/, so the ssh-test/ssh-salt accounts and test-only-password hash never ship.
  • Bypass regression is an effective guard — *-password victim + real-hash salt donor, wrong-password-then-300-char on one connection (NumberOfPasswordPrompts=2), expecting rejection + Failed password in the log; under set -eu the publickey/SFTP assertions also fail the build on regression.

Notes (non-blocking)

  • ssh-keysign dropped (was setuid 4711) — disables host-based client auth and removes a setuid binary; a net improvement, consistent with master. Confirm no EVE/EdgeView flow relies on HostbasedAuthentication.
  • Unverifiable from CI here: the pkg/installer/Dockerfile debug-image pin (720cb20d…) must match the digest this branch actually builds — relies on make check-docker-hashes-consistency (claimed green). Network-restricted here, so I couldn't rebuild to confirm; worth a final glance before merge.

No inline comments — nothing is anchored to a specific line that needs changing.
· branch backport/13.4-openssh-10.6p2

@shjala
shjala marked this pull request as ready for review November 6, 2026 10:42
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @shjala's task in 2m 49s —— View job


Review: OpenSSH 10.6p2 backport to 13.4-stable

  • Read PR diff and changed files
  • Review pkg/debug/Dockerfile
  • Review register-sbom-pkg.sh
  • Review tests/openssh.sh
  • Review pkg/installer/Dockerfile pin
  • Post review feedback

I reviewed this as a standalone source-build backport (intentionally keeping the GPG detached-signature verification rather than mirroring master's Alpine-package rework). I independently verified the changes against the shipped config. No blocking bugs or security issues found.

Correctness points I verified

  • libexecdir / SFTP path now consistent. --libexecdir=/usr/lib/ssh + installing sshd-session, sshd-auth, sftp-server to /out/usr/lib/ssh matches the shipped ssh/sshd_config (Subsystem sftp /usr/lib/ssh/sftp-server). sshd resolves the new sshd-auth helper relative to libexecdir, which now agrees with the install path. This also fixes the pre-existing config/binary mismatch.
  • sshd-auth installed — required by the OpenSSH 10 auth-helper split; omitting it would break password and publickey auth at runtime.
  • --with-ssl-engine removal is required for OpenSSL 3 / OpenSSH 10 (ENGINE support dropped).
  • utmpx patch removal is safe — the Zededa HAVE_ADDR_V6_IN_UTMPX fix is upstream, and --disable-utmp/--disable-wtmp/--disable-lastlog remain.
  • Test isolation is sound. openssh-test/test branch FROM build and only mutate their own /out; the production image is FROM scratch + COPY --from=build /out/, and the default build target doesn't depend on the test stages — so the ssh-test/ssh-salt accounts and test-only-password hash never ship.
  • Production config is validated at build time. The openssh-test stage runs sshd -T against the real /out/etc/ssh/sshd_config and asserts PasswordAuthentication no / KbdInteractiveAuthentication no.
  • Bypass regression is an effective guard. *-password victim + real-hash salt donor, wrong-password-then-300-char on one connection (NumberOfPasswordPrompts=2), expecting rejection + Failed password in the log; under set -eu the publickey/SFTP assertions also fail the build on regression.
  • SBOM registration won't collide. The branch's PKGS has no Alpine openssh* (100% source build), so the P:openssh guard in register-sbom-pkg.sh won't trip; SBOM records openssh 10.6p2. The copied file is mode 100755, so the RUN register-sbom-pkg.sh … step is executable.

Notes (non-blocking)

  • ssh-keysign dropped (was setuid 4711) — disables host-based client auth and removes a setuid binary; a net improvement, consistent with master. Confirm no EVE/EdgeView flow relies on HostbasedAuthentication.
  • ssh-keyscan now ships in the production debug image, though it is only needed by the readiness probe in the test stage. Harmless (small, and a reasonable debug utility), just noting it isn't confined to the test stage like the accounts are.
  • Unverifiable here (network-restricted): the pkg/installer/Dockerfile debug-image pin (720cb20d…) must match the digest this branch actually builds — relies on make check-docker-hashes-consistency (claimed green). Worth a final glance before merge. The sha256:9ae4487… tarball checksum pin alongside the retained gpg --verify is correct belt-and-suspenders for 10.6p2.

No inline comments — nothing is anchored to a specific line that needs changing.
· branch backport/13.4-openssh-10.6p2

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rene
rene merged commit 4dccc1a into lf-edge:13.4-stable Nov 8, 2026
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Provides a security fix stable Should be backported to stable release(s)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants