Hello all,
after processing the agent hello frame, the max-frame-size parameter for the
agent should be set; otherwise HAProxy can send frames longer than the one
that the agent will be able to process - which can lead to the crash of the
agent program.
This should be backported to version 3.1.
Best regards,
--
Miroslav Zagorac
Senior Developer
From 518f7e7cec1df253c9179f23a83eb83f61cf5412 Mon Sep 17 00:00:00 2001
From: Miroslav Zagorac <mzago...@haproxy.com>
Date: Fri, 18 Apr 2025 13:23:16 +0200
Subject: [PATCH] BUG/MINOR: spoe/mux-spop: set agent max-frame-size
After processing the agent hello frame, the max-frame-size parameter for
the agent should be set; otherwise HAProxy can send frames longer than
the one that the agent will be able to process - which can lead to the
crash of the agent program.
This should be backported to version 3.1.
---
src/mux_spop.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mux_spop.c b/src/mux_spop.c
index 7cb49363c..509dbd593 100644
--- a/src/mux_spop.c
+++ b/src/mux_spop.c
@@ -1772,6 +1772,8 @@ static int spop_conn_handle_hello(struct spop_conn *spop_conn)
if (!(flags & SPOE_FL_PIPELINING))
spop_conn->streams_limit = 1;
spop_conn->max_frame_size = (unsigned int)max_frame_size;
+ if (spop_conn->agent != NULL)
+ spop_conn->agent->max_frame_size = spop_conn->max_frame_size;
TRACE_PROTO("SPOP AGENT HELLO frame rcvd", SPOP_EV_RX_FRAME|SPOP_EV_RX_HELLO, spop_conn->conn, 0, 0, (size_t[]){spop_conn->dfl});
--
2.45.2