Bug 887914 (CVE-2012-5642)

Summary: CVE-2012-5642 fail2ban: does not escape the content of <matches>
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: admiller, axel.thimm, jonathan.underwood, orion
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20121008,reported=20121217,source=gentoo,cvss2=5.1/AV:N/AC:H/Au:N/C:P/I:P/A:P,fedora-all/fail2ban=affected,epel-all/fail2ban=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 887915, 887916    
Bug Blocks:    

Description Vincent Danen 2012-12-17 10:38:33 EST
The release notes for fail2ban 0.8.8 [1],[2] indicate:

   * [83109bc] IMPORTANT: escape the content of <matches> (if used in
     custom action files) since its value could contain arbitrary
     symbols.  Thanks for discovery go to the NBS System security
     team

This could cause issues on the system running fail2ban as it scans log files, depending on what content is matched.  There isn't much more detail about this issue than what is described above, so I think it may largely depend on the type of regexp used (what it matches) and the contents of the log file being scanned (whether or not an attacher could insert something that could be used in a malicious way).

The upstream git commit [3].

[1] https://raw.github.com/fail2ban/fail2ban/master/ChangeLog
[2] http://sourceforge.net/mailarchive/message.php?msg_id=30193056
[3] https://github.com/fail2ban/fail2ban/commit/83109bc
Comment 1 Vincent Danen 2012-12-17 10:42:34 EST
Created fail2ban tracking bugs for this issue

Affects: fedora-all [bug 887915]
Affects: epel-all [bug 887916]
Comment 2 Vincent Danen 2012-12-17 14:11:09 EST
This was assigned CVE-2012-5642:

http://www.openwall.com/lists/oss-security/2012/12/17/2
Comment 3 Fedora Update System 2012-12-27 22:50:50 EST
fail2ban-0.8.8-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2013-01-02 14:09:36 EST
fail2ban-0.8.8-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2013-01-11 19:24:50 EST
fail2ban-0.8.8-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.