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

Created:

2016-11-16 12:44:39 UTC

Modified:

2017-07-11 00:18:12 UTC

1

Was this article helpful?


Have more questions?

Submit a request

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

Applicable to:

  • Plesk 12.0 for Linux

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

Linux :

# 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

Windows :

> curl -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" -skLi https://<server>:8443
HTTP/1.1 206 Partial Content
Date: Tue, 03 Jul 2012 20:06:10 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified: Tue, 03 Jul 2012 20:06:11 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="NON COR CURa ADMa OUR NOR UNI COM NAV STA"
Set-Cookie: PLESKSESSID=c72c012af846539e93a511dcb628e906; path=/
X-UA-Compatible: IE=EmulateIE7
Content-Length: 1660
Content-Type: multipart/byteranges; boundary=4c3f27219d7f9304

--4c3f27219d7f9304
Content-type: text/html; charset=UTF-8
Content-range: bytes 0-1/973`If you see message **206 Partial Content **in output - your Apache is vulnerable.

Current state of problem

All Plesk versions are affected by this Apache vulnerability.

How it can be fixed:

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

  • WITHOUT "Apache with SNI support". In this case, you should use Apache updates from OS vendor repository.

  • 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 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 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 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 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 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 ( “%plesk\ dir%\\admin\\httpd.conf” for Windows)

  1. 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>

NOTE: There is no VirtualHost for port :8443 on Plesk for Windows– this service is in main configuration and rewrite rules for it should be put before line which starts with #BEGIN\_HTTP\_PORT

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/core.html#limitrequestfieldsize

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\_mbox/httpd-dev/201108.mbox/%3cCAAPSnn2PO-d-C4nQt\_TES2RRWiZr7urefhTKPWBC1b+K1Dqc7g@mail.gmail.com%3e

Additional information

Note that Plesk delivers Apache for CentOS only since Plesk 10.2 version. Apache on other OS’ and old Plesk panels (< 10.2 versions) will not be updated by 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.

We can verify this from the changelog of the rpm package also as like the following.

[root@Server ~]# rpm -q --changelog httpd | grep -i cve-2011-3192- add security fix for CVE-2011-3192 (#733063, #736592)[root@Server ~]#

Have more questions? Submit a request
Please sign in to leave a comment.