NetBSD Problem Report #59213

From www@netbsd.org  Tue Mar 25 20:54:40 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)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1F2191A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Mar 2025 20:54:40 +0000 (UTC)
Message-Id: <20250325205439.0467E1A923D@mollari.NetBSD.org>
Date: Tue, 25 Mar 2025 20:54:38 +0000 (UTC)
From: jlduran@gmail.com
Reply-To: jlduran@gmail.com
To: gnats-bugs@NetBSD.org
Subject: blocklistd/ftpd: Allow the nfail counter to be reset once a valid login occurs
X-Send-Pr-Version: www-1.0

>Number:         59213
>Category:       bin
>Synopsis:       blocklistd/ftpd: Allow the nfail counter to be reset once a valid login occurs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 25 20:55:00 +0000 2025
>Last-Modified:  Wed Mar 26 00:10:01 +0000 2025
>Originator:     Jose Luis Duran
>Release:        trunk
>Organization:
>Environment:
>Description:
Similar to bin/59108, but for ftpd.
Allow the nfail (number of failed attempts) blocklistctl counter to be reset once a valid FTP login occurs.  Otherwise, the counter never resets, and after a reboot the system could start blocked for a given IP.
>How-To-Repeat:
Similar to bin/59108, but for ftpd.

>Fix:
Obtained from: FreeBSD

--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1432,7 +1432,8 @@ do_pass(int pass_checked, int pass_rval, const char *passwd)
 				exit(0);
 			}
 			return;
-		}
+		} else
+			pfilter_notify(0, "success");
 	}

 			/* password ok; check if anything else prevents login */

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59213 CVS commit: src/libexec/ftpd
Date: Tue, 25 Mar 2025 20:05:56 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Wed Mar 26 00:05:56 UTC 2025

 Modified Files:
 	src/libexec/ftpd: ftpd.c

 Log Message:
 PR/59213: jlduran: Allow the nfail counter to be reset once a valid login occurs


 To generate a diff of this commit:
 cvs rdiff -u -r1.208 -r1.209 src/libexec/ftpd/ftpd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.