From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 18 06:10:11 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 892A31065672 for ; Sat, 18 Jun 2011 06:10:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4E3108FC0A for ; Sat, 18 Jun 2011 06:10:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5I6AB2x037558 for ; Sat, 18 Jun 2011 06:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5I6AADF037557; Sat, 18 Jun 2011 06:10:10 GMT (envelope-from gnats) Resent-Date: Sat, 18 Jun 2011 06:10:10 GMT Resent-Message-Id: <201106180610.p5I6AADF037557@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christoph Theis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6986106566B for ; Sat, 18 Jun 2011 06:05:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B73F48FC0C for ; Sat, 18 Jun 2011 06:05:31 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5I65VJG080382 for ; Sat, 18 Jun 2011 06:05:31 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p5I65V2L080381; Sat, 18 Jun 2011 06:05:31 GMT (envelope-from nobody) Message-Id: <201106180605.p5I65V2L080381@red.freebsd.org> Date: Sat, 18 Jun 2011 06:05:31 GMT From: Christoph Theis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/157979: fail2ban fails 2 ban since update of June, 11 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2011 06:10:11 -0000 >Number: 157979 >Category: ports >Synopsis: fail2ban fails 2 ban since update of June, 11 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jun 18 06:10:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Christoph Theis >Release: 8.2-RELEASE >Organization: >Environment: FreeBSD galadriel 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: Since the last update of June, 11 2011 fail2ban fails to recognize "SSH intruders" with the filter filter.d/bsd-sshd.conf. I guess the bug was introduced with the introduction of supporting verbose output of syslog, the patch from June 11. In filter.d/common.conf the __prefix_line is now defined as __prefix_line = \s*%(__bsd_verbose_mode)s(?:\S+ )?(?:@vserver_\S+ )?%(__daemon_combs_re)s?\s* But isn't the __bsd_verbose_mode this way not now mandatory? I think __prefix_line shall be defined as __prefix_line = \s*%(__bsd_verbose_mode)s?(?:\S+ )?(?:@vserver_\S+ )?%(__daemon_combs_re)s?\s* ( add a "?" after "%(__bsd_verbose_mode)s" ) I tested with fail2ban-regex: With the original line from the ports I get 0 hits on the log file, with my modified line I get > 1000 hits. And the comment above that line still reads # [hostname] [vserver tag] daemon_id spaces But shouldn't it read # [verbose] [hostname] [vserver tag] daemon_id spaces >How-To-Repeat: In /usr/local/etc/fail2ban run fail2ban-regex /var/log/auth.log filter.d/bsd-sshd.conf filter.d/bsd-sshd.conf and check for the number of hits >Fix: See above: __bsd_verbose_mode shall be optional (add an "?" added after it) >Release-Note: >Audit-Trail: >Unformatted: