Skip to content

[14.5-stable] debug: upgrade OpenSSH to 10.6p2 - #7049

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

eriknordmark merged 1 commit into
lf-edge:14.5-stablefrom
shjala:backport/14.5-openssh-10.6p2

Conversation

@shjala

@shjala shjala commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Description

Standalone OpenSSH security upgrade for 14.5-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 isolated branch-specific OpenSSH build, bypass regression, public-key login, SFTP and production authentication settings passed. A completed full debug test build is not claimed for this branch. Docker's fetch of the pre-existing lshw archive previously 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 is still running. 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 14.5-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

Review: OpenSSH 10.6p2 backport to 14.5-stable

  • Fetch and read the diff
  • Review pkg/debug/Dockerfile changes
  • Review register-sbom-pkg.sh
  • Review tests/openssh.sh
  • Review installer pin + deleted patch
  • Post inline comments

This is a well-constructed, security-focused backport. The approach is sound and I verified the key safety properties below. I posted 2 low-severity inline notes asking to confirm intentional behavior changes; no blocking issues found.

Verified correct

  • Test accounts don't ship. openssh.sh injects ssh-test/ssh-salt accounts into /out, but it only runs in the openssh-test/test stages. The final FROM scratch image copies COPY --from=build /out/ / (Dockerfile:163) — from build, not the test stages — so the disposable accounts and keys never reach the shipped image.
  • Helper path is consistent. --libexecdir=/usr/lib/ssh matches the install targets (sshd-session, sshd-auth, sftp-server → /usr/lib/ssh/) and the shipped pkg/debug/ssh/sshd_config Subsystem sftp /usr/lib/ssh/sftp-server. This actually corrects the prior mismatch (helpers were installed to /usr/libexec while the config referenced /usr/lib/ssh).
  • Supply-chain integrity preserved. The archive now has a pinned --checksum=sha256:… in addition to the retained detached-signature (.asc) GPG verification.
  • Production config is asserted in CI. The openssh-test stage runs sshd -T and greps for passwordauthentication no / kbdinteractiveauthentication no, independent of the bypass regression (which deliberately enables password auth in a disposable config).
  • SBOM helper (register-sbom-pkg.sh) is copied to the builder (not /out), so it doesn't ship; the C: synthetic-checksum guard and 30-char length assertion are correct (Q1 + base64(SHA-1) = 30).
  • fix-utmpx-ipv6.patch deletion is justified — the IPv6 utmpx fix is upstream in 10.6p2, and --disable-utmp/--disable-wtmp are set anyway.

Inline notes (non-blocking, confirm intent)

  1. pkg/debug/Dockerfile — ssh-keysign is no longer installed (was setuid 4711). Disables hostbased auth; likely intentional but undocumented.
  2. pkg/debug/Dockerfile — --with-ssl-engine dropped from configure. Reasonable under OpenSSL 3.x, but an undocumented change.

Couldn't verify

  • The pinned SHA-256 and the eve-debug image hash in pkg/installer/Dockerfile can't be validated in this environment; the PR states both were checked (make check-docker-hashes-consistency, linuxkit pkg show-tag). ARM64/RISC-V builds are not claimed — worth confirming the from-source build + make tests pass on arm64 before merge.

View job run · branch backport/14.5-openssh-10.6p2

@shjala
shjala force-pushed the backport/14.5-openssh-10.6p2 branch from a2ebfbc to 2de3a02 Compare November 5, 2026 17:01
Comment thread pkg/debug/Dockerfile
RUN /usr/bin/install -c -m 0755 -s sshd-session /out/usr/lib/ssh/sshd-session
RUN /usr/bin/install -c -m 0755 -s sshd-auth /out/usr/lib/ssh/sshd-auth
RUN /usr/bin/install -c -m 0755 -s ssh-pkcs11-helper /out/usr/lib/ssh/ssh-pkcs11-helper
RUN /usr/bin/install -c -m 0755 -s ssh-sk-helper /out/usr/lib/ssh/ssh-sk-helper

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.

