From nobody@FreeBSD.org  Fri Jun 22 10:45:12 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id F0DE316A469
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jun 2007 10:45:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id E1EBE13C455
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jun 2007 10:45:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5MAjCfP017671
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jun 2007 10:45:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l5MAjC1T017670;
	Fri, 22 Jun 2007 10:45:12 GMT
	(envelope-from nobody)
Message-Id: <200706221045.l5MAjC1T017670@www.freebsd.org>
Date: Fri, 22 Jun 2007 10:45:12 GMT
From: David Bestor <freebsd1@indenial.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Denyhosts 2.6  port has a DoS issue
X-Send-Pr-Version: www-3.0

>Number:         113942
>Category:       ports
>Synopsis:       security/Denyhosts 2.6  port has a DoS issue
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 22 10:50:08 GMT 2007
>Closed-Date:    Sat Jun 23 06:35:26 GMT 2007
>Last-Modified:  Sat Jun 23 06:40:13 GMT 2007
>Originator:     David Bestor
>Release:        FreeBSD 5.5
>Organization:
N/A
>Environment:
FreeBSD tbird.indenial.com 5.5-RELEASE-p12 FreeBSD 5.5-RELEASE-p12 #4: Fri Apr 27 06:49:24 EDT 2007     root@tbird.indenial.com:/usr/obj/usr/src/sys/TBIRD  i386
>Description:
Denyhosts in the ports has a serious bug..

See
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=244943
see http://www.ossec.net/en/attacking-loganalysis.html#denyhosts

>How-To-Repeat:
see http://www.ossec.net/en/attacking-loganalysis.html#denyhosts
>Fix:
#############################################################
cd /usr/local/lib/python2.4/site-packages/DenyHosts/
diff -ruN regex.py.orig1 regex.py
#Make change below and
/usr/local/etc/rc.d/denyhosts.sh restart

--- regex.py.orig1      Thu Dec  7 14:47:04 2006
+++ regex.py    Thu Jun 21 19:18:09 2007
@@ -17,7 +17,7 @@

 FAILED_ENTRY_REGEX4 = re.compile(r"""Authentication failure for (?P<user>.*) .*
from (?P<host>.*)""")

-FAILED_ENTRY_REGEX5 = re.compile(r"""User (?P<user>.*) .*from (?P<host>.*) not
allowed because none of user's groups are listed in AllowGroups""")
+FAILED_ENTRY_REGEX5 = re.compile(r"""User (?P<user>.*) .*from (?P<host>.*) not
allowed because none of user's groups are listed in AllowGroups$""")

 FAILED_ENTRY_REGEX6 = re.compile(r"""Did not receive identification string .*fr
om (::ffff:)?(?P<host>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})""")

#############################################################


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Jun 22 12:05:15 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113942 

From: Janos Mohacsi <mohacsi@niif.hu>
To: bug-followup@FreeBSD.org, freebsd1@indenial.com
Cc:  
Subject: Re: ports/113942: security/Denyhosts 2.6  port has a DoS issue
Date: Fri, 22 Jun 2007 14:55:07 +0200

 This is a multi-part message in MIME format.
 --------------030605040904040503080501
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Approved the changes. To easier commit new files attached to be put in 
 files directory
 
 --------------030605040904040503080501
 Content-Type: text/plain;
  name="patch-DenyHosts_regex.py"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-DenyHosts_regex.py"
 
 
 $FreeBSD$
 
 --- DenyHosts/regex.py.orig
 +++ DenyHosts/regex.py
 @@ -17,7 +17,7 @@
  
  FAILED_ENTRY_REGEX4 = re.compile(r"""Authentication failure for (?P<user>.*) .*from (?P<host>.*)""")
  
 -FAILED_ENTRY_REGEX5 = re.compile(r"""User (?P<user>.*) .*from (?P<host>.*) not allowed because none of user's groups are listed in AllowGroups""")
 +FAILED_ENTRY_REGEX5 = re.compile(r"""User (?P<user>.*) .*from (?P<host>.*) not allowed because none of user's groups are listed in AllowGroups$""")
  
  FAILED_ENTRY_REGEX6 = re.compile(r"""Did not receive identification string .*from (::ffff:)?(?P<host>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})""")
  
 
 --------------030605040904040503080501--
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Fri Jun 22 15:35:57 UTC 2007 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113942 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Sat Jun 23 06:35:24 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113942 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/113942: commit references a PR
Date: Sat, 23 Jun 2007 06:35:24 +0000 (UTC)

 rafan       2007-06-23 06:35:16 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/denyhosts   Makefile 
   Added files:
     security/denyhosts/files patch-DenyHosts_regex.py 
   Log:
   - Fix a DoS issue
   
   PR:             ports/113942
   Security:       http://www.ossec.net/en/attacking-loganalysis.html#denyhosts
   Submitted by:   David Bestor <freebsd1 at indenial.com>
   Approved by:    Janos Mohacsi <mohacsi at niif.hu> (maintainer)
   
   Revision  Changes    Path
   1.8       +1 -0      ports/security/denyhosts/Makefile
   1.1       +11 -0     ports/security/denyhosts/files/patch-DenyHosts_regex.py (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
