]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-h2: harden h2_dump_h2s_info() against potentially null h2s->sd
authorWilly Tarreau <w@1wt.eu>
Fri, 14 Aug 2026 15:56:44 +0000 (17:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Aug 2026 16:00:41 +0000 (18:00 +0200)
commit2abd47127c40c7ebf62ea4aca2e2cc13b36a75e4
treebaf280ea757ebf92b94b6181c3b29733f5266811
parenteca4e38c59e47bdb192c21e8dee7b157ea8ccced
BUG/MINOR: mux-h2: harden h2_dump_h2s_info() against potentially null h2s->sd

Not really sure if this can happen but since the code already takes care
of testing the sd, better make sure everywhere it's dereferenced it's
tested. And h2s_sc() does dereference h2s->sd which is later tested in
that function.

Under normal circumstances it's fine (when called from the stream via
h2_show_fd()) but it's less certain when dumping FDs via h2_show_fd()
which is called by the CLI's "show fd" debugging command. Let's just
guard all h2s_sc() under an sd test then.

Thanks to Ilya for reporting this Coverity finding in GH issue #3475.

This can be backported wherever it applies.
src/mux_h2.c