ssh-keysign is no longer installed here — the previous build installed it setuid (-m 4711). Dropping it disables hostbased authentication (and removes a setuid binary). This is almost certainly intentional given EVE's publickey-only policy, but it isn't mentioned in the PR description (which only lists adding sshd-auth and realigning the helper dir). Please confirm the removal is deliberate.

Comment thread pkg/debug/Dockerfile
--with-default-path='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
--with-privsep-user=sshd \
--with-ssl-engine
--with-privsep-user=sshd

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.

--with-ssl-engine was dropped from the configure flags in this change. The OpenSSL ENGINE API is deprecated under OpenSSL 3.x, so this is reasonable, but it's an undocumented behavior change (not listed in the PR description). Confirm it's intentional — if any deployment relied on an OpenSSL engine for key operations, this removes that path.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @shjala's task in 3m 56s —— View job


Review: OpenSSH 10.6p2 backport to 14.5-stable

Reviewed git diff origin/14.5-stable...HEAD. Overall the backport is consistent: the /usr/libexec → /usr/lib/ssh relocation is matched by --libexecdir=/usr/lib/ssh and by the Subsystem sftp /usr/lib/ssh/sftp-server path in both the production and test sshd_config, the new sshd-session/sshd-auth split helpers are installed, the utmpx patch removal is correct, and the test accounts live only in the disposable openssh-test/test stages (the final image copies only from build). No stale /usr/libexec references remain in the debug scripts.

A few points posted as inline comments:

  • ADD --checksum vs. pinned frontend — pkg/debug/Dockerfile:73 uses ADD --checksum=..., which requires Dockerfile syntax ≥ 1.6, but line 1 still pins 1.5.0-rc2-labs. This likely fails the build; the # syntax= directive should be bumped. (Highest-priority — please verify against how master debug: use Alpine OpenSSH password-authentication fix #7046 was actually built.)
  • xxd dependency — register-sbom-pkg.sh:81 needs xxd, which isn't in BUILD_PKGS; if absent in the 14.5 build image the SBOM step breaks the build under set -e. Verify it's present or add it (or switch to openssl dgst -sha1 -binary | base64).
  • ssh-keysign dropped — pkg/debug/Dockerfile:110: the setuid ssh-keysign helper is no longer installed. Reasonable (hostbased-auth only), but confirm it's intentional.

The password-bypass regression test, publickey/SFTP checks, and the production sshd -T effective-config assertion (PasswordAuthentication no / KbdInteractiveAuthentication no) are well-constructed. The installer debug-image pin update is a mechanical hash bump I can't verify here.

Comment thread pkg/debug/Dockerfile

WORKDIR /usr/src
ADD https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src
ADD --checksum=sha256:9ae44872090cf2f06b3cf9ff147e7f16f309671340763ed2f99248398ae29d5b https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src

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.

ADD --checksum=... for a remote URL requires the Dockerfile frontend ≥ 1.6. This file still pins # syntax=docker/dockerfile-upstream:1.5.0-rc2-labs (line 1, unchanged by this PR). With that older frontend, BuildKit rejects the --checksum flag (unknown flag: checksum) and the build fails before the GPG verify even runs.

Please bump the # syntax= directive to a version that supports ADD --checksum (e.g. docker/dockerfile:1.9 / ...-labs), and confirm the master PR #7046 did the same. If local builds passed, double-check they weren't using an implicitly newer frontend than the pinned directive.

# key. Two of them then collide and apk frees a still-referenced package
# (SIGSEGV); a single one makes apk commit a DB truncated at that record. No .apk
# file exists to hash, so derive a stable synthetic SHA-1 from name and version.
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | sha1sum | cut -d' ' -f1 | xxd -r -p | base64)"

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.

