]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h3: ensure the ":method" pseudo header is totally valid
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 28 Jun 2024 08:43:19 +0000 (10:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Jun 2024 12:36:30 +0000 (14:36 +0200)
commit789d4abd7328f0a745d67698e89bbb888d4d9b2c
tree4b808c14c46e1e272fe0f7ced75914c88b220749
parent80aba1d2844165d9c6929d31cc9c2fd2e92286ed
BUG/MEDIUM: h3: ensure the ":method" pseudo header is totally valid

Ensure pseudo-header method is only constitued of valid characters
according to RFC 9110. If an invalid value is found, the request is
rejected and stream is resetted.

Previously only characters forbidden in headers were rejected (NUL/CR/LF),
but this is insufficient for :method, where some other forbidden chars
might be used to trick a non-compliant backend server into seeing a
different path from the one seen by haproxy. Note that header injection
is not possible though.

This must be backported up to 2.6.

Many thanks to Yuki Mogi of FFRI Security Inc for the detailed report
that allowed to quicky spot, confirm and fix the problem.
include/haproxy/http.h
src/h3.c