🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6246

Bug#1155407: openssh-server: sshd-auth killed by seccomp (SIGSYS) on restart_syscall when the container is frozen; please backpo...

#6246
From: Greg Humphreys
Date: Thu, 26 Nov 2026 01:30
123 lines
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==--
Technical Details
Message-ID: <O3wtb-eaW8-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Greg Humphreys <humper@gmail.com>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155407: openssh-server: sshd-auth killed by seccomp (SIGSYS) on restart_syscall when the container is frozen; please backport bz4036 to trixie
Date: Thu, 26 Nov 2026 02:30:01 +0100
Message-ID: <O3wtb-eaW8-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Nov 26 01:23:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.548
Reply-To: Greg Humphreys <humper@gmail.com>, 1155407@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-ssh@lists.debian.org
X-Debian-Pr-Message: report 1155407
X-Debian-Pr-Package: openssh-server
X-Debian-Pr-Keywords: fixed-upstream patch upstream
X-Debian-Pr-Source: openssh
X-Gm-Message-State: APuU4Z8ND/C1Rkc5hFzhU3gH4A99utxE7tL3m+3o4xGMruoUqDL/C1Ir
	hOiJl2L9I6+rN28lcPU//bDHbQvjo5TeBZUNu79vhtWaXE1LothHzqhtWcpQwvNI
X-Gm-Gg: AZFdTZdCaCtLMX8fvNni/2fBabYcMUq/dxMBSquuSf1BMZpPPmsTYJ9hBEpGYRErAtW
	2nm/wDTZu/BM6h3mU1tNJD+5dtTl9IlvR03Be/22L5kvMilB3MoVv4ETIqJSnrm3I3v7/j+icfB
	ib2wpVogUVZkceLmxJsNss3ud/qovO5WWGpd2XSnPfuynqdE6mAn3C06BUaZqBbXFvGf2tNU5CW
	sQ0gVNuiKyTYuaOng4WasBPkJ8rh4KZssYnzR6OOAlrJG/ww9nWt+AKZ2LIzB6yocW/qgNC46r5
	jEt1I+Ix/eenyOcItLKw1bmAfcOqWyW/8k31G4q5cfHCbRHZ5Mk9UbPNM6GrtrnGz22U/FNPXKq
	Fnc+wrviv0RYl0L7e6ojq7QP4LI/GzsVd1pC1SiIj1k5eFX/EJmM5db7RvRGFT2Rc6eVhYsXwQE
	9eADNz8DpD+GNaep2JOzGSjl3iSvqGrU1IuvLLpjNtxX0rqEFxbCd9OEMvxj9CnZpAw3alPS7u4
	nPW7pFUugCUjMMq32z7yvMV8VgpPyiqcpzYQP865FRNgTU4mhHoEVNpBW3PpXj8uYSrdOf5gLaw
	8LSmBxMfU3IiF9efQDeZ98q043N6dw0=
X-Received: by 2002:a05:622a:5a06:b0:536:6f16:d923 with SMTP id d75a77b69052e-55d76a5fa5cmr362975111cf.40.1795656087061;
        Wed, 25 Nov 2026 17:21:27 -0800 (PST)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4842520857937941204=="
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005118
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 123
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Wed, 25 Nov 2026 17:21:25 -0800 (PST)
X-Original-Message-ID: <6b078995.bfbe2361.14457a.e6b7@mx.google.com>