This relies on xxd -r -p, but xxd is not in this stage's BUILD_PKGS (abuild curl tar make linux-headers patch g++ git gcc gpg ncurses-dev autoconf openssl-dev zlib-dev jq pciutils usbutils lsblk). In Alpine, xxd is a separate package (it appears in pkg/alpine/mirrors/3.16/main), not guaranteed to be symlinked from busybox on every supported arch. If it's absent, register-sbom-pkg.sh (invoked at Dockerfile line 117) fails under set -e and breaks the whole build.

Since this script was carried over unchanged from master, please verify xxd is actually present in the 14.5-stable debug build image, or add xxd to BUILD_PKGS. An alternative that avoids the dependency: openssl dgst -sha1 -binary | base64 (openssl is already available here).

Comment thread pkg/debug/Dockerfile
RUN /usr/bin/install -c -m 0755 -s sshd-session /out/usr/lib/ssh/sshd-session
RUN /usr/bin/install -c -m 0755 -s sshd-auth /out/usr/lib/ssh/sshd-auth
RUN /usr/bin/install -c -m 0755 -s ssh-pkcs11-helper /out/usr/lib/ssh/ssh-pkcs11-helper
RUN /usr/bin/install -c -m 0755 -s ssh-sk-helper /out/usr/lib/ssh/ssh-sk-helper

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.

Alongside the /usr/libexec → /usr/lib/ssh relocation, the previously-installed setuid ssh-keysign helper (install -m 4711 ... ssh-keysign) is no longer installed. ssh-keysign is only needed for client-side hostbased authentication, so dropping it is reasonable (and removes a setuid-root binary), but please confirm this is intentional and that nothing in EVE relies on hostbased auth from the debug container.

@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 32.18%. Comparing base (272ffae) to head (1bfb386).
⚠️ Report is 306 commits behind head on 14.5-stable.

Additional details and impacted files
@@               Coverage Diff               @@
##           14.5-stable    #7049      +/-   ##
===============================================
+ Coverage        24.97%   32.18%   +7.20%     
===============================================
  Files                8       14       +6     
  Lines             1185     2663    +1478     
===============================================
+ Hits               296      857     +561     
- Misses             820     1806     +986     
+ Partials            69        0      -69     

☔ 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 3m 57s —— View job


Review: OpenSSH 10.6p2 backport to 14.5-stable

  • Read the full diff
  • Review pkg/debug/Dockerfile
  • Review pkg/debug/register-sbom-pkg.sh
  • Review pkg/debug/tests/openssh.sh
  • Review installer pin + deleted patch
  • Post inline findings

