From nobody Wed Nov 11 21:11:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jPx5s20Hbz6xpM5 for ; Wed, 11 Nov 2026 21:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jPx5r6P61z4WjM for ; Wed, 11 Nov 2026 21:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794431488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BAUqDYpnReo7mLBukEYwxTHIW2jx6MtvQNWUeNhcRSs=; b=qngMRD31bJK9flzC7YU6qV0uuA8LQRigRcP7pqIt54NbcTFuNH+YsA1ZIL7xhIFOz4hX7w ASVNxiTC0os/mESipOWWEOnMiA1orJ2sI16wZ8lB/v9n5Aj9gPv2AJXKgZX7+8wHv7TloS aMZTwsjszBtFFWjK/AE7L9QVXexneM3pUQwlzsYPwgT8B5h8CEEyX1YWLrU6/4KlC8Kar5 7Nflw/YzhnLgWg95gY2jufYRatoR/IaT7vXfN7xMEwYiRHZixP23HtW1QRNP0px/SlIvsh HYLy1gKXxjWyOX+YOHRDAAQ21eO3+hEaMCBqRb53AMmd23a+xmXelfiv4g5gtg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794431488; b=EA+oqqj7ZegyX61XdlFZCV2CmQmMnYsRDudcXTSwxkT4a7S82+5zLtYCmUT/iQ5BZRQewX 4mcR3TDN27mt7Q/ewBtNiDt08gdDkrHq3E+LgbhSNxtxTt8n8viJANL27SthTTHUEdVmSt QA1yQSNJEyGUf/qlIJ1dURqcy3aQ8RRrWvgQMT+XaFf1mHnarYP0VJ1go4Aayhp6ugdwpv oztNVtsDZ3ga9kuiCRWC3/4LF9eiwIT4MJxuftoTF6FWm1ZIu4oVR0k8vzaXgfTZc65RVA dBTbbhqxda8me13dDCa/MU9aTZMzqvqwWcMn/k1gXB98io6wWWqVttF2csg6YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794431488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BAUqDYpnReo7mLBukEYwxTHIW2jx6MtvQNWUeNhcRSs=; b=wtjhCuuU6bDzGCgld7IbsLW2XUyEv7y8IAt1jnTPSieiLaP3DyfeFbT6ztmy/zO69nDowb 2yoKkmpq6+1dAhVAxBmpW68bhxZbEIA5SruTGw8OyD+r15aRLfcl6rkIngnq3gsVTJJOFx dR59Rl5PiH1ZTyiQ/1Xis7gqMWY8eGo5arWQw0yqMVdaLBfypFIQAMyl/zKQPbLlueZybA V7xLrOgGiwUwX7//j8drQRhJI2ZpnPGnpSPjJ+0mRfDSBxOlJGVIyhXF1V3uvlN+MFVUwI XWMtNKkaFFEx/dv5DwJq1Rll5+j4QOQtMoILUb04+FY3RCnhmAprRXd8lWK7uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jPx5r5jxPzXsG for ; Wed, 11 Nov 2026 21:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 11053 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Nov 2026 21:11:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8ffa19f39a72 - stable/15 - OpenSSH: Update to 10.6p2 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8ffa19f39a729416ef626d0afad99dc708c048ed Auto-Submitted: auto-generated Date: Wed, 11 Nov 2026 21:11:28 +0000 Message-Id: <6af4da00.11053.75e66d4b@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8ffa19f39a729416ef626d0afad99dc708c048ed commit 8ffa19f39a729416ef626d0afad99dc708c048ed Author: Ed Maste AuthorDate: 2026-11-10 14:23:50 +0000 Commit: Ed Maste CommitDate: 2026-11-11 19:03:25 +0000 OpenSSH: Update to 10.6p2 Full release notes are available at https://www.openssh.org/txt/release-10.6p2 . Selected items from the upstream release notes: Future deprecation notice ------------------------- * scp(1): begin deprecating the -R flag, which is used to perform a remote-to-remote copy by executing scp on a remote host. This option is a fragile optimisation that is difficult to use because it requires credentials on the remote host. It also creates security risks if the shell quoting rules on the remote system where the copy is performed differ from the client's expectations. From OpenSSH 10.6, this option will continue to work but will cause a deprecation warning to be emitted to standard error. In a future release, the option will be ignored and will leave in place the default remote-to-remote copy behaviour (copy via the host running scp). Reviewed by: jlduran Sponsored by: The FreeBSD Foundation (cherry picked from commit 6fcdc18bdfb17c43eb05eb6289732e6adceb481a) --- crypto/openssh/.depend | 2 +- crypto/openssh/.github/workflows/selfhosted.yml | 3 ++- crypto/openssh/.github/workflows/vm.yml | 2 +- crypto/openssh/auth-passwd.c | 17 +++++++++++++---- crypto/openssh/channels.c | 7 +++---- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/misc.c | 4 +++- crypto/openssh/myproposal.h | 5 +++-- crypto/openssh/openbsd-compat/port-uw.c | 16 ++++++++-------- crypto/openssh/openbsd-compat/readpassphrase.c | 10 +++++----- crypto/openssh/openbsd-compat/xcrypt.c | 18 +++++++++++++----- crypto/openssh/sandbox-seccomp-filter.c | 3 +++ crypto/openssh/servconf.c | 2 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/utf8.c | 2 +- crypto/openssh/version.h | 4 ++-- 18 files changed, 63 insertions(+), 40 deletions(-) diff --git a/crypto/openssh/.depend b/crypto/openssh/.depend index 997f1369d7ff..128fcdbaa40e 100644 --- a/crypto/openssh/.depend +++ b/crypto/openssh/.depend @@ -12,7 +12,7 @@ auth-bsdauth.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd- auth-krb5.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h packet.h dispatch.h log.h ssherr.h sshbuf.h sshkey.h misc.h servconf.h uidswap.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssherr.h log.h sshbuf.h misc.h sshkey.h match.h ssh2.h auth-options.h auth-pam.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -auth-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h dispatch.h sshbuf.h ssherr.h log.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h +auth-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h dispatch.h sshbuf.h ssherr.h log.h misc.h xmalloc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h auth-rhosts.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h dispatch.h uidswap.h pathnames.h log.h ssherr.h misc.h xmalloc.h sshbuf.h sshkey.h servconf.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-shadow.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h auth-sia.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/bsd-sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h diff --git a/crypto/openssh/.github/workflows/selfhosted.yml b/crypto/openssh/.github/workflows/selfhosted.yml index b407d8645ceb..6ea3540a7ad5 100644 --- a/crypto/openssh/.github/workflows/selfhosted.yml +++ b/crypto/openssh/.github/workflows/selfhosted.yml @@ -92,6 +92,8 @@ jobs: - { target: nbsd10, config: pam, host: libvirt } - { target: nbsd11, config: pam, host: libvirt } - { target: omnios, config: pam, host: libvirt } + # ARM32 VMs + - { target: debian-arm, config: default, host: libvirt-arm} # ARM64 VMs - { target: obsdsnap-arm64, config: default, host: libvirt-arm64 } # VMs with persistent disks that have their own runner. @@ -101,7 +103,6 @@ jobs: - { target: ARM64, config: default, host: ARM64 } - { target: ARM64, config: pam, host: ARM64 } # Physical hosts with remote runners. - - { target: debian-arm, config: default, host: remote-debian-arm} - { target: debian-riscv64, config: default, host: remote-debian-riscv64 } - { target: openwrt-mips, config: default, host: remote-openwrt-mips } - { target: openwrt-mipsel, config: default, host: remote-openwrt-mipsel } diff --git a/crypto/openssh/.github/workflows/vm.yml b/crypto/openssh/.github/workflows/vm.yml index 1dfcfbcc3678..706ed65dd07a 100644 --- a/crypto/openssh/.github/workflows/vm.yml +++ b/crypto/openssh/.github/workflows/vm.yml @@ -97,7 +97,7 @@ jobs: usesh: true prepare: | case $(uname -r) in - 12.*) + 12.*|13.*) timeout 600 ftp ftp://ftp.sudo.ws/pub/sudo/sudo-1.8.32.tar.gz || \ ftp ftp://ftp.sudo.ws/pub/sudo/sudo-1.8.32.tar.gz tar xfz sudo-1.8.32.tar.gz diff --git a/crypto/openssh/auth-passwd.c b/crypto/openssh/auth-passwd.c index a9d768891575..fb3b22a057f6 100644 --- a/crypto/openssh/auth-passwd.c +++ b/crypto/openssh/auth-passwd.c @@ -50,6 +50,7 @@ #include "ssherr.h" #include "log.h" #include "misc.h" +#include "xmalloc.h" #include "servconf.h" #include "sshkey.h" #include "hostfile.h" @@ -67,6 +68,7 @@ extern login_cap_t *lc; #define DAY (24L * 60 * 60) /* 1 day in seconds */ #define TWO_WEEKS (2L * 7 * DAY) /* 2 weeks in seconds */ +#define MIN_PASSWORD_HASH_LEN 4 #define MAX_PASSWORD_LEN 1024 /* @@ -194,16 +196,20 @@ sys_auth_passwd(struct ssh *ssh, const char *password) Authctxt *authctxt = ssh->authctxt; struct passwd *pw = authctxt->pw; char *encrypted_password, *salt = NULL; + int ret; /* Just use the supplied fake password if authctxt is invalid */ - char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; + char *pw_password = authctxt->valid ? + shadow_pw(pw) : xstrdup(pw->pw_passwd); if (pw_password == NULL) return 0; /* Check for users with no password. */ - if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) - return (1); + if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) { + free(pw_password); + return 1; + } /* * Encrypt the candidate password using the proper salt, or pass a @@ -217,7 +223,10 @@ sys_auth_passwd(struct ssh *ssh, const char *password) * Authentication is accepted if the encrypted passwords * are identical. */ - return encrypted_password != NULL && + ret = encrypted_password != NULL && + strlen(pw_password) >= MIN_PASSWORD_HASH_LEN && strcmp(encrypted_password, pw_password) == 0; + freezero(pw_password, strlen(pw_password)); + return ret; } #endif diff --git a/crypto/openssh/channels.c b/crypto/openssh/channels.c index abae44b92eab..7c74bb675660 100644 --- a/crypto/openssh/channels.c +++ b/crypto/openssh/channels.c @@ -2774,7 +2774,7 @@ channel_handler(struct ssh *ssh, int table, struct timespec *timeout) if (timeout != NULL && c->type == SSH_CHANNEL_OPEN && channel_get_expiry(ssh, c) != 0) { - ptimeout_deadline_monotime(timeout, + ptimeout_deadline_monotime_double(timeout, channel_get_expiry(ssh, c)); } } else if (timeout != NULL) { @@ -2782,7 +2782,7 @@ channel_handler(struct ssh *ssh, int table, struct timespec *timeout) * Arrange for poll() wakeup when channel pause * timer expires. */ - ptimeout_deadline_monotime(timeout, + ptimeout_deadline_monotime_double(timeout, c->notbefore); } } @@ -4347,8 +4347,7 @@ check_rfwd_permission(struct ssh *ssh, struct Forward *fwd) #ifdef SKIP_PRIVDROP if (fwd->listen_path != NULL) return 0; - if (allowed_open->listen_port != FWD_PERMIT_ANY_PORT && - allowed_open->listen_port < 1024) + if (fwd->listen_port != 0 && fwd->listen_port < 1024) return 0; #endif diff --git a/crypto/openssh/contrib/redhat/openssh.spec b/crypto/openssh/contrib/redhat/openssh.spec index a856832419f3..2dffcdda1453 100644 --- a/crypto/openssh/contrib/redhat/openssh.spec +++ b/crypto/openssh/contrib/redhat/openssh.spec @@ -1,4 +1,4 @@ -%global ver 10.6p1 +%global ver 10.6p2 %global rel 1%{?dist} # OpenSSH privilege separation requires a user & group ID diff --git a/crypto/openssh/contrib/suse/openssh.spec b/crypto/openssh/contrib/suse/openssh.spec index 5d4812c17d5b..1f369a5e4813 100644 --- a/crypto/openssh/contrib/suse/openssh.spec +++ b/crypto/openssh/contrib/suse/openssh.spec @@ -13,7 +13,7 @@ Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation Name: openssh -Version: 10.6p1 +Version: 10.6p2 URL: https://www.openssh.com/ Release: 1 Source0: openssh-%{version}.tar.gz diff --git a/crypto/openssh/misc.c b/crypto/openssh/misc.c index 866f7b8e2a5d..d49c7100a133 100644 --- a/crypto/openssh/misc.c +++ b/crypto/openssh/misc.c @@ -3330,7 +3330,9 @@ mkdir_path(const char *target, mode_t mode) } /* Work through the path, component-wise */ - while ((p = strsep(&dir, "/")) && p != '\0') { + while ((p = strsep(&dir, "/"))) { + if (*p == '\0') + continue; if (strlcat(path, "/", plen) >= plen || strlcat(path, p, plen) >= plen) goto out; diff --git a/crypto/openssh/myproposal.h b/crypto/openssh/myproposal.h index f4fb707c910a..31d036e9a437 100644 --- a/crypto/openssh/myproposal.h +++ b/crypto/openssh/myproposal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: myproposal.h,v 1.82 2026/09/02 09:04:11 djm Exp $ */ +/* $OpenBSD: myproposal.h,v 1.83 2026/10/07 22:29:49 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -93,7 +93,8 @@ "sk-ecdsa-sha2-nistp256@openssh.com," \ "webauthn-sk-ecdsa-sha2-nistp256@openssh.com," \ "rsa-sha2-512," \ - "rsa-sha2-256" \ + "rsa-sha2-256," \ + "ssh-mldsa44-ed25519" #define KEX_DEFAULT_COMP "none,zlib@openssh.com" #define KEX_DEFAULT_LANG "" diff --git a/crypto/openssh/openbsd-compat/port-uw.c b/crypto/openssh/openbsd-compat/port-uw.c index 074f80c8d3d5..5c50ffa0fb87 100644 --- a/crypto/openssh/openbsd-compat/port-uw.c +++ b/crypto/openssh/openbsd-compat/port-uw.c @@ -58,14 +58,17 @@ sys_auth_passwd(struct ssh *ssh, const char *password) int result; /* Just use the supplied fake password if authctxt is invalid */ - char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; + char *pw_password = authctxt->valid ? + shadow_pw(pw) : xstrdup(pw->pw_passwd); if (pw_password == NULL) return 0; /* Check for users with no password. */ - if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) - return (1); + if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) { + free(pw_password); + return 1; + } /* Encrypt the candidate password using the proper salt. */ salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; @@ -83,11 +86,8 @@ sys_auth_passwd(struct ssh *ssh, const char *password) #endif /* UNIXWARE_LONG_PASSWORDS */ result = (strcmp(xcrypt(password, salt), pw_password) == 0); -#ifdef USE_LIBIAF - if (authctxt->valid) - free(pw_password); -#endif - return(result); + freezero(pw_password, strlen(pw_password)); + return result; } #ifdef UNIXWARE_LONG_PASSWORDS diff --git a/crypto/openssh/openbsd-compat/readpassphrase.c b/crypto/openssh/openbsd-compat/readpassphrase.c index 43b7128c16a8..4b710b42126c 100644 --- a/crypto/openssh/openbsd-compat/readpassphrase.c +++ b/crypto/openssh/openbsd-compat/readpassphrase.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpassphrase.c,v 1.30 2026/09/16 01:24:59 djm Exp $ */ +/* $OpenBSD: readpassphrase.c,v 1.31 2026/10/15 05:55:06 djm Exp $ */ /* * Copyright (c) 2000-2002, 2007, 2010 @@ -133,11 +133,11 @@ restart: sigemptyset(&sa.sa_mask); sa.sa_flags = 0; /* don't restart system calls */ sa.sa_handler = handler; + sigaction(SIGINT, &sa, &saveint); + sigaction(SIGQUIT, &sa, &savequit); sigaction_except_ign(SIGALRM, &sa, &savealrm); sigaction_except_ign(SIGHUP, &sa, &savehup); - sigaction_except_ign(SIGINT, &sa, &saveint); sigaction_except_ign(SIGPIPE, &sa, &savepipe); - sigaction_except_ign(SIGQUIT, &sa, &savequit); sigaction_except_ign(SIGTERM, &sa, &saveterm); sigaction_except_ign(SIGTSTP, &sa, &savetstp); sigaction_except_ign(SIGTTIN, &sa, &savettin); @@ -175,10 +175,10 @@ restart: continue; signo[SIGTTOU] = sigttou; } + sigaction(SIGINT, &saveint, NULL); + sigaction(SIGQUIT, &savequit, NULL); sigaction_except_ign(SIGALRM, &savealrm, NULL); sigaction_except_ign(SIGHUP, &savehup, NULL); - sigaction_except_ign(SIGINT, &saveint, NULL); - sigaction_except_ign(SIGQUIT, &savequit, NULL); sigaction_except_ign(SIGPIPE, &savepipe, NULL); sigaction_except_ign(SIGTERM, &saveterm, NULL); sigaction_except_ign(SIGTSTP, &savetstp, NULL); diff --git a/crypto/openssh/openbsd-compat/xcrypt.c b/crypto/openssh/openbsd-compat/xcrypt.c index 9cded66845cc..2721b33421c0 100644 --- a/crypto/openssh/openbsd-compat/xcrypt.c +++ b/crypto/openssh/openbsd-compat/xcrypt.c @@ -25,6 +25,8 @@ #include "includes.h" #include +#include +#include #include #include #include @@ -59,6 +61,8 @@ # define crypt DES_crypt # endif +#include "xmalloc.h" + #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) /* @@ -71,7 +75,7 @@ static const char * pick_salt(void) { struct passwd *pw; - char *passwd, *p; + char *passwd = NULL, *p; size_t typelen; static char salt[32]; @@ -80,6 +84,8 @@ pick_salt(void) strlcpy(salt, "xx", sizeof(salt)); setpwent(); while ((pw = getpwent()) != NULL) { + if (passwd != NULL) + freezero(passwd, strlen(passwd)); if ((passwd = shadow_pw(pw)) == NULL) continue; if (passwd[0] == '$' && (p = strrchr(passwd+1, '$')) != NULL) { @@ -90,6 +96,8 @@ pick_salt(void) } } out: + if (passwd != NULL) + freezero(passwd, strlen(passwd)); endpwent(); return salt; } @@ -122,9 +130,8 @@ xcrypt(const char *password, const char *salt) /* * Handle shadowed password systems in a cleaner way for portable - * version. + * version. Caller must free returned value. */ - char * shadow_pw(struct passwd *pw) { @@ -138,7 +145,8 @@ shadow_pw(struct passwd *pw) # endif #ifdef USE_LIBIAF - return(get_iaf_password(pw)); + pw_password = get_iaf_password(pw); + return pw_password == NULL ? NULL : xstrdup(pw_password); #endif # if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) @@ -152,5 +160,5 @@ shadow_pw(struct passwd *pw) pw_password = spw->ufld.fd_encrypt; # endif - return pw_password; + return pw_password == NULL ? NULL : xstrdup(pw_password); } diff --git a/crypto/openssh/sandbox-seccomp-filter.c b/crypto/openssh/sandbox-seccomp-filter.c index f696d50083cb..b3bce6802156 100644 --- a/crypto/openssh/sandbox-seccomp-filter.c +++ b/crypto/openssh/sandbox-seccomp-filter.c @@ -441,6 +441,9 @@ static const struct sock_filter preauth_insns[] = { #ifdef __NR_uname SC_ALLOW(__NR_uname), #endif +#ifdef __NR_restart_syscall + SC_ALLOW(__NR_restart_syscall), +#endif #ifdef __NR_setsockopt SC_ALLOW_SETSOCKOPT(IPPROTO_IPV6, IPV6_TCLASS), SC_ALLOW_SETSOCKOPT(IPPROTO_IP, IP_TOS), diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c index 829e59230c0f..06c45557f145 100644 --- a/crypto/openssh/servconf.c +++ b/crypto/openssh/servconf.c @@ -286,7 +286,7 @@ fill_default_server_options(ServerOptions *options) logit("StreamlocalForwarding is not supported on this system"); options->allow_streamlocal_forwarding = 0; if (options->fwd_opts.gateway_ports != -1 && - options->fwd_opts.gateway_ports == 0) + options->fwd_opts.gateway_ports != 0) logit("GatewayPorts is not supported on this system"); options->fwd_opts.gateway_ports = 0; #endif diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config index 1f3200898af1..a37152282783 100644 --- a/crypto/openssh/sshd_config +++ b/crypto/openssh/sshd_config @@ -109,7 +109,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlocklist no -#VersionAddendum FreeBSD-20261109 +#VersionAddendum FreeBSD-20261110 # no default banner path #Banner none diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index f4c1963d3271..f410c88b89e9 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -2174,7 +2174,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20261109 . +.Qq FreeBSD-20261110 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/utf8.c b/crypto/openssh/utf8.c index 61403ebaad77..50d8b7d03db7 100644 --- a/crypto/openssh/utf8.c +++ b/crypto/openssh/utf8.c @@ -339,7 +339,7 @@ msetlocale(void) continue; if (strncasecmp(cp, "tr", 2) != 0 && strncasecmp(cp, "crh", 3) != 0 && - strncasecmp(cp, "az", 3) != 0) + strncasecmp(cp, "az", 2) != 0) break; /* * If we're in a UTF-8 locale then prefer to use diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index a4f7c1d631af..ba7cc3493474 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -2,7 +2,7 @@ #define SSH_VERSION "OpenSSH_10.6" -#define SSH_PORTABLE "p1" +#define SSH_PORTABLE "p2" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20261109" +#define SSH_VERSION_FREEBSD "FreeBSD-20261110"