]> git.ipfire.org Git - thirdparty/squid.git/commit
Fixed parsing of TLS messages that span multiple records (#457)
authorChristos Tsantilas <christos@chtsanti.net>
Tue, 13 Aug 2019 14:44:22 +0000 (14:44 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 14 Aug 2019 10:01:17 +0000 (10:01 +0000)
commite287364cf8403222ec87111f5243b45ea9d2499e
tree0124425fb647e010b5dec04604dec299b1cf317d
parent2a51e34e92092b7409a5fe51b8df4792e8748ab8
Fixed parsing of TLS messages that span multiple records (#457)

Squid fed the TLS message parser with one TLS record fragment
at a time but allowed InsufficientInput exceptions to bubble up
beyond the TLS message parsing code. If a server handshake
message spans multiple TLS records, and Squid reads all those
records together with the end of the TLS server handshake, then
the higher-level code interprets InsufficientInput as the need
for more TLS records for the record parser (rather than more
fragments for the TLS message parser). The affected transaction
would then time out or otherwise fail while waiting for those
non-existent TLS records to come from the server.

We now parse TLS messages only after accumulating all same-type
TLS records. For truncated handshakes, this may reduce the
level of information extracted by Squid in some cases, but
this approach keeps the code simple. The handshake is still
available for logging if that partial info is needed for triage.

Test case: 1000-sans.badssl.com which sends a huge server certificate.

This is a Measurement Factory project.
src/security/Handshake.cc