I reviewed git diff origin/14.5-stable...HEAD and compared the structure against master (#7046's target). The backport is largely sound — the /usr/libexec → /usr/lib/ssh relocation is internally consistent (--libexecdir, the install targets, and the Subsystem sftp path all agree), the utmpx patch removal is correct (fixed upstream + --disable-utmp), and the test accounts/keys stay in the disposable openssh-test/test stages (the shipped image is FROM scratch copying only from build).

Two actionable issues posted inline:

  1. ADD --checksum vs. pinned frontend (build-breaking) — Dockerfile:73 uses --checksum, which needs frontend ≥ 1.6, but line 1 still pins 1.5.0-rc2-labs. Importantly, master debug: use Alpine OpenSSH password-authentication fix #7046 does not use ADD --checksum — it relies on the detached-signature GPG verify — so there's no precedent it works here. Simplest fix: drop --checksum and keep the existing gpg --verify (matches master).
  2. xxd dependency (verify/build-breaking) — register-sbom-pkg.sh:81 needs xxd, not in BUILD_PKGS. On master this script runs from the eve-alpine base image; here it's a local copy run against a different eve-alpine pin, so master's passing builds don't cover it. Suggested a dependency-free openssl dgst -sha1 -binary | base64 replacement.

Still standing from the earlier automated review (behavior changes, please confirm intent — no new inline comments added to avoid duplication): dropping the setuid ssh-keysign helper (disables client hostbased auth) and removing --with-ssl-engine. Both are reasonable for a publickey-only debug container but are undocumented in the PR description.

Couldn't verify here: the pinned SHA-256 and the eve-debug image hash in pkg/installer/Dockerfile (PR states these were checked via make check-docker-hashes-consistency / linuxkit pkg show-tag), and arm64/riscv builds of the from-source OpenSSH + make tests.
· branch backport/14.5-openssh-10.6p2

Comment thread pkg/debug/Dockerfile

WORKDIR /usr/src
ADD https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src
ADD --checksum=sha256:9ae44872090cf2f06b3cf9ff147e7f16f309671340763ed2f99248398ae29d5b https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src

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.

Build-breaking: ADD --checksum= for a remote URL requires the Dockerfile frontend ≥ 1.6, but line 1 still pins # syntax=docker/dockerfile-upstream:1.5.0-rc2-labs (predates --checksum). BuildKit will reject it with unknown flag: checksum before the GPG verify ever runs.

Notably, this is not how master #7046 is structured: master's pkg/debug/Dockerfile does not use ADD --checksum for the OpenSSH archive at all — it relies on the detached-signature (.asc) GPG verification on the following lines (and uses abuild -F checksum for its own sources). So there is no precedent that --checksum works under this pinned frontend.

Two safe options:

  1. Drop --checksum and rely on the retained gpg --verify openssh-*.tar.gz.asc on lines 75–76, which already guarantees integrity/authenticity (this matches master's approach), or
  2. Bump the # syntax= directive to a frontend that supports --checksum (e.g. docker/dockerfile:1.9 / -labs) — but that is a broader change to the whole image build and should be validated.

If local builds passed, confirm they weren't silently using a newer default frontend than the pinned directive.

Fix this →

# key. Two of them then collide and apk frees a still-referenced package
# (SIGSEGV); a single one makes apk commit a DB truncated at that record. No .apk
# file exists to hash, so derive a stable synthetic SHA-1 from name and version.
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | sha1sum | cut -d' ' -f1 | xxd -r -p | base64)"

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.

This line depends on xxd -r -p, which is not in this stage's BUILD_PKGS. Context worth flagging: on master this helper lives in the eve-alpine base image (pkg/alpine/, copied to /bin/) and runs there; this branch instead carries a local copy and runs it in the debug build stage against a different eve-alpine pin (80c5dbe1…). So master's successful builds don't prove xxd is present here.

In Alpine xxd is usually available as a busybox applet, so this likely works — but it's an unverified assumption that breaks the whole build under set -e if wrong. Since openssl is already available in this stage (the test script uses openssl passwd), a dependency-free alternative avoids the risk entirely:

Suggested change
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | sha1sum | cut -d' ' -f1 | xxd -r -p | base64)"
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | openssl dgst -sha1 -binary | base64)"

Please either confirm xxd is present in this build image or switch to the above.

@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 22s —— View job


Review: OpenSSH 10.6p2 backport to 14.5-stable

  • Read the full diff
  • Review pkg/debug/Dockerfile
  • Review pkg/debug/register-sbom-pkg.sh
  • Review pkg/debug/tests/openssh.sh
  • Review installer pin + deleted patch
  • Post inline findings

I reviewed git diff origin/14.5-stable...HEAD. The backport is well-constructed and the security intent is sound. I independently verified the main safety properties and posted three inline findings.

