You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2018/05/02 08:32:35 UTC
[Bug 62344] New: Failing variable interpolation and memory
allocation failure in ProxyHTMLURLMap
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
Bug ID: 62344
Summary: Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Product: Apache httpd-2
Version: 2.4.33
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy_html
Assignee: bugs@httpd.apache.org
Reporter: ewald@mailbox.org
Target Milestone: ---
Created attachment 35903
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35903&action=edit
Fix variable interpolation and memory allocation failure in ProxyHTMLURLMap
The attached file ProxyHTMLURLMap-memory-allocation-failure.patch fixes a
potential memory allocation failure in ProxyHTMLURLMap in conjunction with a
failed variable interpolation.
To reproduce, enable variable interpolation in ProxyHTMLURLMap and use a
pattern with a variable and the pipe symbol | after the variable. For example:
SetEnv env replaced
ProxyHTMLEnable On
ProxyHTMLInterp On
ProxyHTMLURLMap / /${env}_and_|/subfolder" V
The problem is that in mod_proxy_html.c, interpolate_var(), searching for |
isn't restricted to within the variable ${...}.
This leads to a wrong variable interpolation and, depending on your
environment, a memory allocation failure.
If you enable trace1 logging for mod_proxy_html you will see something like
this:
[...] mod_proxy_html.c(744): Interpolating env}_and_ => /subfolder"
The attached patch fixes this:
[...] mod_proxy_html.c(750): Interpolating env => replaced
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
--- Comment #4 from Micha Lenk <mi...@lenk.info> ---
Awesome, thanks for proposing the backport.
Just a comment on the mentioned memory allocation failure: The reason is the
pointer arithmetic, which in the described error case results in a negative
length, which then seems to get casted to a very big positive number. If the
system is short on memory, it won't be able to provide the requested amount of
memory. That is at least how I understood what is happening in the error case.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
nsg-apache-httpd-maintenance@sophos.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nsg-apache-httpd-maintenanc
| |e@sophos.com
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Christophe JAILLET <ch...@wanadoo.fr> ---
This have been backported in r1833840.
This is part of 2.4.34.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
Yann Ylavic <yl...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|PatchAvailable |FixedInTrunk
--- Comment #1 from Yann Ylavic <yl...@gmail.com> ---
Thanks, committed to trunk in r1830746.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
--- Comment #3 from Yann Ylavic <yl...@gmail.com> ---
Proposed in r1830776.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
--- Comment #2 from Micha Lenk <mi...@lenk.info> ---
Yann, can you please propose this for backporting to 2.4.x?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 62344] Failing variable interpolation and memory allocation
failure in ProxyHTMLURLMap
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62344
Micha Lenk <mi...@lenk.info> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
CC| |micha@lenk.info
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org