]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/CRITICAL: http_ana: Fix parsing of malformed cookies which start by a delimiter
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 22 Jul 2019 15:43:46 +0000 (17:43 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Jul 2019 12:58:32 +0000 (14:58 +0200)
commitf0f42389772b2303b162e929449a36b33e181c5f
tree264adec6fb6fd9f10074adb449a5c08044529734
parent90cc4811beec126c8057e3ea81899d1313090dfe
BUG/CRITICAL: http_ana: Fix parsing of malformed cookies which start by a delimiter

When client-side or server-side cookies are parsed, HAProxy enters in an
infinite loop if a Cookie/Set-Cookie header value starts by a delimiter (a colon
or a semicolon). Depending on the operating system, the service may become
degraded, unresponsive, or may trigger haproxy's watchdog causing a service stop
or automatic restart.

To fix this bug, in the loop parsing the attributes, we must be sure to always
skip delimiters once the first attribute-value pair was parsed, empty or
not. The credit for the fix goes to Olivier.

CVE-2019-14241 was assigned to this bug. This patch fixes the Github issue #181.

This patch must be backported to 2.0 and 1.9. However, the patch will have to be
adapted.
src/http_ana.c