Verified correct

  • Test accounts don't ship. openssh.sh injects ssh-test/ssh-salt into /out, but only in the openssh-test/test stages (FROM build AS openssh-test, line 145). The shipped image is FROM scratch and copies COPY --from=build /out/ / (line 163) — from build, not the test stages — so the disposable accounts/keys never ship.
  • Helper path is consistent. --libexecdir=/usr/lib/ssh matches the install targets (sshd-session, sshd-auth, sftp-server → /usr/lib/ssh/) and the Subsystem sftp /usr/lib/ssh/sftp-server config — correcting the prior /usr/libexec vs /usr/lib/ssh mismatch.
  • utmpx patch deletion is justified — fixed upstream in 10.6p2, and --disable-utmp/--disable-wtmp are set anyway.
  • Production hardening is CI-asserted. The openssh-test stage runs sshd -T and greps for passwordauthentication no / kbdinteractiveauthentication no, independent of the password-bypass regression (which deliberately enables password auth in a disposable config).
  • Detached-signature verify retained (gpg --verify …asc).

Findings (inline)

  1. ADD --checksum vs. pinned frontend — build-breaking risk (Dockerfile:73). --checksum needs frontend ≥ 1.6, but line 1 still pins 1.5.0-rc2-labs. It's the repo's only --checksum usage and master pins the same frontend, so no precedent it works. The retained .asc GPG verify already covers integrity+authenticity, so dropping --checksum (matching master) is the safest fix. Please confirm the pkg/debug image was actually rebuilt (not cache-hit) in the passing CI run.
  2. xxd dependency (register-sbom-pkg.sh:81) — not in BUILD_PKGS; likely present as a busybox applet but unverified and fatal under set -e. Suggested a dependency-free openssl dgst -sha1 -binary | base64.
  3. Undocumented behavior changes (Dockerfile:110/95) — setuid ssh-keysign no longer installed (disables hostbased auth) and --with-ssl-engine dropped. Both reasonable for a publickey-only container; please confirm intent and note in the description.

Couldn't verify here

  • The pinned SHA-256 and the eve-debug image hash in pkg/installer/Dockerfile (PR states both checked via make check-docker-hashes-consistency / linuxkit pkg show-tag).
  • arm64/riscv from-source builds + make tests.
    · branch backport/14.5-openssh-10.6p2

Comment thread pkg/debug/Dockerfile

WORKDIR /usr/src
ADD https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src
ADD --checksum=sha256:9ae44872090cf2f06b3cf9ff147e7f16f309671340763ed2f99248398ae29d5b https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src

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.

Build-breaking risk. ADD --checksum= for a remote URL requires Dockerfile frontend ≥ 1.6, but line 1 still pins # syntax=docker/dockerfile-upstream:1.5.0-rc2-labs, which predates the flag. Under that frontend BuildKit rejects the directive (unknown flag: checksum) before the GPG verify runs. I grepped the repo: this is the only ADD --checksum usage, and master also pins 1.5.0-rc2-labs, so there is no precedent that it works here.

The PR says CI image builds passed — please confirm the pkg/debug image was actually rebuilt in that run (not a cache hit), since that would contradict the frontend limitation.

Note the detached-signature verify on lines 75–76 (gpg --verify openssh-*.tar.gz.asc) already guarantees integrity + authenticity, so --checksum is redundant here. Safest fix (matches master):

Suggested change
ADD --checksum=sha256:9ae44872090cf2f06b3cf9ff147e7f16f309671340763ed2f99248398ae29d5b https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src
ADD https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${OPENSSH_VERSION}.tar.gz /usr/src

Alternatively bump the # syntax= directive to a frontend that supports --checksum (e.g. docker/dockerfile:1.9), but that is a broader change to validate.

# key. Two of them then collide and apk frees a still-referenced package
# (SIGSEGV); a single one makes apk commit a DB truncated at that record. No .apk
# file exists to hash, so derive a stable synthetic SHA-1 from name and version.
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | sha1sum | cut -d' ' -f1 | xxd -r -p | base64)"

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.

xxd -r -p is not in this stage's BUILD_PKGS. In Alpine xxd is a busybox applet (busybox ≥ 1.30), so this likely works in the eve-alpine base — but it's an unverified assumption that would break the whole build under set -e if the applet is absent or the pinned busybox lacks -r -p. Since openssl is already available in this stage, a dependency-free equivalent removes the risk entirely:

