haproxy public development tree
Go to file
Remi Tricot-Le Breton 6b69512332 BUG/MEDIUM: cache: Fix crash when deleting secondary entry
When a cache is "cold" and multiple clients simultaneously try to access
the same resource we must forward all the requests to the server. Next,
every "duplicated" response will be processed in http_action_store_cache
and we will try to cache every one of them regardless of whether this
response was already cached. In order to avoid having multiple entries
for a same primary key, the logic is then to first delete any
preexisting entry from the cache tree before storing the current one.
The actual previous response content will not be deleted yet though
because if the corresponding row is detached from the "avail" list it
might still be used by a cache applet if it actually performed a lookup
in the cache tree before the new response could be received.

This all means that we can end up using a valid row that references a
cache_entry that was already removed from the cache tree. This does not
pose any problem in regular caches (no 'vary' mechanism enabled) because
the applet only works on the data and not the 'cache_entry' information,
but in the "vary" context, when calling 'http_cache_applet_release' we
might call 'delete_entry' on the given entry which in turn tries to
iterate over all the secondary entries to find the right one in which
the secondary entry counter can be updated. We would then call
eb32_next_dup on an entry that was not in the tree anymore which ended
up crashing.

This crash was introduced by "48f81ec09 : MAJOR: cache: Delay cache
entry delete in reserve_hot function" which added the call to
"release_entry" in "http_cache_applet_release" that ended up crashing.

This issue was raised in GitHub #2417.
This patch must be backported to branch 2.9.
2024-01-24 18:01:30 +01:00
.github CI: github: update wolfSSL to 5.6.6 2024-01-12 17:48:22 +01:00
addons MINOR: ot: logsrv struct becomes logger 2024-01-09 11:40:41 +01:00
admin MINOR: acme.sh: don't use '*' in the filename for wildcard domain 2023-12-04 11:53:50 +01:00
dev DEV: h2: support hex-encoded data sequences in mkhdr 2024-01-12 18:59:59 +01:00
doc MINOR: connection: add sample fetches to report per-connection glitches 2024-01-18 17:21:44 +01:00
examples CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
include BUILD: quic: Fix build error when building QUIC against libressl. 2024-01-24 15:37:40 +01:00
reg-tests MINOR: connection: add sample fetches to report per-connection glitches 2024-01-18 17:21:44 +01:00
scripts SCRIPTS: mk-patch-list: produce a list of patches 2023-12-18 20:50:51 +01:00
src BUG/MEDIUM: cache: Fix crash when deleting secondary entry 2024-01-24 18:01:30 +01:00
tests Revert "MAJOR: import: update mt_list to support exponential back-off" 2023-09-15 17:13:43 +02:00
.cirrus.yml CI: cirrus-ci: display gdb bt if any 2023-09-22 08:28:30 +02:00
.gitattributes
.gitignore
.mailmap
.travis.yml
BRANCHES
BSDmakefile
CHANGELOG [RELEASE] Released version 3.0-dev1 2024-01-06 14:09:35 +01:00
CONTRIBUTING
INSTALL DOC: INSTALL: require at least WolfSSL 5.6.6 2024-01-12 17:48:45 +01:00
LICENSE
MAINTAINERS
Makefile REORG: ssl: move 'generate-certificates' code to ssl_gencert.c 2024-01-12 17:40:42 +01:00
README
SUBVERS
VERDATE [RELEASE] Released version 3.0-dev1 2024-01-06 14:09:35 +01:00
VERSION [RELEASE] Released version 3.0-dev1 2024-01-06 14:09:35 +01:00

README

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)