git: d5f16ef6463d - stable/13 - sshd: remove blacklist call from grace_alarm_timer

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Tue, 06 Aug 2024 19:46:19 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=d5f16ef6463d73270e4380f3498410c8ad91f495

commit d5f16ef6463d73270e4380f3498410c8ad91f495
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-08-01 00:04:46 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-08-06 19:46:01 +0000

    sshd: remove blacklist call from grace_alarm_timer
    
    Under certain circumstances it may call log(3), which is not async-
    signal-safe.
    
    For now just remove the blacklist integration from this path, which
    means that blacklistd will not detect and firewall hosts that establish
    a connection but do nothing further.
    
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D46203
    
    (cherry picked from commit 2739a6845031e69be7c03461a9335d8bbb9f59bd)
    (cherry picked from commit 3d3bae9b95388169d396adc8007585699c5a23e0)
    (cherry picked from commit 73466449a9bf1888147c53d622236cebc0aa591b)
    
    Approved by:    so
---
 crypto/openssh/ssh_config    | 2 +-
 crypto/openssh/ssh_config.5  | 2 +-
 crypto/openssh/sshd.c        | 2 --
 crypto/openssh/sshd_config   | 2 +-
 crypto/openssh/sshd_config.5 | 2 +-
 crypto/openssh/version.h     | 2 +-
 6 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/crypto/openssh/ssh_config b/crypto/openssh/ssh_config
index 36c6c7785fd2..a047ce2deb93 100644
--- a/crypto/openssh/ssh_config
+++ b/crypto/openssh/ssh_config
@@ -44,4 +44,4 @@
 #   ProxyCommand ssh -q -W %h:%p gateway.example.com
 #   RekeyLimit 1G 1h
 #   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
-#   VersionAddendum FreeBSD-20240318
+#   VersionAddendum FreeBSD-20240806
diff --git a/crypto/openssh/ssh_config.5 b/crypto/openssh/ssh_config.5
index 020d254f7f0d..de1903ba43a2 100644
--- a/crypto/openssh/ssh_config.5
+++ b/crypto/openssh/ssh_config.5
@@ -2137,7 +2137,7 @@ in
 Specifies a string to append to the regular version string to identify
 OS- or site-specific modifications.
 The default is
-.Dq FreeBSD-20240318 .
+.Dq FreeBSD-20240806 .
 The value
 .Cm none
 may be used to disable this.
diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c
index 0c83e0ea468e..889f2056bc75 100644
--- a/crypto/openssh/sshd.c
+++ b/crypto/openssh/sshd.c
@@ -377,8 +377,6 @@ grace_alarm_handler(int sig)
 		kill(0, SIGTERM);
 	}
 
-	BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh");
-
 	/* Log error and exit. */
 	sigdie("Timeout before authentication for %s port %d",
 	    ssh_remote_ipaddr(the_active_state),
diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config
index 54a1d9d486d0..866e905d9515 100644
--- a/crypto/openssh/sshd_config
+++ b/crypto/openssh/sshd_config
@@ -105,7 +105,7 @@ AuthorizedKeysFile	.ssh/authorized_keys
 #PermitTunnel no
 #ChrootDirectory none
 #UseBlacklist no
-#VersionAddendum FreeBSD-20240318
+#VersionAddendum FreeBSD-20240806
 
 # no default banner path
 #Banner none
diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5
index 1c3de78d1cf0..a354c1ef2b0a 100644
--- a/crypto/openssh/sshd_config.5
+++ b/crypto/openssh/sshd_config.5
@@ -1947,7 +1947,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-20240318 .
+.Qq FreeBSD-20240806 .
 The value
 .Cm none
 may be used to disable this.
diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h
index 836b5650b247..82be0be8498f 100644
--- a/crypto/openssh/version.h
+++ b/crypto/openssh/version.h
@@ -5,4 +5,4 @@
 #define SSH_PORTABLE	"p1"
 #define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
 
-#define SSH_VERSION_FREEBSD	"FreeBSD-20240701"
+#define SSH_VERSION_FREEBSD	"FreeBSD-20240806"