Suggested change
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | sha1sum | cut -d' ' -f1 | xxd -r -p | base64)"
PKG_CSUM="Q1$(printf '%s' "${PKG_NAME}-${PKG_VERSION}" | openssl dgst -sha1 -binary | base64)"

Comment thread pkg/debug/Dockerfile
RUN /usr/bin/install -c -m 0755 -s sshd-session /out/usr/lib/ssh/sshd-session
RUN /usr/bin/install -c -m 0755 -s sshd-auth /out/usr/lib/ssh/sshd-auth
RUN /usr/bin/install -c -m 0755 -s ssh-pkcs11-helper /out/usr/lib/ssh/ssh-pkcs11-helper
RUN /usr/bin/install -c -m 0755 -s ssh-sk-helper /out/usr/lib/ssh/ssh-sk-helper

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.

Two undocumented behavior changes landed alongside the /usr/libexec → /usr/lib/ssh relocation — both reasonable for a publickey-only debug container, but please confirm they're deliberate and add a line to the PR description:

  1. The setuid ssh-keysign helper (previously install -m 4711 … ssh-keysign) is no longer installed, which disables client-side hostbased authentication (and drops a setuid-root binary).
  2. --with-ssl-engine was dropped from ./configure (line 95). The OpenSSL ENGINE API is deprecated under OpenSSL 3.x so this is fine, but it removes any path that relied on an OpenSSL engine for key operations.

@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

@eriknordmark
eriknordmark merged commit 24018f3 into lf-edge:14.5-stable Nov 8, 2026
50 of 51 checks passed
shjala added a commit to shjala/eve that referenced this pull request Nov 9, 2026
OpenSSH 10.6p2 treats seccomp setup failures as fatal. QEMU user-mode cannot install the filter, so the upstream connection tests block 14.5-stable publishing after lf-edge#7049.

Keep the production sandbox enabled and run the RISC-V tests in a full-system VM before publishing. Preserve the existing amd64 and arm64 test step. Check the upstream suite, SSHole regression and production authentication settings in the guest, and require an explicit success marker.

Signed-off-by: Shahriyar Jalayeri <shahriyar@posteo.de>
shjala added a commit to shjala/eve that referenced this pull request Nov 9, 2026
OpenSSH 10.6p2 aborts when seccomp setup fails under QEMU user-mode, causing the upstream connection tests to block RISC-V publishing after lf-edge#7049. Remove the in-build upstream make tests invocation, matching 13.4-stable. Keep the SSHole regression and debug test stage unchanged.

Refresh the installer debug-image pin. No OpenSSH source or production sandbox configuration changes.

Signed-off-by: Shahriyar Jalayeri <shahriyar@posteo.de>
shjala added a commit to shjala/eve that referenced this pull request Nov 9, 2026
OpenSSH 10.6p2 aborts when seccomp setup fails under QEMU user-mode, causing the upstream connection tests to block RISC-V publishing after lf-edge#7049. Skip that upstream test step only for the riscv64 target; retain it for amd64 and arm64.

Keep the SSHole regression and debug test stage unchanged. Refresh the installer debug-image pin. No OpenSSH source or production sandbox configuration changes.

Signed-off-by: Shahriyar Jalayeri <shahriyar@posteo.de>
rene pushed a commit that referenced this pull request Nov 9, 2026
OpenSSH 10.6p2 aborts when seccomp setup fails under QEMU user-mode, causing the upstream connection tests to block RISC-V publishing after #7049. Skip that upstream test step only for the riscv64 target; retain it for amd64 and arm64.

Keep the SSHole regression and debug test stage unchanged. Refresh the installer debug-image pin. No OpenSSH source or production sandbox configuration changes.

Signed-off-by: Shahriyar Jalayeri <shahriyar@posteo.de>
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.

2 participants