Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Greg Humphreys
Thu, 26 Nov 2026 01:30
Bug#1155407: openssh-server: sshd-auth killed by seccomp (SIGSYS) on restart_syscall when the container is frozen; please backpo...
Author: Greg Humphreys
Date: Thu, 26 Nov 2026 01:30
Date: Thu, 26 Nov 2026 01:30
123 lines
7812 bytes
7812 bytes
--===============4842520857937941204==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Package: openssh-server
Version: 1:10.0p1-7+deb13u4
Severity: important
Tags: upstream patch fixed-upstream
Dear Maintainer,
On trixie, the pre-authentication child `sshd-auth` is killed by its seccomp =
sandbox with SIGSYS whenever the process is frozen and thawed while it waits =
in a restartable system call.
On thaw the kernel resumes the interrupted wait through `restart_syscall(2)` =
(x86_64 syscall 219), which the preauth seccomp filter in 10.0p1 does not all=
ow.
This happens routinely on Proxmox VE, which freezes an LXC container (cgroup =
freezer) for a moment to take a ZFS snapshot for storage replication or a sna=
pshot-mode backup.
Any SSH connection still in pre-auth at that moment is killed.
What the logs show, from one occurrence on an unprivileged Debian 13 LXC cont=
ainer on Proxmox VE 9 (kernel 7.0.14-30-pve):
Proxmox replication log:
19:48:02 121-0: freeze guest filesystem
19:48:02 121-0: create snapshot '__replicate_121-0_...' on local-zfs:subv=
ol-121-disk-0
19:48:02 121-0: thaw guest filesystem
Host kernel, same second:
audit: type=3D1326 ... subj=3Dlxc-121_... comm=3D"sshd-auth" exe=3D"/usr/=
lib/openssh/sshd-auth" sig=3D31 arch=3Dc000003e syscall=3D219 compat=3D0 ...
sshd in the container:
sshd-session[...]: error: mm_reap: preauth child terminated by signal 31
sshd[...]: Session process ... unpriv child crash for connection from <cl=
ient> to <server>
sshd[...]: drop connection #0 from [<client>]:56714 on [<server>]:22 pena=
lty: caused crash
The second effect makes the bug worse than one lost connection.
sshd's PerSourcePenalties counts the sandbox kill as a crash caused by the cl=
ient (`crash:90` by default), so for 90 seconds every new connection from tha=
t client address is dropped before key exchange.
The client sees `kex_exchange_identification: read: Connection reset by peer`=
, although it did nothing wrong.
On a host that is reached by automation from one address (configuration manag=
ement, backups, monitoring), one routine snapshot locks that automation out.
Reproduction (we saw it through Proxmox's own replication; these steps follow=
from the mechanism and were not run by hand):
1. On Proxmox VE 9, create an LXC container from the Debian 13 template with =
openssh-server 1:10.0p1-7+deb13u4.
2. From a client, open SSH connections in a loop, for example `while :; do ss=
h -o BatchMode=3Dyes root@<container> true; done`.
3. On the host, freeze and thaw the container: `lxc-freeze -n <vmid>; sleep 1=
; lxc-unfreeze -n <vmid>`, or run `pvesr run --id <vmid>-0` for a replication=
job, or `vzdump <vmid> --mode snapshot`.
4. The host's kernel log shows `comm=3D"sshd-auth" sig=3D31 syscall=3D219`, t=
he container's journal shows `preauth child terminated by signal 31`, and the=
client is refused for 90 s afterwards.
The same should happen with any SIGSTOP/SIGCONT of `sshd-auth` while it waits=
in poll or nanosleep, or with a CRIU checkpoint and restore.
Upstream fix: openssh-portable commit 26b1363c7c ("allow restart_syscall(2) i=
n seccomp sandbox", bz4036, 2026-10-18), released in 10.6p2 and already in un=
stable as 1:10.6p2-1.
It is a three-line addition to the preauth filter in `sandbox-seccomp-filter.=
c`.
Upstream's hunk does not apply to the trixie source as it is (its context lin=
es, `__NR_uname` and `__NR_setsockopt`, came later), so here it is rebased on=
to 1:10.0p1-7+deb13u4, with the same three lines in the list's alphabetical o=
rder:
--- a/sandbox-seccomp-filter.c
+++ b/sandbox-seccomp-filter.c
@@ -377,6 +377,9 @@
#ifdef __NR_read
SC_ALLOW(__NR_read),
#endif
+#ifdef __NR_restart_syscall
+ SC_ALLOW(__NR_restart_syscall),
+#endif
#ifdef __NR_rt_sigprocmask
SC_ALLOW(__NR_rt_sigprocmask),
#endif
Neither trixie nor trixie-backports (1:10.3p1-1~bpo13+1) has it, and the unst=
able package cannot be installed on trixie (it needs libc6 >=3D 2.42).
Please consider it for a trixie stable update.
This is a concrete case of #991936: the filter's default action is to kill th=
e process on any syscall it does not list, so a normal kernel path such as a =
syscall restart after a freeze kills `sshd-auth`.
Workaround for affected users: exempt trusted client networks from the crash =
penalty with `PerSourcePenaltyExemptList <network>` in the global section of =
sshd_config.
That stops the lockout, but the connection caught by the freeze is still lost.
Greg Humphreys
--===============4842520857937941204==
Content-Type: text/x-diff
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="trixie-restart_syscall.patch"
MIME-Version: 1.0
LS0tIGEvc2FuZGJveC1zZWNjb21wLWZpbHRlci5jCisrKyBiL3NhbmRib3gtc2VjY29tcC1maWx0
ZXIuYwpAQCAtMzc3LDYgKzM3Nyw5IEBACiAjaWZkZWYgX19OUl9yZWFkCiAJU0NfQUxMT1coX19O
Ul9yZWFkKSwKICNlbmRpZgorI2lmZGVmIF9fTlJfcmVzdGFydF9zeXNjYWxsCisJU0NfQUxMT1co
X19OUl9yZXN0YXJ0X3N5c2NhbGwpLAorI2VuZGlmCiAjaWZkZWYgX19OUl9ydF9zaWdwcm9jbWFz
awogCVNDX0FMTE9XKF9fTlJfcnRfc2lncHJvY21hc2spLAogI2VuZGlmCg==
--===============4842520857937941204==--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads