ID

VAR-E-201111-0031


CVE

cve_id:CVE-2011-3607

Trust: 1.3

cve_id:CVE-2011-4415

Trust: 1.0

sources: BID: 50494 // EXPLOIT-DB: 41769

EDB ID

41769


TITLE

Apache < 2.0.64 / < 2.2.21 mod_setenvif - Integer Overflow - Linux dos Exploit

Trust: 0.6

sources: EXPLOIT-DB: 41769

DESCRIPTION

Apache < 2.0.64 / < 2.2.21 mod_setenvif - Integer Overflow. CVE-2011-4415CVE-2011-3607 . dos exploit for Linux platform

Trust: 0.6

sources: EXPLOIT-DB: 41769

AFFECTED PRODUCTS

vendor:apachemodel:mod setenvifscope:ltversion:2.0.64/<2.2.21

Trust: 1.6

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:9.2

Trust: 0.6

vendor:avayamodel:voice portalscope:eqversion:5.1

Trust: 0.6

vendor:apachemodel:software foundation apachescope:eqversion:2.2

Trust: 0.6

vendor:xeroxmodel:freeflow print server 73.c0.41scope: - version: -

Trust: 0.3

vendor:xeroxmodel:freeflow print server 73.b3.61scope: - version: -

Trust: 0.3

vendor:ubuntumodel:linux lts sparcscope:eqversion:8.04

Trust: 0.3

vendor:ubuntumodel:linux lts powerpcscope:eqversion:8.04

Trust: 0.3

vendor:ubuntumodel:linux lts lpiascope:eqversion:8.04

Trust: 0.3

vendor:ubuntumodel:linux lts i386scope:eqversion:8.04

Trust: 0.3

vendor:ubuntumodel:linux lts amd64scope:eqversion:8.04

Trust: 0.3

vendor:ubuntumodel:linux i386scope:eqversion:11.10

Trust: 0.3

vendor:ubuntumodel:linux amd64scope:eqversion:11.10

Trust: 0.3

vendor:ubuntumodel:linux powerpcscope:eqversion:11.04

Trust: 0.3

vendor:ubuntumodel:linux i386scope:eqversion:11.04

Trust: 0.3

vendor:ubuntumodel:linux armscope:eqversion:11.04

Trust: 0.3

vendor:ubuntumodel:linux amd64scope:eqversion:11.04

Trust: 0.3

vendor:ubuntumodel:linux powerpcscope:eqversion:10.10

Trust: 0.3

vendor:ubuntumodel:linux i386scope:eqversion:10.10

Trust: 0.3

vendor:ubuntumodel:linux armscope:eqversion:10.10

Trust: 0.3

vendor:ubuntumodel:linux amd64scope:eqversion:10.10

Trust: 0.3

vendor:ubuntumodel:linux sparcscope:eqversion:10.04

Trust: 0.3

vendor:ubuntumodel:linux powerpcscope:eqversion:10.04

Trust: 0.3

vendor:ubuntumodel:linux i386scope:eqversion:10.04

Trust: 0.3

vendor:ubuntumodel:linux armscope:eqversion:10.04

Trust: 0.3

vendor:ubuntumodel:linux amd64scope:eqversion:10.04

Trust: 0.3

vendor:slackwaremodel:linux x86 64 -currentscope: - version: -

Trust: 0.3

vendor:slackwaremodel:linux x86 64scope:eqversion:13.37

Trust: 0.3

vendor:slackwaremodel:linuxscope:eqversion:13.37

Trust: 0.3

vendor:slackwaremodel:linux x86 64scope:eqversion:13.1

Trust: 0.3

vendor:slackwaremodel:linuxscope:eqversion:13.1

Trust: 0.3

vendor:slackwaremodel:linux x86 64scope:eqversion:13.0

Trust: 0.3

vendor:slackwaremodel:linuxscope:eqversion:13.0

Trust: 0.3

vendor:slackwaremodel:linuxscope:eqversion:12.2

Trust: 0.3

vendor:slackwaremodel:linuxscope:eqversion:12.1

Trust: 0.3

vendor:slackwaremodel:linuxscope:eqversion:12.0

Trust: 0.3

vendor:slackwaremodel:linux -currentscope: - version: -

Trust: 0.3

vendor:redhatmodel:enterprise linux desktop workstation clientscope:eqversion:5

Trust: 0.3

vendor:redmodel:hat jboss enterprise web server for rhelscope:eqversion:61.0

Trust: 0.3

