From nobody Thu Nov 12 23:58:23 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 4jQclz3vSlz6xqPV for ; Thu, 12 Nov 2026 23:58:23 +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 4jQclz23ssz4WHw for ; Thu, 12 Nov 2026 23:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794527903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSbC7cv482Kzw371r7xl/Cp255D51GVewiNG9x9JQsA=; b=pOdUrO1lg2b3EWuunoejruisPhzdtcyNWwgvdoDZPh0vpIH4l30GGPrELCo+ijhsTxQdlG vTopDDB/SPas8C7GwfEdZpvnE9pYNzekNKvPRA9GMHjPyKY/nCcDZJHTFX6s9vuhlfjZtT 635yOXwcNnfjy1BjKFPye4xvWbf4b3VWbhYSp9j3E52jwyoW1yQYucF0TH9Eb4NIZjcpfY EYZXhu93/YsrnSrF6hpKo06hI9QxrrNhYvyMxNpFhrIUcwtKlFoJ/rM9VDZEkC5HfVUv+M LiW64qFWASSXmLwy7N9EVXUddaoka3xtJpaN3JX9dYu0dPMbyBvRGNRc54qY3w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794527903; b=mS52Cjf9efqxiNTUTbmLPU1Mw3NwZMn4cwGhiq9HGsxTqTTcRPFUdKWkeqpqFrS9ic4CdH ir2Ts2zv2+Yollz4PKGZecubILnjrH9/VDWJ4BuaBbsvZDvHTaIxgN2pekyk+BnTD1n6zn KRJJ6cuptZHSNVoSRJOZk5SEwNp6oe5UdcBsG0R8ip4/J3+lzyPz/WYtwLvTZ5/FnB3dr/ kLI7KFZFivRWycLm1iiuq2dMExZqZ6fxGZFxzZDLwfCT6kELbu/QpVLnyLSmIk6wkovRA1 uOr5DJXIrjrQfSlnXl+HmP+ZG1XwFY/TPc2UJ8hQ2qnPejM1CYNGfFXyvznGzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794527903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSbC7cv482Kzw371r7xl/Cp255D51GVewiNG9x9JQsA=; b=KfzcNIW3Uy8QNzm38LOH+qQpdrXvJnqqupzIMGz1MhaSpqFNubs5x5krwCb4YD09ACyGLB rohoMa66KfypWA4Wo3ldG1RsCLiDFVKsJuuu9vAWSvv+RZi8Gix5TalufutboENeXYtgCz XIwvV3135pGbREz+IKOS3biSCVAmd8DaplCaCGwIVrHSdy0f/8xj05IgJH50sMInFMSBIh LZt5C5NkTuwNp63dz8yihStvcQiwYLi2KIDAQxx+Lh2SWmWhyZzrv4jvaBikMknGCmLiSo z/V7tvM53uBEhVk/9CpLEg5Z4cH6DSEvjI5DB9fWUdck/+fQWvAAFiMMeOX0mA== 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 4jQclz0gwYz1Nf7 for ; Thu, 12 Nov 2026 23:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 11672 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 23:58:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ed Maste From: Colin Percival Subject: git: b171736fef25 - releng/15.2 - 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.2 X-Git-Reftype: branch X-Git-Commit: b171736fef257d07731ee9fd5d8b660655f01c01 Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 23:58:23 +0000 Message-Id: <6af6529f.11672.7ee62de8@gitrepo.freebsd.org> The branch releng/15.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b171736fef257d07731ee9fd5d8b660655f01c01 commit b171736fef257d07731ee9fd5d8b660655f01c01 Author: Ed Maste AuthorDate: 2026-11-10 14:23:50 +0000 Commit: Colin Percival CommitDate: 2026-11-12 23:57:59 +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). Approved by: re (cperciva) Reviewed by: jlduran Sponsored by: The FreeBSD Foundation (cherry picked from commit 6fcdc18bdfb17c43eb05eb6289732e6adceb481a) (cherry picked from commit 8ffa19f39a729416ef626d0afad99dc708c048ed) --- 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"