CVE-2012-4504: Buffer Overflow
A buffer overflow flaw was discovered in the libproxy's url::getpac() used to download proxy.pac proxy auto-configuration file. A malicious host hosting proxy.pac, or a man in the middle attacker, could use this flaw to trigger a stack-based buffer overflow in an application using libproxy, if proxy configuration instructed it to download proxy.pac file from a remote HTTP server.
url::getpac() uses a fixed size buffer buffer[] to store content of the proxy.pac file downloaded from a remote server. When filling the buffer, it uses server-supplied content length value, rather than size buffer, as a limit for the size of the input copied into the buffer. Overflow occurs when server provides sufficiently large file and does not use chunked content encoding. The buffer size is checked when using chunked encoding.
http://code.google.com/p/libproxy/source/browse/trunk/libproxy/url.cpp?r=846#462
This issue was introduced upstream with the addition of the chunked encoding support, which first appears in version 0.4.
http://code.google.com/p/libproxy/source/detail?r=489 http://code.google.com/p/libproxy/issues/detail?id=77
Other sources
Stack-based buffer overflow in the url::getpac function in url.cpp in libproxy 0.4.x before 0.4.9 allows remote servers to have an unspecified impact via a large proxy.pac file.
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2012-4504?
CVE-2012-4504 is classified as a high severity vulnerability due to the potential for a stack-based buffer overflow.
How do I fix CVE-2012-4504?
To mitigate CVE-2012-4504, upgrade libproxy to version 0.4.9 or later.
Which versions of libproxy are vulnerable to CVE-2012-4504?
CVE-2012-4504 affects libproxy versions before 0.4.9, including 0.4.0 to 0.4.8.
Can CVE-2012-4504 be exploited remotely?
Yes, CVE-2012-4504 can be exploited remotely by attackers through a malicious proxy.pac file.
What are the potential impacts of CVE-2012-4504?
Exploitation of CVE-2012-4504 can lead to arbitrary code execution, potentially compromising the affected application.