]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: h3: fix BUG_ON() crash with glitch on htx_set_eom() failure
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 19 Oct 2026 12:04:07 +0000 (14:04 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Oct 2026 08:51:47 +0000 (10:51 +0200)
commitc2d82a20b36edf711ecc3626dd47a3e5fa5f7306
tree340f91b8392b5b96f0f10bfe91303533bfd895c0
parent745b120866151add3a56d310535984e5da4aefcc
BUG/MINOR: h3: fix BUG_ON() crash with glitch on htx_set_eom() failure

In case of htx_set_eom() failure, qcc_set_error() is used both for DATA
and trailers parsing, setting INTERNAL_ERROR as value. Both parsers
return a negative value to interrupt h3_rcv_buf() parsing loop. However,
this causes a crash as qcc_set_error() is called a second time on the
function epilogue.

Fix this by removing qcc_set_error() usage in both h3_data_to_htx() /
h3_trailers_to_htx(). They still return a negative value, which is now
properly handled in h3_rcv_buf() epilogue : INTERNAL_ERROR is set as
both h3c <err> and h3s <err> are unset.

This must be backported up to 3.0.
src/h3.c