]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-h2: reject non-numeric values in the tune.h2 keywords
authorMartin Mirchev <mirchevmartin2203@gmail.com>
Wed, 18 Nov 2026 12:36:59 +0000 (20:36 +0800)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Nov 2026 11:36:58 +0000 (12:36 +0100)
commit8475b372cd35519d6aad4eaeb6312abe8d703a2a
tree00e9e80b2c16a6506a2b6be954773d3ac630431e
parent795b4688ef325242fc9a645e411ccae1cdd596a1
BUG/MINOR: mux-h2: reject non-numeric values in the tune.h2 keywords

The tune.h2 numeric keywords are parsed with atoi(), so trailing garbage
and non-numeric values are silently accepted: "tune.h2.max-frame-size
16384x" sets 16384, "tune.h2.fe.max-total-streams x" and
"tune.h2.fe.glitches-threshold x" set 0, which means "unlimited" for both,
"tune.h2.header-table-size 8192k" sets 8192 and a missing glitches value
is taken as 0. The same applies to initial-window-size,
max-concurrent-streams (including its "rq-load" and "min" values) and the
max-{frames,rst}-at-once keywords, where a negative value is also silently
turned into a huge unsigned limit.

Parse these values with strtol() and reject empty values, trailing
characters and values that do not fit in an int, keeping the existing
range checks and error messages. max-{frames,rst}-at-once now also reject
negative values.

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