]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: hpack: don't return direct references to the dynamic headers table
authorWilly Tarreau <w@1wt.eu>
Sat, 30 Dec 2017 15:56:28 +0000 (16:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Dec 2017 16:17:06 +0000 (17:17 +0100)
commitbb39b4945b5264f5e21414ceb52df2e16fa9a953
tree3f96da8faad0aac0e00e5822417c216a8e19c36f
parentff47b3f41da2f27d0fc61dd8d1aa77beb217f313
BUG/MAJOR: hpack: don't return direct references to the dynamic headers table

Maximilian Böhm and Lucas Rolff both reported some random failed requests
with HTTP/2. Upon deep investigation on detailed traces provided by Lucas,
it turned out that some header names were occasionally corrupted and used
to point to random strings within the dynamic headers table.

The HPACK decoder must always return copies of header names that point
to the dynamic headers table. Otherwise, the insertion of a header after
the current one leading to a reorganization of the table will change the
data the pointer designates. Unfortunately, one such copy was missing for
indexed names, leading to random request failures due to invalid header
names.

Many thanks to Lucas who ran a large number of tests with full traces
helping to capture a reproduceable sequence exhibiting this issue.

This patch must be backported to 1.8.
src/hpack-dec.c