vendor:redmodel:hat jboss enterprise web server for rhel serverscope:eqversion:51.0

Trust: 0.3

vendor:redmodel:hat enterprise linux workstationscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux serverscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux hpc node optionalscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux hpc nodescope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux desktop optionalscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux desktopscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux desktop clientscope:eqversion:5

Trust: 0.3

vendor:redmodel:hat enterprise linux serverscope:eqversion:5

Trust: 0.3

vendor:oraclemodel:enterprise linuxscope:eqversion:6.2

Trust: 0.3

vendor:oraclemodel:enterprise linuxscope:eqversion:6

Trust: 0.3

vendor:oraclemodel:enterprise linuxscope:eqversion:5

Trust: 0.3

vendor:mandrivamodel:linux mandrake x86 64scope:eqversion:2011

Trust: 0.3

vendor:mandrivamodel:linux mandrakescope:eqversion:2011

Trust: 0.3

vendor:mandrivamodel:linux mandrake x86 64scope:eqversion:2010.1

Trust: 0.3

vendor:mandrivamodel:linux mandrakescope:eqversion:2010.1

Trust: 0.3

vendor:mandrakesoftmodel:enterprise server x86 64scope:eqversion:5

Trust: 0.3

vendor:mandrakesoftmodel:enterprise serverscope:eqversion:5

Trust: 0.3

vendor:ibmmodel:http serverscope:eqversion:7.0.11

Trust: 0.3

vendor:ibmmodel:http serverscope:eqversion:7.0.0.5

Trust: 0.3

vendor:ibmmodel:http serverscope:eqversion:7.0.0.19

Trust: 0.3

vendor:ibmmodel:http serverscope:eqversion:7.0.0.17

Trust: 0.3

vendor:ibmmodel:http serverscope:eqversion:7.0.0.15

Trust: 0.3

vendor:ibmmodel:http serverscope:eqversion:7.0.0.13

Trust: 0.3

vendor:hpmodel:system management homepagescope:eqversion:7.0

Trust: 0.3

vendor:hpmodel:system management homepagescope:eqversion:6.3

Trust: 0.3

vendor:hpmodel:system management homepagescope:eqversion:6.2

Trust: 0.3

vendor:hpmodel:system management homepagescope:eqversion:6.1

Trust: 0.3

vendor:hpmodel:system management homepagescope:eqversion:6.0

Trust: 0.3

vendor:hpmodel:openvms secure web serverscope:eqversion:2.2

Trust: 0.3

vendor:hpmodel:hp-ux b.11.31scope: - version: -

Trust: 0.3

vendor:hpmodel:hp-ux b.11.23scope: - version: -

Trust: 0.3

vendor:hpmodel:hp-ux b.11.11scope: - version: -

Trust: 0.3

vendor:gentoomodel:linuxscope: - version: -

Trust: 0.3

vendor:fujitsumodel:interstage studio standard-j editionscope:eqversion:9.2

Trust: 0.3

vendor:fujitsumodel:interstage studio standard-j editionscope:eqversion:9.1

Trust: 0.3

vendor:fujitsumodel:interstage studio standard-j editionscope:eqversion:9.0

Trust: 0.3

vendor:fujitsumodel:interstage studio standard-j editionscope:eqversion:8.0.1

Trust: 0.3

vendor:fujitsumodel:interstage studio standard-j edition bscope:eqversion:9.1.0

Trust: 0.3

vendor:fujitsumodel:interstage studio enterprise editionscope:eqversion:9.1

Trust: 0.3

vendor:fujitsumodel:interstage studio enterprise editionscope:eqversion:9.0

Trust: 0.3

vendor:fujitsumodel:interstage studio enterprise editionscope:eqversion:8.0.1

Trust: 0.3

vendor:fujitsumodel:interstage business application server enterprise editionscope:eqversion:8.0

Trust: 0.3

vendor:fujitsumodel:interstage apworks modelers-j editionscope:eqversion:7.0

Trust: 0.3

vendor:fujitsumodel:interstage apworks modelers-j editionscope:eqversion:6.0

Trust: 0.3

vendor:fujitsumodel:interstage application server standard-j editionscope:eqversion:9.2

Trust: 0.3

vendor:fujitsumodel:interstage application server standard-j editionscope:eqversion:9.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server standard-j editionscope:eqversion:9.0

Trust: 0.3

vendor:fujitsumodel:interstage application server standard-j editionscope:eqversion:8.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server standard-j editionscope:eqversion:8.0

Trust: 0.3

vendor:fujitsumodel:interstage application server standard-j edition 9.1.0bscope: - version: -

Trust: 0.3

vendor:fujitsumodel:interstage application server standard editionscope:eqversion:5.0

Trust: 0.3

vendor:fujitsumodel:interstage application server plus developerscope:eqversion:5.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server plus developerscope:eqversion:7.0

Trust: 0.3

vendor:fujitsumodel:interstage application server plus developerscope:eqversion:6.0

Trust: 0.3

vendor:fujitsumodel:interstage application server plusscope:eqversion:7.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server plusscope:eqversion:6.0.2

Trust: 0.3

vendor:fujitsumodel:interstage application server plusscope:eqversion:6.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server plusscope:eqversion:5.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server plusscope:eqversion:6.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:9.1

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:9.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:9.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:8.0.3

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:8.0.2

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:8.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:7.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:6.0.2

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:6.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:5.0.1

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:7.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:6.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise edition l11scope:eqversion:5.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise edition l10bscope:eqversion:5.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise edition l10ascope:eqversion:5.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise edition l10scope:eqversion:5.0

Trust: 0.3

vendor:fujitsumodel:interstage application server enterprise editionscope:eqversion:5.0

Trust: 0.3

vendor:debianmodel:linux sparcscope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux s/390scope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux powerpcscope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux mipsscope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux ia-64scope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux ia-32scope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux armscope:eqversion:6.0

Trust: 0.3

vendor:debianmodel:linux amd64scope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:voice portalscope:eqversion:5.1.2

Trust: 0.3

vendor:avayamodel:voice portalscope:eqversion:5.1.1

Trust: 0.3

vendor:avayamodel:voice portal sp1scope:eqversion:5.1

Trust: 0.3

vendor:avayamodel:voice portal sp2scope:eqversion:5.0

Trust: 0.3

vendor:avayamodel:voice portal sp1scope:eqversion:5.0

Trust: 0.3

vendor:avayamodel:voice portalscope:eqversion:5.0

Trust: 0.3

vendor:avayamodel:ip office application serverscope:eqversion:8.0

Trust: 0.3

vendor:avayamodel:ip office application serverscope:eqversion:7.0

Trust: 0.3

vendor:avayamodel:ip office application serverscope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:ip office application serverscope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:6.1.3

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:6.1.2

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:6.1.1

Trust: 0.3

vendor:avayamodel:aura session manager sp2scope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:aura session manager sp1scope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:aura session manager sp1scope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura session manager sp2scope:eqversion:5.2

Trust: 0.3

vendor:avayamodel:aura session manager sp1scope:eqversion:5.2

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:5.2

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:1.1

Trust: 0.3

vendor:avayamodel:aura session managerscope:eqversion:1.0

Trust: 0.3

vendor:avayamodel:aura messagingscope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:aura messagingscope:eqversion:6.0.1

Trust: 0.3

vendor:avayamodel:aura messagingscope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura experience portalscope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura communication manager utility servicesscope:eqversion:6.2

Trust: 0.3

vendor:avayamodel:aura communication manager utility servicesscope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:aura communication manager utility servicesscope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura communication managerscope:eqversion:6.0.1

Trust: 0.3

vendor:avayamodel:aura communication managerscope:eqversion:6.0

Trust: 0.3

vendor:avayamodel:aura application enablement servicesscope:eqversion:5.2.1

Trust: 0.3

vendor:avayamodel:aura application enablement servicesscope:eqversion:6.1.1

Trust: 0.3

vendor:avayamodel:aura application enablement servicesscope:eqversion:6.1

Trust: 0.3

vendor:avayamodel:aura application enablement servicesscope:eqversion:5.2.3

Trust: 0.3

vendor:avayamodel:aura application enablement servicesscope:eqversion:5.2.2

Trust: 0.3

vendor:avayamodel:aura application enablement servicesscope:eqversion:5.2

Trust: 0.3

vendor:applemodel:mac os serverscope:eqversion:x10.7.3

Trust: 0.3

vendor:applemodel:mac os serverscope:eqversion:x10.7.2

Trust: 0.3

vendor:applemodel:mac os serverscope:eqversion:x10.7.1

Trust: 0.3

vendor:applemodel:mac os serverscope:eqversion:x10.7

Trust: 0.3

vendor:applemodel:mac os serverscope:eqversion:x10.6.8

Trust: 0.3

vendor:applemodel:mac osscope:eqversion:x10.7.4

Trust: 0.3

vendor:applemodel:mac osscope:eqversion:x10.7.3

Trust: 0.3

vendor:applemodel:mac osscope:eqversion:x10.7.2

Trust: 0.3

vendor:applemodel:mac osscope:eqversion:x10.7.1

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.15

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.14

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.13

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.12

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.11

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.10

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.9

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.8

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.6

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.5

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.4

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.3

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.2

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.9

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.8

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.7

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.6

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.5

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.4

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.3

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.2

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1.1

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.1

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.63

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.61

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.60

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.59

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.58

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.57

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.56

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.55

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.54

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.53

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.52

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.51

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.50

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.49

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.48

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.47

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.46

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.45

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.44

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.43

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.42

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.41

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.40

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.39

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.38

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.37

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.36

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.35

Trust: 0.3

vendor:apachemodel:software foundation apache -betascope:eqversion:2.0.34

Trust: 0.3

vendor:apachemodel:software foundation apache -betascope:eqversion:2.0.32

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.32

Trust: 0.3

vendor:apachemodel:software foundation apache -betascope:eqversion:2.0.28

Trust: 0.3

vendor:apachemodel:software foundation apache betascope:eqversion:2.0.28

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.28

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.9

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.21

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.18

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.16

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.2.1

Trust: 0.3

vendor:apachemodel:software foundation apachescope:eqversion:2.0.64

Trust: 0.3

vendor:ibmmodel:http serverscope:neversion:7.0.0.21

Trust: 0.3

vendor:apachemodel:software foundation apachescope:neversion:2.2.22

Trust: 0.3

sources: BID: 50494 // EXPLOIT-DB: 41769 // EDBNET: 92323

EXPLOIT

Source: http://www.halfdog.net/Security/2011/ApacheModSetEnvIfIntegerOverflow/

## Background

The Apache HTTP Server is an open-source HTTP server for modern operating systems including UNIX, Microsoft Windows, Mac OS/X and Netware. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services observing the current HTTP standards. Apache has been the most popular web server on the Internet since April of 1996.

## Problem Description

During routine testing, an integer overflow was found in apache2-mpm-worker 2.2.19 in the function ap_pregsub called from mod-setenvif. The issue affects all versions from 2.0.x to 2.0.64 and 2.2.x to 2.2.21, not depending on the mode of operation (worker, prefork, ..). When a header field is mangled using SetEnvIf, the new environment variable data can be multiples of the size of the submitted header field. When ap_pregsub from server/util.c calculates the buffer size using

else if (no < nmatch && pmatch[no].rm_so < pmatch[no].rm_eo) {
len += pmatch[no].rm_eo - pmatch[no].rm_so;
}

the length value overflows and is used in a subsequent allocation call of buffer too small:

dest = dst = apr_pcalloc(p, len + 1);

The subsequent filling of the buffer with user-supplied data leads to buffer overflow. Even without overflowing, the allocation of significant amounts of server memory for excessivly large environment variables should be considered a problem also.

## Impact

Depending on the input data, exploitation of this issue leads to:

- allocation of large quantities of server memory, killing processes due to out-of-memory conditions or reducing system performance to crawl due to massive swapping.
- invalid memory access when copying more than 4GB of data into the much smaller buffer. Since the loop copying the data uses only stack and libc-heap, not the apr pool, for source and destination addresses, copy process is linear, starting at low address and pool is separated by unaccessible memory pages for protection on linux. Usually this will only cause termination of the apache process, which is restarted automatically. The impact is increased system load and DOS-condition while under attack.
- At least with multi-threaded server (worker), arbitrary code execution is proven, on single-threaded varians, the use of crafted stop-sequences might allow code execution even on these systems. On many systems ASLR will reduce the efficiency of the attack, but even with ASLR enabled, the automatic restart of processes allows to probe for all possible mappings of libc. An attacker, that has already access to another account on the machen, might be able to use ApacheNoFollowSymlinkTimerace to learn the memory map of the process, thus having the posibility to reach nearly 100% efficiency.

To trigger this issue, mod_setenvif must be enabled and the attacker has to be able to place a crafted .htaccess file on the server. Since the triggering of the exploit might depend on a magic header field, the malicious .htaccess might be placed as backdoor in web-content .zip files or could be stored dormant on the server until activation by the corresponding magic request.

Source: http://www.halfdog.net/Security/2011/ApacheModSetEnvIfIntegerOverflow/DemoExploit.html

## Starting Point

During routine testing, an integer overflow in apache2-mpm-worker 2.2.19 mod-setenvif was found. The crash occured when mangling request headers using a crafted .htaccess-file (http://www.halfdog.net/Security/2011/ApacheModSetEnvIfIntegerOverflow/SingleThread-htaccess). The broken code was ap_pregsub in server/util.c, where the buffer size of a new header field could overflow, the value was then used for memory allocation. When copying data to the buffer an, overwrite of the an apr (apache portable runtime) memory-pool boundaries occured, similar to standard heap buffer overflows.

## Outline of Exploit

The main goals creating the exploit were:

- Exploit has to be triggerable via HTTP GET requests only
- Exploit data has to be 0-byte free to have valid HTTP-protocol
- No alternative way of heap-spraying is used, e.g. GET + content-length. All variants I knew of had much too low efficiency
- Use libc for ROP, although all libc-addresses start with 0-byte, which cannot be sent via HTTP
- Rely only on libc address guess, but not heap/stack address guess, unless guess could be made nearly 100% reliable
- Use the already open HTTP-connections and turn them into command connections on the fly
- Have exploit in less than 256 bytes

Two different exploit layouts were developed. The first one used multiple threads, so that one was overwriting the data of the second thread before hitting the end of the memory area. Precise timing was essential to get shell access.

The second one used a more crafted substitution expression, stopping the copy in a single thread by modifying the regular expression currently processed in the thread. Since there is race condition involved, this exploit was far more reliable than the first one.

Trust: 1.0

sources: EXPLOIT-DB: 41769

EXPLOIT LANGUAGE

txt

Trust: 0.6

sources: EXPLOIT-DB: 41769

PRICE

free

Trust: 0.6

sources: EXPLOIT-DB: 41769

TYPE

Integer Overflow

Trust: 1.6

sources: EXPLOIT-DB: 41769 // EDBNET: 92323

CREDITS

halfdog

Trust: 0.6

sources: EXPLOIT-DB: 41769

EXTERNAL IDS

db:EXPLOIT-DBid:41769

Trust: 1.6

db:NVDid:CVE-2011-3607

Trust: 1.3

db:NVDid:CVE-2011-4415

Trust: 1.0

db:EDBNETid:92323

Trust: 0.6

db:BIDid:50494

Trust: 0.3

sources: BID: 50494 // EXPLOIT-DB: 41769 // EDBNET: 92323

REFERENCES

url:http://www.halfdog.net/security/2011/apachemodsetenvifintegeroverflow/

Trust: 1.3

url:https://nvd.nist.gov/vuln/detail/cve-2011-3607

Trust: 1.0

url:https://nvd.nist.gov/vuln/detail/cve-2011-4415

Trust: 1.0

url:https://www.exploit-db.com/exploits/41769/

Trust: 0.6

url:http://www.halfdog.net/security/2011/apachemodsetenvifintegeroverflow/demoexploit.html

Trust: 0.3

url:https://support.avaya.com/css/p8/documents/100155944

Trust: 0.3

url:http://h20565.www2.hp.com/portal/site/hpsc/public/kb/docdisplay/?docid=emr_na-c03231301&ac.admitted=1332965374461.876444892.492883150

Trust: 0.3

url:http://www-01.ibm.com/support/docview.wss?uid=swg27014506

Trust: 0.3

url:https://h20565.www2.hp.com/portal/site/hpsc/template.page/public/kb/docdisplay/?javax.portlet.tpst=ba847bafb2a2d782fcbb0710b053ce01&javax.portlet.prp_ba847bafb2a2d782fcbb0710b053ce01=wsrp-navigational

Trust: 0.3

url:http://support.avaya.com/css/p8/documents/100158872

Trust: 0.3

url:http://www-01.ibm.com/support/docview.wss?uid=swg1pm50426

Trust: 0.3

url:http://httpd.apache.org/

Trust: 0.3

url:http://support.avaya.com/css/p8/documents/100157326

Trust: 0.3

sources: BID: 50494 // EXPLOIT-DB: 41769 // EDBNET: 92323

SOURCES

db:BIDid:50494
db:EXPLOIT-DBid:41769
db:EDBNETid:92323

LAST UPDATE DATE

2022-07-27T09:25:03.711000+00:00


SOURCES UPDATE DATE

db:BIDid:50494date:2015-04-13T20:49:00

SOURCES RELEASE DATE

db:BIDid:50494date:2011-11-02T00:00:00
db:EXPLOIT-DBid:41769date:2011-11-02T00:00:00
db:EDBNETid:92323date:2017-03-29T00:00:00