]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cache: always verify the primary hash in get_secondary_entry()
authorWilly Tarreau <w@1wt.eu>
Sun, 24 May 2026 16:48:52 +0000 (18:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 11:13:24 +0000 (13:13 +0200)
commit5cb932826d8dd7e78df19ea8f59a07a744e923e6
treeb7f61167f0e81cf4a9efeafe3f02654abe5a2d2e
parent8bdcc55163c41a390df4f9c85ab5e0d27c9c656a
BUG/MEDIUM: cache: always verify the primary hash in get_secondary_entry()

When checking for secondary entries, the tree is walked within duplicates
of the primary key, only indexed on the first 32 bits, which means that
in case of hash collision, we could start looking for an object and
switch to another one while visiting secondaries. In order to avoid this
we simply need to always check the full primary hash of the entry that
was found.

This should be backported to all stable versions.
src/cache.c