]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h1: Don't support LF only to mark the end of a chunk size
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Jan 2024 15:30:53 +0000 (16:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 30 Jan 2024 14:00:14 +0000 (15:00 +0100)
commit4837e998920cbd4e43026e0a638b8ebd71c8018f
tree6388e7e29b1b9c135dd822045a8b4963404aa51f
parent7b737da8258ebdd84e702a2d65cfd3c423f8e96d
BUG/MEDIUM: h1: Don't support LF only to mark the end of a chunk size

It is similar to the previous fix but for the chunk size parsing. But this
one is more annoying because a poorly coded application in front of haproxy
may ignore the last digit before the LF thinking it should be a CR. In this
case it may be out of sync with HAProxy and that could be exploited to
perform some sort or request smuggling attack.

While it seems unlikely, it is safer to forbid LF with CR at the end of a
chunk size.

This patch must be backported to 2.9 and probably to all stable versions
because there is no reason to still support LF without CR in this case.
include/haproxy/h1.h
src/h1_htx.c