Bug 812885 (CVE-2012-2104)

Summary: CVE-2012-2104 munin (munin-cgi-graph, munin-fastcgi-graph): Possibility to inject arbitrary strings into munin-cgi-graph.log
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: drjohnson1, ingvar, jvanek, kevin
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-22 16:08:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 812893, 812894    
Bug Blocks:    

Description Jan Lieskovsky 2012-04-16 13:32:41 UTC
A security flaw was found in the way munin-cgi-graph and munin-fastcgi-graph tools of the Munin, a network-wide graphing framework performed provided input sanitization. A remote attacker could issue a specially-crafted CGI request, which once processed by munin-cgi-graph / munin-fastcgi-graph tools would allow the attacker to inject terminal escape sequences into the Munin log file, leading to possibility to execute arbitrary commands or overwrite files in such crafted log file was later inspected in terminal honouring such escape sequences.

References:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668666

Reproducer (from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668666#5):
printf 'GET /cgi-bin/munin-cgi-graph/%%0afoo%%0a/x/x-x.png HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n' | nc localhost 80

Comment 1 Jan Lieskovsky 2012-04-16 13:42:28 UTC
This issue affects [*] the versions of the munin package, as shipped with Fedora release of 15 and 16. Please schedule an update once final upstream patch is available.

--

This issue affects [*] the versions of the munin package, as shipped with Fedora EPEL 5 and Fedora EPEL 6. Please schedule an update once final upstream patch is available.

[*] Though particular Debian BTS entry:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668666#5

mentions this would be an issue only for Munin v2.x versions, if I looked into the code correctly, the $comment string (to be added into Munin log) isn't properly sanitized even in earlier versions and thus as such, there shouldn't be
precondition causing this to fail on earlier (current Fedora and EPEL Munin versions) too. Though didn't configure Munin to test and confirm this assumption (-^ based only on source code review).

Comment 2 Jan Lieskovsky 2012-04-16 13:47:29 UTC
Created munin tracking bugs for this issue

Affects: fedora-all [bug 812893]
Affects: epel-all [bug 812894]

Comment 3 Jan Lieskovsky 2012-04-16 13:56:39 UTC
CVE Request:
[2] http://www.openwall.com/lists/oss-security/2012/04/16/5

Comment 4 Kurt Seifried 2012-04-16 19:21:10 UTC
Added CVE as per http://www.openwall.com/lists/oss-security/2012/04/16/6