]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-h2: validate HEADERS frame length before reading stream dep
authorWilly Tarreau <w@1wt.eu>
Sat, 23 May 2026 17:42:43 +0000 (19:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 May 2026 08:52:42 +0000 (10:52 +0200)
commit8e1d33a6481a2e301512c3d3deb7467ade432ebf
treeac25c87cce958767eac1156b64ec359e54a0541b
parent49d6306de311cd05cba21fad580c69e01b694e66
BUG/MINOR: mux-h2: validate HEADERS frame length before reading stream dep

When the PRIORITY flag is present on a HEADERS frame, the frame must
contain a stream dependency and a weight, for a total of 5 bytes. The
length is checked after reading the stream dep field so theoretically
such a frame could cause up to 4-byte OOB read at the end of the buffer,
though in practice buffers allocated from pools never end on a page
boundary (one extra word at the end) and the anomaly is still detected
after reading the stream ID and the connection aborted with the glitch
count incremented. Thus while not technically correct, practically
speaking it's harmless.

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