Mailing List Archive

Re: ntp-4.99k23.tar.gz is available
William D. Colburn (aka Schlake) writes:
> I haven't seen an announcement anywhere, but I noticed it on the FTP
> server this morning. It is dated Friday evening.
>
> ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-4.0.99k23.tar.gz
>
> I tried it out with the exploit posted by "babcia padlina
> ltd. <venglin@freebsd.lublin.pl>" and it seems to be safe. I never had
> a machine that the exploit worked against, but my ntp servers would exit
> with a segfault when it was run against them. The new server does not
> exit.

FWIW, I downloaded Redhat's patched source RPM and compared the against
ntp-4.0.99k23. While this *particular* exploit appears to be fixed, there
are some other buffer overflows that are not fixed by k23 that are fixed in
the Redhat patches, in particular the use of vsnprintf instead of vsprintf.
Then again, the Redhat version may not catch all of these, either. I
didn't think to check at the time.

ftp://updates.redhat.com/7.0/en/os/SRPMS/ntp-4.0.99k-15.src.rpm

...or just grep the k23 source for vsprintf. Once you think to look, the
fixes are pretty obvious.

################################################################
# find ntp-4.0.99k23 -name \*.c | xargs grep vsprintf
./libntp/snprintf.c: rp = vsprintf(str, fmt, ap);
./libntp/snprintf.c: rval = vsprintf(str, fmt, ap);
./libntp/snprintf.c: return (strlen(vsprintf(str, fmt, ap)));
./libntp/snprintf.c: return (vsprintf(str, fmt, ap));
./libntp/msyslog.c: vsprintf(buf, nfmt, ap);
./ntpd/refclock_mx4200.c: (void)vsprintf(cp, fmt, ap);
./ntpdate/ntpdate.c:vsprintf(
./ntpdate/ntptimeset.c:int vsprintf P((char *str, const char *fmt, va_list ap));
./ntpdate/ntptimeset.c:vsprintf(
./ntptrace/ntptrace.c:vsprintf(
################################################################

FWIW, the Redhat version also syslog()s attempts to use the published
exploit. Hmmm. Perhaps a DoS is next for the "fixed" version.
:-) / 2

Hope this helps,
Chuck
Re: ntp-4.99k23.tar.gz is available [ In reply to ]
On Tue, Apr 10, 2001 at 11:49:28AM -0400, stanislav shalunov wrote:
> Chiaki Ishikawa <Chiaki.Ishikawa@PERSONAL-MEDIA.CO.JP> writes:
>
> > Has anyone tested the exploit against embedded ntp implementations
> > such as in Cisco router, for example, to see if the daemon would
> > misbehave, etc.?
>
> I couldn't do anything to the NTP implementation of a Cisco router
> here with the stock "ntpdx" exploit as it was posted. (It doesn't
> crash, it doesn't exhibit same heap corruption as xntpd v3.)
>

Cisco IOS (at least 11.x series) _IS_ vulnerable (tested, confirmed). Earlier
versions are presumably vulnerable too. Haven't tested IOS 12.x but it may have
the same bug inherited as well (unless cisco folks found the problem and fixed
it silently).

Hope it helps...


-Fyodor
--
http://www.notlsd.net
PGP fingerprint = 56DD 1511 DDDA 56D7 99C7 B288 5CE5 A713 0969 A4D1
Re: ntp-4.99k23.tar.gz is available [ In reply to ]
> > Has anyone tested the exploit against embedded ntp implementations
> > such as in Cisco router, for example, to see
> > if the daemon would misbehave, etc.?
>
> Cisco has said they are aware of the advisories and investigating the
> issue. That's all I know. I do not have a convenient sacrificial Cisco
> box at the moment... but I probabaly should go set one up for this
> and other games.

I tried the exploit against a cisco 2614/IOS 10.3 and a cisco 3640/IOS
12.0 when the exploit first came out, and there was no evidence of any
effect.

Since April 7 I've been running ntpd/4.99k23 on an assortment of Linux
systems and on a pair of antique Sparc 2's running SunOS 4.1.3. All
seem happy, are keeping good time, and are unaffected by the exploit.

--
Dick St.Peters, stpeters@NetHeaven.com