First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 102991
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: dswhite42@yahoo.com
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
byterange.patch Patch to fix byterange bug for Apache 2.0.x patch dswhite42@yahoo.com 2005-08-18 12:11 0000 2.87 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 102991 depends on: Show dependency tree
Bug 102991 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-08-18 12:11 0000
There is a bug in Apache 2.0.x that can cause the whole machine to run out of
memory (RAM & swap) under certain circumstances.  The discussion on the Apache
mailing list is here: http://tinyurl.com/7rpzt (there are 8 messages in the
thread).  To summarize:

1) Server owner running Apache 2.0.x sets up a CGI script to transfer a file. 
The script (lets call it http://example.com/download.cgi) can be as simple as a
program that reads a file from the hard drive and outputs it in 1K chunks.

2) User requests http://example.com/download.cgi using a download accelerator
that splits a download into multiple requests to speed up the download.  

3) Apache bug in handling byterange requests causes the apache2 processes to use
up an arbitrary amount of RAM, very likely exhausting all RAM and swap space on
the server.  Note that the amount of memory used can be far greater than the
actual size of the file being download.

This only happens when a download accelerator is used (which makes the byterange
requests) and a CGI program is used on the server side to handle the file transfer.

I'll attach a patch which solves the problem by not allowing byterange requests
under those circumstances.  Once applied, a download accelerator would only be
able to make a single request for the file.  (Byterange requests are still
allowed when the file is downloaded directly, without a CGI script involved - in
which case the download accelerator can still split the request into multiple
requests without impacting the server's memory usage).

This patch is known to work with net-www/apache-2.0.54-r13 .

------- Comment #1 From dswhite42@yahoo.com 2005-08-18 12:11:46 0000 -------
Created an attachment (id=66245) [details]
Patch to fix byterange bug for Apache 2.0.x

------- Comment #2 From dswhite42@yahoo.com 2005-08-18 12:20:24 0000 -------
I should point out that this is Joe Orton's patch for the byterange problem,
fixed in Apache 2.1.5, and backported into the patch file I uploaded so it will
work with Apache 2.0.x .  

See http://issues.apache.org/bugzilla/show_bug.cgi?id=29962 for the bug and
http://svn.apache.org/viewcvs?rev=188797&view=rev for Joe's patch to Apache 2.1.5

------- Comment #3 From Jakub Moc (RETIRED) 2005-08-18 12:42:56 0000 -------
security, can this be considered a vulnerability (like DoS)?

------- Comment #4 From Sune Kloppenborg Jeppesen 2005-08-18 12:58:57 0000 -------
I tend to say yes, apache-bugs please advise. 

------- Comment #5 From Michael Stewart (vericgar) (RETIRED) 2005-08-18 21:33:40 0000 -------
If not a vulnerability, definetly something that should be fixed. It seems
valid
to me (and in fact I may be experiencing the same issues on my server, I just
haven't gotten around to figuring out what exactly is the issue there). I'll
take another look at this tomorrow evening when I am more awake and have more
time.

------- Comment #6 From Michael Stewart (vericgar) (RETIRED) 2005-08-19 18:36:37 0000 -------
New ebuilds commited

Stable/old-style: apache-2.0.54-r9
Unstable/new-style: apache-2.0.54-r14

Here's hoping this is the last security bump before new-style becomes stable
(aiming for 11-Sept-2005), as there are several ebuilds in the tree that expect
<-r10 to be old-style and >=-r10 to be new-style and they will all have to be
changed with another bump to old-style.

------- Comment #7 From Stefan Cornelius (RETIRED) 2005-08-19 23:05:02 0000 -------
Dear arches, please test+stable apache-2.0.54-r9 - thanks.

------- Comment #8 From Michael Hanselmann (hansmi) (RETIRED) 2005-08-20 00:43:24 0000 -------
Stable on ppc and hppa.

------- Comment #9 From Josh Grebe (RETIRED) 2005-08-20 07:10:13 0000 -------
looks good, marked stable on sparc.

------- Comment #10 From Fernando J. Pereda (RETIRED) 2005-08-21 04:47:18 0000 -------
You finally get our shiny keyword ! Marked alpha

Cheers,
Ferdy

------- Comment #11 From Markus Rothe 2005-08-21 11:09:22 0000 -------
stable on ppc64

------- Comment #12 From Luis Medinas (RETIRED) 2005-08-21 12:42:43 0000 -------
Marked Stable on AMD64.

------- Comment #13 From Stefan Cornelius (RETIRED) 2005-08-21 12:50:51 0000 -------
Ok, pretty much ready for GLSA.

------- Comment #14 From Thierry Carrez (RETIRED) 2005-08-21 13:40:53 0000 -------
We should confirm it's considered as a vulnerability first. Security, please
vote on this.

------- Comment #15 From Tavis Ormandy (RETIRED) 2005-08-21 13:56:10 0000 -------
I would vote YES, it doesnt sound that obscure to me. Even a non-skilled 
attacker could identify a vulnerable script and effectively take the machine 
out, no skill would be required to trigger it.

------- Comment #16 From Sune Kloppenborg Jeppesen 2005-08-21 22:04:56 0000 -------
I tend to vote YES also. 

------- Comment #17 From Stefan Cornelius (RETIRED) 2005-08-22 00:26:32 0000 -------
2 said yes, i would be the third, re-requesting GLSA.

------- Comment #18 From Sune Kloppenborg Jeppesen 2005-08-24 22:16:23 0000 -------
GLSA 200508-15 
 
mips please remember to mark stable to benifit from GLSA. 

------- Comment #19 From Hardave Riar (RETIRED) 2005-09-04 04:15:26 0000 -------
Stable on mips.

------- Comment #20 From Tobias Sager 2005-10-15 07:53:44 0000 -------
This is CAN-2005-2728.

First Last Prev Next    No search results available      Search page      Enter new bug