Skip to content

fix(26.10): sshd login - #38

Merged
lczyk merged 6 commits into
mainfrom
fix/26.10/sshd-login
Sep 12, 2026
Merged

lczyk merged 6 commits into
mainfrom
fix/26.10/sshd-login

Conversation

@lczyk

@lczyk lczyk commented Sep 12, 2026

Copy link
Copy Markdown
Owner

since r24 the 26.10 images ship openssh 10.5. from 10.4 on, sshd aborts the pre-auth child when it cannot install its seccomp filter, and qemu-user (s390x, ppc64le) and docker desktop's rosetta (amd64 on apple silicon) always refuse it with EINVAL. so every login into an emulated 26.10 container died with ssh_sandbox_child: prctl(PR_SET_SECCOMP): Invalid argument [preauth], and spread aborted with ssh: handshake failed: EOF.

  • fix -- hack/seccomp-shim.c is an LD_PRELOAD shim for the image's sshd: it forwards prctl() and reports success only when PR_SET_SECCOMP fails with EINVAL.
  • ci -- the qemu lanes of build-oci.yaml now log into every image (5 versions x 2 flavours) with the image's password and fail the lane if that doesn't work.
  • allocate -- after the pgrep wait, the allocate scripts retry ssh-keyscan against the container and fail with sshd's log if no handshake completes, instead of leaving spread to report a bare EOF. skipped where the host has no ssh-keyscan.

openssh 10.4+ aborts the pre-auth child when prctl(PR_SET_SECCOMP)
fails, and qemu-user and rosetta refuse that call with EINVAL, so every
login into an emulated 26.10 container died before auth. preload a shim
into the image's sshd that reports success for that one failure; on
real hardware the call succeeds and the sandbox still installs.

the shim is cross-compiled in a build-platform stage pinned to the same
base, so check_base.sh now swaps the ref inside every FROM line instead
of rebuilding the first one, which also keeps the base stage name.
the qemu lanes publish without running the test suite, and a running
sshd does not mean spread can log in. start every image, log in with
its password, and fail the lane otherwise. qemu setup and a docker load
now also run on an image-cache hit, so cached images are checked too.
an sshd that drops every connection before auth used to show up only
as spread's "ssh: handshake failed: EOF". before handing the container
to spread, retry ssh-keyscan against it and fail with sshd's log if no
handshake completes. skipped where the host has no ssh-keyscan.
spread retries a failed allocate script every 5s for 5 minutes, and
every attempt left a running container behind, since --rm only fires
once the container stops; spread's summary line also dropped the
message. remove the container and report through spread's FATAL, which
aborts at once and shows the message.
a container that exits before docker port runs left the port empty,
and the step spent its 30 retries on an empty port before reporting a
misleading login failure. fail straight away instead.
@lczyk
lczyk merged commit 4615565 into main Sep 12, 2026
9 checks passed
@lczyk
lczyk deleted the fix/26.10/sshd-login branch September 12, 2026 22:05
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