mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
In issue #1411, @jjiang-stripe reports that do-resolve() sometimes seems to be trying to resolve crap from random memory contents. The issue is that action_prepare_for_resolution() tries to measure the input string by itself using strlen(), while resolv_action_do_resolve() directly passes it a pointer to the sample, omitting the known length. Thus of course any other header present after the host in memory are appended to the host value. It could theoretically crash if really unlucky, with a buffer that does not contain any zero including in the index at the end, and if the HTX buffer ends on an allocation boundary. In practice it should be too low a probability to have ever been observed. This patch modifies the action_prepare_for_resolution() function to take the string length on with the host name on input and pass that down the chain. This should be backported to 2.0 along with commit "MINOR: resolvers: fix the resolv_str_to_dn_label() API about trailing zero".
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
C
98%
Shell
0.9%
Makefile
0.5%
Lua
0.2%
Python
0.2%