Apache HTTP Server CVE-2011-3192 Denial Of Service Vuln

General help with the Plesk control panel

Apache HTTP Server CVE-2011-3192 Denial Of Service Vuln

Postby Alan » Mon Sep 19, 2011 9:13 am

Apache HTTP Server CVE-2011-3192 Denial Of Service Vulnerability
Article ID: 112171
Last Review: Sep, 17 2011
Views:
APPLIES TO:

Parallels Plesk Panel for Linux/Unix

Symptoms
Apache HTTP Server CVE-2011-3192 Denial Of Service Vulnerability
CVE-2011-3192 http://www.securityfocus.com/bid/49303/info

How to check that your Apache is affected.

Run following command
# curl -I -H "Range: bytes=0-1,5-0,5-1,5-2,5-3,5-4,5-5,5-6,5-7,5-8,5-9,5-10,5-11,5-12,5-13,5-14,5-15,5-16,5-17,5-18,5-19" -s <your_domain> | grep Partial

If you see message 206 Partial Content in output - your Apache is vulnerable.
Current state of problem
All Parallels Plesk Panel versions are affected by this Apache vulnerability.

How it can be fixed:

- Plesk Panel 10.2 and 10.3 versions for CentOS. You can use two possible Apache installations here:

1. WITHOUT "Apache with SNI support". In this case, you should use Apache updates from OS vendor repository.
2. WITH "Apache with SNI support" In this case, you can upgrade Apache with SNI support on CentOS by Plesk Autoinstaller using following command:
# /usr/local/psa/admin/bin/autoinstaller --select-release-current --upgrade-installed-components

If you have Plesk Parallels Virtuozzo Containers, you can update all templates on node with:
# vzpkg update

If you need to update Apache in pp-apache-sni template for separate containers, you should use following command:
# vzpkg update Container_ID pp-apache-sni

For all other OSes use Apache version 2.2.20 from OS vendor or use solutions described below.

- Plesk Panel 9.x versions can be fixed with Apache version 2.2.20 from OS vendor or with described below solutions. And you should install updates for Apache from OS vendor's repositories when it will be available.

- Plesk Panel 8.6 and older versions have two Apaches - one for admin's interface and one for user's domains. Both of them are vulnerable. Special MU#3 only for Plesk Panel 8.6 for fixing this vulnerability for admin's Apache is available now. Client's Apache should be updated by vendor's package. All older Plesk Panel versions can be fixed by use Apache version 2.2.20 from OS vendor or with solutions described below.
For Plesk versions older than 8.6, you can independently close vulnerability in admin's Apache. Use the following method:

1. Open file /usr/local/psa/admin/conf/httpsd.conf
2. At the end of section <VirtualHost *:8443> </VirtualHost> and <VirtualHost *:8880> </VirtualHost>

add lines:

# Reject request when more than 5 ranges in the Range: header.
# CVE-2011-3192
#
RewriteEngine on
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]

It should look like:

<VirtualHost *:8443>
...
...
...

# Reject request when more than 5 ranges in the Range: header.
# CVE-2011-3192
#
RewriteEngine on
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]
</VirtualHost>

<VirtualHost *:8880>
...
...
...
# Reject request when more than 5 ranges in the Range: header.
# CVE-2011-3192
#
RewriteEngine on
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]
</VirtualHost>
Resolution
Here are several immediate options to mitigate this issue:

1) Use SetEnvIf or mod_rewrite to detect a large number of ranges and then either ignore the Range: header or reject the request.

Option 1: (Apache 2.0 and 2.2)

# Drop the Range header when more than 5 ranges.
# CVE-2011-3192
SetEnvIf Range (,.*?){5,} bad-range=1
RequestHeader unset Range env=bad-range

# optional logging.
CustomLog logs/range-CVE-2011-3192.log common env=bad-range

Option 2: (Also for Apache 1.3)

# Reject request when more than 5 ranges in the Range: header.
# CVE-2011-3192
#
RewriteEngine on
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]

The number 5 is arbitrary. Several 10's should not be an issue and may be required for sites which, for example, serve PDFs to very high-end eReaders or use things such as complex http-based video streaming.

2) Limit the size of the request field to a few hundred bytes. Note that while this keeps the offending Range header short - it may break other headers; such as sizeable cookies or security fields.

LimitRequestFieldSize 200

Note that as the attack evolves in the field you are likely to have to further limit this and/or impose other LimitRequestFields limits.

See: http://httpd.apache.org/docs/2.2/mod/co ... tfieldsize

3) Use mod_headers to completely dis-allow the use of Range headers:

RequestHeader unset Range

Note that this may break certain clients - such as those used for e-Readers and progressive/http-streaming video.

4) Deploy a Range header count module as a temporary stopgap measure:

http://people.apache.org/~dirkx/mod_rangecnt.c

Precompiled binaries for some platforms are available at:

http://people.apache.org/~dirkx/BINARIES.txt

5) Apply any of the current patches under discussion - such as:

http://mail-archives.apache.org/mod_mbo ... ail.com%3e
Additional information
Note that Parallels deliver Apache for CentOS only since Parallels Plesk Panel 10.2 version. Apache on other OS’ and old Parallels Plesk Panels (< 10.2 versions) won’t be updated by Parallels Plesk repository. You should apply one of provided above workarounds and wait for native OS package from vendor's repository.
After applying any Apache updates or provided workarounds make sure that your Apache is not vulnerable with curl command from Symptoms.



http://kb.parallels.com/en/112171
Alan
 
Posts: 220
Joined: Sat Dec 11, 2004 4:35 pm
Location: Vancouver, BC

Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron