CVE-2011-4415: Input Validation
It was reported [1] that an integer overflow was found in Apache in the appregsub() function called from mod-setenvif. When a header field is mangled using SetEnvIf, the new environment variable data can be multiples of the size of the submitted header field. This would cause appregsub() to overflow the length value in buffer size calculations, leading to the subsequent allocation call of a too-small buffer. Filling this buffer with user-supplied data will lead to a buffer overflow.
Depending on the input data, this can lead to excessive allocation of server memory (resulting in killed processes due to out-of-memory conditions), invalid memory access when copying large amounts of data (which can lead to a termination of the httpd process), or possibly allowing the execution of arbitrary code.
To trigger this flaw, modsetenvif must be enabled (the default) and the attacker needs to be able to place a crafted .htaccess file on the server (which, in most cases, would require local access to the file system or some web interface that allows for writing arbitrary files to the local file system, such as for custom .htaccess files).
There is currently no upstream fix, however to work around the problem, disable modsetenvif.
[1] http://www.halfdog.net/Security/2011/ApacheModSetEnvIfIntegerOverflow/
Other sources
The appregsub function in server/util.c in the Apache HTTP Server 2.0.x through 2.0.64 and 2.2.x through 2.2.21, when the modsetenvif module is enabled, does not restrict the size of values of environment variables, which allows local users to cause a denial of service (memory consumption or NULL pointer dereference) via a .htaccess file with a crafted SetEnvIf directive, in conjunction with a crafted HTTP request header, related to (1) the "len +=" statement and (2) the aprpcalloc function call, a different vulnerability than CVE-2011-3607.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2011-4415?
CVE-2011-4415 has been classified as a moderate severity vulnerability.
How do I fix CVE-2011-4415?
To fix CVE-2011-4415, update your Apache HTTP Server to a version that has patched the integer overflow issue.
Which versions of Apache HTTP Server are affected by CVE-2011-4415?
CVE-2011-4415 affects several versions including 2.0.35, 2.0.37, and up to 2.2.21.
What type of vulnerability is CVE-2011-4415?
CVE-2011-4415 is an integer overflow vulnerability in the mod_setenvif module.
Is CVE-2011-4415 considered critical?
No, CVE-2011-4415 is not considered critical but it still poses a risk and should be addressed.