]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: h3: reject header values containing invalid chars
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 15:18:27 +0000 (17:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 17:02:24 +0000 (19:02 +0200)
commitd13a80abb7c1badaa42045c37cfff79f24f05726
treeb726fb038573e1a1087726d881793c712c0269b1
parentd4069f3cee0f6e94afaec518b6373dd368073f52
BUG/MAJOR: h3: reject header values containing invalid chars

In practice it's exactly the same for h3 as 54f53ef7c ("BUG/MAJOR: h2:
reject header values containing invalid chars") was for h2: we must
make sure never to accept NUL/CR/LF in any header value because this
may be used to construct splitted headers on the backend. Hence we
apply the same solution. Here pseudo-headers, headers and trailers are
checked separately, which explains why we have 3 locations instead of
2 for h2 (+1 for response which we don't have here).

This is marked major for consistency and due to the impact if abused,
but the reality is that at the time of writing, this problem is limited
by the scarcity of the tools which would permit to build such a request
in the first place. But this may change over time.

This must be backported to 2.6. This depends on the following commit
that exposes the filtering function:

    REORG: http: move has_forbidden_char() from h2.c to http.h
src/h3.c