Bug 803918 (CVE-2012-1181) - CVE-2012-1181 mod_fcgid 2.3.6 does not respect configured FcgidMaxProcessesPerClass in VirtualHost
Summary: CVE-2012-1181 mod_fcgid 2.3.6 does not respect configured FcgidMaxProcessesPe...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2012-1181
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 803919 803921
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-16 00:47 UTC by Kurt Seifried
Modified: 2019-09-29 12:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-16 10:13:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Kurt Seifried 2012-03-16 00:47:42 UTC
Daniel Kahn Gillmor dkg reports:

Version 2.3.6 of mod-fcgid (the current published version from ASF according to [0]) has a known problem that FcgidMaxProcessesPerClass directives are not honored when they appear inside a VirtualHost stanza.

This is presents a risk for a denial of service because it means that a remote attacker can violate the intent of the admin and overwhelm the server running fcgid.

Could a CVE be assigned for this vulnerability?

If the admin declares that a given virtualhost should be limited to X fastcgi processes (often in order to constrain RAM usage by the vhost), any remote user can issue X+1 (or 10X, or whatever) concurrent GET requests, which defeats the documented limit, and can result in heavy swap or the oom-killer, which can cause a DoS on other services on the host.

This bug has been fixed since the release of 2.3.6 in upstream's svn (r1037727 of https://svn.apache.org/repos/asf/httpd/mod_fcgid/trunk) with a narrowly-targeted one-line patch:

--- modules/fcgid/fcgid_spawn_ctl.c    (revision 1037726)
+++ modules/fcgid/fcgid_spawn_ctl.c    (revision 1037727)
@@ -178,7 +178,7 @@
         if (current_node->inode == command->inode
             && current_node->deviceid == command->deviceid
             && !strcmp(current_node->cmdline, command->cmdline)
-            && current_node->vhost_id == sconf->vhost_id
+            && current_node->vhost_id == command->vhost_id
             && current_node->uid == command->uid
             && current_node->gid == command->gid)
             break;

But this patch hasn't made it to any released version.

Debian has plans to release a Debian Security Advisory for the issue and will resolve it with the above patch.

This problem is also documented at:

 https://issues.apache.org/bugzilla/show_bug.cgi?id=49902
 http://bugs.debian.org/615814

Regards,

    --dkg

[0] https://httpd.apache.org/mod_fcgid/

Comment 1 Kurt Seifried 2012-03-16 00:54:17 UTC
Created mod_fcgid tracking bugs for this issue

Affects: fedora-all [bug 803919]

Comment 2 Kurt Seifried 2012-03-16 00:59:09 UTC
Created mod_fcgid tracking bugs for this issue

Affects: epel-all [bug 803921]

Comment 3 Paul Howarth 2012-03-16 09:06:21 UTC
This issue was previously reported and fixed in Fedora and EPEL: Bug #783742

Comment 4 Tomas Hoger 2012-03-16 09:53:38 UTC
(In reply to comment #3)
> This issue was previously reported and fixed in Fedora and EPEL: Bug #783742

If they are fixed, it's ok to close:dupe bug 803919 and 803921 against that bug. There's no mention of EPEL-5 fix in bug 783742.  Does that remain affected?

Comment 5 Paul Howarth 2012-03-16 09:59:02 UTC
EPEL-5 has mod_fcgid version 2.2. My understanding is that this bug is a regression introduced in 2.3.6 and so EPEL-5 should not be affected.

Comment 6 Paul Howarth 2012-03-16 10:04:24 UTC
If you look at the upstream bug report (https://issues.apache.org/bugzilla/show_bug.cgi?id=49902) you'll see that the original reporter noted that 2.2 did not suffer from this problem, so I can safely say that EPEL-5 is not affected.

Comment 7 Tomas Hoger 2012-03-16 10:13:14 UTC
Ok, thank you!


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