Article View: news.software.nntp
Article #15572innd 1.5.1 dumps core. buffer overflow?
From: Jan-Pieter Cornet
Date: Thu, 06 Mar 1997 00:00
Date: Thu, 06 Mar 1997 00:00
52 lines
3081 bytes
3081 bytes
I'm seeing very frequent (like once or twice a day) innd 1.5.1 coredumps,
it looks like a buffer overflow to me. Here's some information from
gdb on the latest core:
newsfeed:/news/spool # gdb /usr/local/etc/innd innd.core
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.15.1 (i386-unknown-bsdi2.1),
Copyright 1995 Free Software Foundation, Inc...
Core was generated by `innd'.
Program terminated with signal 11, Segmentation fault.
#0 0x14ffd in NGfind (Name=0x11480f "sci.skeptic") at ng.c:276
276 if (c == ngp[0]->Name[0] && EQ(Name, ngp[0]->Name))
(gdb) bt
#0 0x14ffd in NGfind (Name=0x11480f "sci.skeptic") at ng.c:276
#1 0x4fde in ARTpost (cp=0x53b70, Replic=0x0,
ihave=0x4951c00 "<01bc2975$a6b4a3e0$e7d992cf@default>") at art.c:1962
#2 0xf4c9 in NCpostit (cp=0x53b70) at nc.c:235
#3 0x11a44 in NCproc (cp=0x53b70) at nc.c:1086
#4 0x12310 in NCreader (cp=0x53b70) at nc.c:1311
#5 0xb52f in CHANreadloop () at chan.c:873
#6 0xe915 in main (ac=0, av=0xefbfdef4) at innd.c:952
(gdb) p ngp
$1 = (NEWSGROUP **) 0x578840
(gdb) p ngp[0]
$2 = (NEWSGROUP *) 0x74656e2e
(gdb) p ngp[0]->Name
Cannot access memory at address 0x74656e32.
(gdb) p (char*) ngp
$3 = 0x578840 ".net>\nfj/mail/5362 <5fk0hi$9b5@news.nc.u-tokyo.ac.jp>\nrec/arts/comics/marketplace/159026 <5fjisd$1h1@taurus.adnc.com>\ncontrol/4104995 <cancel.5fi4vf$mkp@news1-alterdial.uu.net>\nalt/sports/football/pro"...
My hope is that someone already found this and says "oh install patch ...",
but if not I'm willing to dive into it a bit more... though i'm not that
familiar with the innd code, there are probably others that know it better
than i do.
BTW, for anyone who reads this post all the way here, I've made a patch
to nnrpd that mmap()s the .overview files, and binary searches them,
which resulted in a tremendous speedup especially if you have lots
of readers reading big groups. You need a superior mmap implementation
for that, though (I also have a script that tests your mmap :). Volunteers
to test it, or should I just post the patch here?
--
#! ##### Jan-Pieter Cornet ##### <johnpc@xs4all.net> ##### perl
++$_;$!=$_+++$_;($:,$,,$/,$*)=$!=~/.(.)...(.)(.).(.)/;$!=$_+$_;
($@,$\,$~)=$!=~/(.)(.).(.)/; $_="$,$/$:"; $@++; $~="$~$_";($_)=
\$$=~/\((.)/;$|=++$_;$_++;$|++;$~="$~ $@$:";`$~$/$\$*$, $|>&$_`
Technical Details
Message-ID:
<5fmjjf$qcg$1@news1.xs4all.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <5fmjjf$qcg$1@news1.xs4all.nl> Subject: innd 1.5.1 dumps core. buffer overflow? Date: Thu, 06 Mar 1997 00:00:00 +0000 From: johnpc@xs4all.nl (Jan-Pieter Cornet) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 223515644 Organization: XS4ALL Internet B.V. X-XS4ALL-Date: Thu, 06 Mar 1997 15:16:15 CET Newsgroups: news.software.nntp