Bug 485461 (CVE-2009-0362) - CVE-2009-0362 fail2ban: remote DoS via crafted domain names
Summary: CVE-2009-0362 fail2ban: remote DoS via crafted domain names
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: CVE-2009-0362
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://nvd.nist.gov/nvd.cfm?cvename=C...
Whiteboard:
Depends On: 485464 485465 485466
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-13 17:15 UTC by Vincent Danen
Modified: 2019-09-29 12:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-18 15:54:04 UTC
Embargoed:


Attachments (Terms of Use)
patch to fix the issue taken from Debian BTS (806 bytes, patch)
2009-02-13 17:20 UTC, Vincent Danen
no flags Details | Diff

Description Vincent Danen 2009-02-13 17:15:21 UTC
Name: CVE-2009-0362
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0362
Assigned: 20090129
Reference: CONFIRM: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514163
Reference: BID:33734
Reference: URL: http://www.securityfocus.com/bid/33734
Reference: SECUNIA:33890
Reference: URL: http://secunia.com/advisories/33890

filter.d/wuftpd.conf in Fail2ban 0.8.3 uses an incorrect regular
expression that allows remote attackers to cause a denial of service
(forced authentication failures) via a crafted reverse-resolved DNS
name (rhost) entry that contains a substring that is interpreted as an
IP address, a different vulnerability than CVE-2007-4321.

Comment 2 Vincent Danen 2009-02-13 17:20:45 UTC
Created attachment 331847 [details]
patch to fix the issue taken from Debian BTS

Comment 3 Vincent Danen 2009-02-13 17:38:34 UTC
The CVE description is a bit wrong as the problem isn't so much with the wuftpd.conf filter (which we would not care about since we don't ship it), but with the filtering code as can be seen in the patch.

A quick test from the Debian BTS:

fail2ban-regex "Feb  4 14:55:01 washoe CRON[679]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=26.232.125.75.gs.dynamic.163data.com.cn" "\s+\(pam_unix\)\s+authentication failure.* rhost=<HOST>$"

Patched, this will return "unable to find a corresponding IP address", unpatched it will return the IP 26.232.125.75.  This is regardless of any filter.d/ configuration file.

Comment 4 Robert Vogelgesang 2009-02-16 14:18:36 UTC
The patch 0001-BF-anchoring-regex-for-IP-with-at-the-end.patch disables matching of strings containing IP addresses that are not space separated (see one of the test cases provided with the fail2ban source).

I've sent an email to the author of fail2ban, Cyril Jaquier, on 05-Feb-2009 regarding a different improvement to the regex in IP_CRE, where I suggested to add an <IPADDRESS> tag that would match only IP addresses.  I also mentioned the problem of faked DNS replies in this email to Cyril.  Until now, I received no reply.  If I cannot get to a solution with Cyril in reasonable time, I'll open a new bug for fedora.  Until then, I'll watch this bug here.


Note You need to log in before you can comment on or make changes to this bug.