[ntp:questions] ntpd IPv6 support on Windows?

Dave Hart davehart at gmail.com
Mon Jan 12 07:39:43 UTC 2009


On Jan 11, 10:41 pm, Terje Mathisen <terje.mathi... at hda.hydro.com>
wrote:
> Dave, I was inclined to agree with you that these headers do look like
> what we need, functionality-wise they look spot on, but when I started
> to read the code I found some ugly stuff, i.e.:
[...]
> I.e. the _very_ first operation of this function is to enable a stack
> overflow bug/security hole!
>
> If you send in a too-long szNodeName, then the strcpy() will overwrite
> lots of stack values. :-(

I also note ports/winnt/include/config.h has this bit:

/*
 * VS.NET's version of wspiapi.h has a bug in it
 * where it assigns a value to a variable inside
 * an if statement. It should be comparing them.
 * We prevent inclusion since we are not using this
 * code so we don't have to see the warning messages
 */
#ifndef _WSPIAPI_H_
#define _WSPIAPI_H_
#endif

Given that ISC already has its own preferred implementation of
getaddrinfo and friends and the issues with the wspiapi.h
implementation, using the ISC stuff makes sense.  It would be nice to
look for the functions in whsip6.dll after checking ws2_32.dll for
them, so that any lingering Windows 2000 IPv6 users are equally
served.

Cheers,
Dave Hart




More information about the questions mailing list