Bug 485461 - (CVE-2009-0362) CVE-2009-0362 fail2ban: remote DoS via crafted domain names
CVE-2009-0362 fail2ban: remote DoS via crafted domain names
Status: CLOSED CURRENTRELEASE
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
http://nvd.nist.gov/nvd.cfm?cvename=C...
impact=important,source=cve,reported=...
: Security
Depends On: 485464 485465 485466
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-13 12:15 EST by Vincent Danen
Modified: 2009-02-18 10:54 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-18 10:54:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Vincent Danen 2009-02-13 12:15:21 EST
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 12:20:45 EST
Created attachment 331847 [details]
patch to fix the issue taken from Debian BTS
Comment 3 Vincent Danen 2009-02-13 12:38:34 EST
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 09:18:36 EST
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.