]> git.ipfire.org Git - thirdparty/squid.git/commit
negotiate_wrapper_auth: protect from responses over 64KB (#1530)
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 20 Oct 2023 22:24:45 +0000 (22:24 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 21 Oct 2023 06:25:43 +0000 (06:25 +0000)
commit3238ca57c7896f7ab1c58ee078ca7ba91fdaf69f
treece46c8473d9042c640311487966845e39aa40f73
parentea262b279ab24f558011fe3959bf4a591d4f4233
negotiate_wrapper_auth: protect from responses over 64KB (#1530)

... received from NTLM and Kerberos helpers.

This code uses MAX_AUTHTOKEN_LEN (~64KB) buffers to read response lines.
fgets(3) guarantees to terminate the supplied buffer, but it does not
return nil when the input line is larger than the buffer. We have
already detected such "Oversized message" cases for fgets(stdin) calls,
but not for fgets(FDNOUT) and fgets(FDKOUT) calls.
src/auth/negotiate/wrapper/negotiate_wrapper.cc