]> git.ipfire.org Git - thirdparty/squid.git/commit
Forbid obs-fold and bare CR whitespace in framing header fields (#701)
authorAmos Jeffries <yadij@users.noreply.github.com>
Fri, 14 Aug 2020 15:05:31 +0000 (15:05 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 15 Aug 2020 00:22:37 +0000 (00:22 +0000)
commit580448c9d95aaa94f7224a46a226f7cb3ba29f17
tree97a7c0b9b17f9706df31b4185a57c1e233d78257
parent30fe12bc8814768d8978c9c84771b08750c7f2fe
Forbid obs-fold and bare CR whitespace in framing header fields (#701)

Header folding has been used for various attacks on HTTP proxies and
servers. RFC 7230 prohibits sending obs-fold (in any header field) and
allows the recipient to reject messages with folded headers. To reduce
the attack space, Squid now rejects messages with folded Content-Length
and Transfer-Encoding header field values. TODO: Follow RFC 7230 status
code recommendations when rejecting.

Bare CR is a CR character that is not followed by a LF character.
Similar to folding, bare CRs has been used for various attacks. HTTP
does not allow sending bare CRs in Content-Length and Transfer-Encoding
header field values. Squid now rejects messages with bare CR characters
in those framing-related field values.

When rejecting, Squid informs the admin with a level-1 WARNING such as

    obs-fold seen in framing-sensitive Content-Length: ...
src/HttpHeader.cc