]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-spop: match the AGENT-HELLO and AGENT-DISCONNECT keys exactly
authorMartin Mirchev <mirchevmartin2203@gmail.com>
Wed, 18 Nov 2026 12:34:24 +0000 (20:34 +0800)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Nov 2026 11:36:58 +0000 (12:36 +0100)
commitd77d76a440459e9d9a45e728257487d9a51ca59d
tree22ba6a1e279e580312ead2d30117f147d5830b40
parent20bb44a841f88cb9fdd802abfe6cc79decfadc3d
BUG/MINOR: mux-spop: match the AGENT-HELLO and AGENT-DISCONNECT keys exactly

The K/V keys of the AGENT-HELLO and AGENT-DISCONNECT frames are compared
with "sz >= strlen(KEY) && !memcmp(str, KEY, strlen(KEY))", which is a
prefix match: an agent sending "max-frame-size-bogus" (or "versionX",
"capabilitiesX", "status-codeX") has the item treated as the mandatory
one. With an invalid value under "max-frame-size-bogus", haproxy closes the
connection with "max-frame-size too big or too small", exactly as for the
real key, while a key sharing no prefix is ignored as it should be.

Compare the whole key instead. The commented-out "message" check is
updated the same way.

This should be backported to all versions with mux-spop (3.1+).
src/mux_spop.c