From nobody Sun Oct 12 17:18:45 2025 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 4cl6df1QK1z6CFRV; Sun, 12 Oct 2025 17:18:46 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cl6df00hkz3G5m; Sun, 12 Oct 2025 17:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760289526; 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=mZK8R3uic1C+8JC0feTm1I2VHkjCdD8EBBZUlS9MlCg=; b=T1u1hiA+PZNFzG8N3HtyJIuXer/K3CPyTbzUi8+rFHvygc1vSUKdTID24Fzla7W/Klzh+P NnCRDC+Fhwg0iC1Ghf49kdmCv6VIFfKeCMr2HdFmBAGYETdBp9O25+hjh8GmWR8LTa+O5V VCzI5xXcgotqR+CRGKNphruTVAscSlfMYZhjyWacC5haxUvUW7uPoi5A26FwXFxvwrcL0j iqqJiWIkul6OzKp+eu70iV/8f4gwv1IbfDQP1Rze6yCUBVa4zBEAKBNnJFUdkaJ0Ab+s39 402m36fONvRcM1hsPqKxNz0SOvjJMLIHwZQoMP4o7QN40/vtgYEt0yKK8GJ8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760289526; 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=mZK8R3uic1C+8JC0feTm1I2VHkjCdD8EBBZUlS9MlCg=; b=D5mASBu33LQ/r4XdhoCAGxstW36FRJLtGwvRTvKpNLOk9bw4TN6XXCf/UYzufClUakNCMu RRUqcWG2FHMPNSzbxmTMluxjeIUFMlkoff7OQDtEz8O/QF/4SqqvbuQM/bHvIp1xO5MmCN sbpaEREAFSGL4wQ7qbJ0PNgdAPx7UtZ3I3ioJKkSskdKs6oRP57t/Dbwk9gBp5U4izeH2T Wx8srVBvmuK1Iolsec0YFWLfx2s+8DzTbg+NfyTStQHbX/erXM+t8vPnUGYJweHuV6Rdcg LBa8gf58/tjC23lj8LtFvDonPmTd4QMPcAMjdzquWA8YCT3v8zqozQXWogSaqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760289526; a=rsa-sha256; cv=none; b=tl3YhnGPnmkbJ0QUk8KQb/15o3Y4eXMkbIqHSakhyrZm+2amUQO5GZZt1jD+4bsP95LJ+E x9SisTlQiGm+8osXfvgh7derIJIY2B60HOOiOn8Z3fMr+LjwvjHe5ggpwp+I7Uj5lYcOjS I4jSy/LiErI6q/0WvRmfkdo8cPqHl92lshxvTAJsLa3RYV+plxXIZFCsoqjnLlCdWmre8t OOWcnhbqNzof6FAV5FQ2Kkt659gixP8sI1bDOR+uJW9V8jNOd4ZK/xROWYsF83ZlpQHPQu 0SHQkK/jK9zrv7qMHJnrh/hdcNb068y90+cd+wufMWAZrJ4EJwOb7/NFYerNVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cl6dd6kGwzTd0; Sun, 12 Oct 2025 17:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59CHIjF0030804; Sun, 12 Oct 2025 17:18:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59CHIjCl030801; Sun, 12 Oct 2025 17:18:45 GMT (envelope-from git) Date: Sun, 12 Oct 2025 17:18:45 GMT Message-Id: <202510121718.59CHIjCl030801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 4d56eb007b18 - main - blocklist: Revert upstream commit ddf6d71 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d56eb007b18881becb2107f87bd2a7edca3e6bf Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4d56eb007b18881becb2107f87bd2a7edca3e6bf commit 4d56eb007b18881becb2107f87bd2a7edca3e6bf Author: Jose Luis Duran AuthorDate: 2025-10-11 14:15:03 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-12 17:11:18 +0000 blocklist: Revert upstream commit ddf6d71 Upstream commit ddf6d71 ("implement BLOCKLIST_BAD_USER as a "one-count" failure") introduced BLOCKLIST_BAD_USER with a one-count failure mechanism. BLOCKLIST_AUTH_FAIL was implemented with a two-count failure mechanism. Since we have been utilizing BLOCKLIST_AUTH_FAIL, the number of failed attempts now doubles towards the maximum limit (nfails), giving system administrators the impression that the number of failed authentication attempts is inaccurate. Revert this commit until a consensus has been reached. We do not want to introduce yet another breaking change with the renaming of the library. Approved by: emaste (mentor) MFC after: 2 days --- contrib/blocklist/bin/blocklistd.c | 18 +++++++++--------- contrib/blocklist/lib/libblocklist.3 | 32 +++++++++++++++++++------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/contrib/blocklist/bin/blocklistd.c b/contrib/blocklist/bin/blocklistd.c index 4846b507c8d1..03a1dbbf056c 100644 --- a/contrib/blocklist/bin/blocklistd.c +++ b/contrib/blocklist/bin/blocklistd.c @@ -222,19 +222,16 @@ process(bl_t bl) switch (bi->bi_type) { case BL_ABUSE: /* - * If the application has signaled abusive behavior, set the - * number of fails to be two less than the configured limit. - * Fall through to the normal BL_ADD and BL_BADUSER processing, - * which will increment the failure count to the threshhold, and - * block the abusive address. + * If the application has signaled abusive behavior, + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. */ if (c.c_nfail != -1) - dbi.count = c.c_nfail - 2; + dbi.count = c.c_nfail - 1; /*FALLTHROUGH*/ case BL_ADD: - dbi.count++; /* will become += 2 */ - /*FALLTHROUGH*/ - case BL_BADUSER: dbi.count++; dbi.last = ts.tv_sec; if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { @@ -263,6 +260,9 @@ process(bl_t bl) dbi.count = 0; dbi.last = 0; break; + case BL_BADUSER: + /* ignore for now */ + break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } diff --git a/contrib/blocklist/lib/libblocklist.3 b/contrib/blocklist/lib/libblocklist.3 index 7a016625a047..fd6eb93eb756 100644 --- a/contrib/blocklist/lib/libblocklist.3 +++ b/contrib/blocklist/lib/libblocklist.3 @@ -106,20 +106,26 @@ The .Ar action parameter can take these values: .Bl -tag -width ".Dv BLOCKLIST_ABUSIVE_BEHAVIOR" -.It Va BLOCKLIST_BAD_USER -The sending daemon has determined the username presented for -authentication is invalid. -This is considered as one failure count. -.It Va BLOCKLIST_AUTH_FAIL +.It Dv BLOCKLIST_AUTH_FAIL There was an unsuccessful authentication attempt. -This is considered as two failure counts together. -.It Va BLOCKLIST_ABUSIVE_BEHAVIOR -The sending daemon has detected abusive behavior from the remote system. -This is considered as a total immediate failure. -The remote address will be blocked as soon as possible. -.It Va BLOCKLIST_AUTH_OK -A valid user successfully authenticated. -Any entry for the remote address will be removed as soon as possible. +.It Dv BLOCKLIST_AUTH_OK +A user successfully authenticated. +.It Dv BLOCKLIST_ABUSIVE_BEHAVIOR +The sending daemon has detected abusive behavior +from the remote system. +The remote address should +be blocked as soon as possible. +.It Dv BLOCKLIST_BAD_USER +The sending daemon has determined the username +presented for authentication is invalid. +The +.Xr blocklistd 8 +daemon compares the username to a configured list of forbidden +usernames and +blocks the address immediately if a forbidden username matches. +(The +.Dv BLOCKLIST_BAD_USER +support is not currently available.) .El .Pp The