]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEV: haring: bound the ring geometry to the size of the file master
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Aug 2026 16:33:19 +0000 (18:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Aug 2026 16:48:00 +0000 (18:48 +0200)
commitc0b39ea75e76e058b7056ad2614d45e4a0cdac95
tree95d2b2b63a21d2e3dbb2a1127d99c10fd01958bd
parent310a9f39ae993dd8dc384edd22fe559e08d5bf53
DEV: haring: bound the ring geometry to the size of the file

Truncated ring files are not exceptional and the tool wasn't very robust
against them and could easily crash when trying to read past the end of
the mapping. Let's bound the sizes and offsets announced in the header
to the real file size. This also allows to relax some checks that would
reject some malformed files that are now handled as best effort ring v1.

It can be helpful to backport this to stable releases, though no issue
was really reported outside of the dev team.

Reported-by: Claude (ANT-2026-TCDNPXKV)
dev/haring/haring.c