]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: cache: Seed cache primary hash
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 26 Aug 2026 15:08:26 +0000 (17:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 26 Aug 2026 16:26:27 +0000 (18:26 +0200)
commitbb422f8e184e4671bda16c0e253fd310b686cfa8
tree1c123416bcc945490e3bc9305ecf9a3a4a5c7601
parentc813ccd944df3261c09afb83cde4b1a4bfb06af4
BUG/MINOR: cache: Seed cache primary hash

Since only the first 32bits of the primary hash built in sha1_hosturi
are used as key in the cache tree and we reject entries when a hash
collision happens, it would be possible for an attacher to fill a
specific cache entry with "wrong" data and prevent actual caching.
Since a cache seed was already built for secondary key hashes we might
as well use it for primary hashes as well.

Reported-by: Claude (ANT-2026-9WRFEVJ3)
This patch should be backported to all stable branches.
src/cache.c