NetBSD Problem Report #59202

From www@netbsd.org  Fri Mar 21 02:17:09 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 972801A9239
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 21 Mar 2025 02:17:09 +0000 (UTC)
Message-Id: <20250321021708.8C42A1A923D@mollari.NetBSD.org>
Date: Fri, 21 Mar 2025 02:17:08 +0000 (UTC)
From: jlduran@gmail.com
Reply-To: jlduran@gmail.com
To: gnats-bugs@NetBSD.org
Subject: blocklistd: openssh: Add a version mismatch probe
X-Send-Pr-Version: www-1.0

>Number:         59202
>Category:       bin
>Synopsis:       blocklistd: openssh: Add a version mismatch probe
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 21 02:20:00 +0000 2025
>Originator:     Jose Luis Duran
>Release:        trunk
>Organization:
>Environment:
>Description:
A lot of bots are checking for SSH version 1 (or mismatched), and currently blocklistd does not mark them as an nfail, spamming the console/logs.
>How-To-Repeat:
echo "SSH-1.5-TEST" | nc <ssh-server> 22

>Fix:
--- a/crypto/external/bsd/openssh/dist/sshd-session.c
+++ b/crypto/external/bsd/openssh/dist/sshd-session.c
@@ -1260,8 +1260,10 @@ main(int ac, char **av)
 	}

 	if ((r = kex_exchange_identification(ssh, -1,
-	    options.version_addendum)) != 0)
+	    options.version_addendum)) != 0) {
+		pfilter_notify(1);
 		sshpkt_fatal(ssh, r, "banner exchange");
+	}

 	ssh_packet_set_nonblocking(ssh);

-- 
Jose Luis Duran

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.