Fixed Challenge/response sizes in Squid's NTLMSSP code

From: Andrew Bartlett <abartlet@dont-contact.us>
Date: Tue, 13 Jul 2004 18:20:08 +1000

While I've been trying to code up the 'Negotiate' (SPNEGO) support for
Squid, I have seen a lot of:

        ntlm_request->authchallenge = xstrndup(reply, NTLM_CHALLENGE_SZ
+ 5);

These worry me - not only are these packets not fixed size, Squid has no
way of knowing what they should be!

There are parts of the NTLMSSP protocol that can expand - like the DNS
and domain names - send by both clients and servers. I'm worried that
artificial limitations will just bite some unfortunate user. (I found
a similar issue in Samba, where a only the BBC had enough servers to
fill a fixed-length buffer. It took months to track down...)

Is there any reason not to simply use strdup() here?

Andrew Bartlett

Received on Tue Jul 13 2004 - 02:20:14 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Jul 31 2004 - 12:00:03 MDT