🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #20342

INN beta 1.6b3 - coredump

#20342
From: Pierre Belanger
Date: Sat, 09 Aug 1997 00:00
101 lines
4138 bytes
Hello,

    [ NOTE FOR ISC: this is an update of a mail I sent earlier }
    [ with lots of gdb informations                            ]

Ok, I got a coredump under Solaris 2.5.1 (*ALL* patches installed)
with INN-1.6b3.  I did apply the following patch to art.c:

    if you go into innd/art.c at line 1093 you'll find:
                if (strlen(p) > ARTheaders[_control].Length) {
    change it to this:
                if (strlen(p) >= ARTheaders[_control].Length) {
    This has helped someone else a lot....

I got this patch from a guy named James Brister.  I hope you know
who he is :-)


Ok, let's run gdb (haven't used gdb in the past 3 years!)

/usr/local/src/inn-1.6b3/innd% gdb ~/innd.O2.g ~/core
core was generated by `/usr/local/news/etc/innd -p4 -i0'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libelf.so.1...done.
Reading symbols from /usr/lib/libresolv.so.2...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libintl.so.1...done.
Reading symbols from /usr/lib/libmp.so.1...done.
Reading symbols from /usr/lib/libw.so.1...done.
Reading symbols from /usr/lib/nss_files.so.1...done.
Reading symbols from /usr/lib/nss_dns.so.1...done.
#0 0x2202c in DISTwanted (list=0x13108c, p=0x21b0c08 "world") at
art.c:1457
1457     for (sawbang = FALSE, c = *p; (q = *list) != NULL; list++)

(gdb) print c
$1 = -60 '�'
(gdb) print p
$2 = 0x21b0c08 "world"
(gdb) print *p
$3 = 119 'w'
(gdb) print q
$4 = 0x6e657773 <Address 0x6e657773 out of bounds>
(gdb) print *q
Cannot access memory at address 0x6e657773.
(gdb) print list
$5 = (char **) 0x13108c
(gdb) print *list
$6 = 0x6e657773 <Address 0x6e657773 out of bounds>      ** ho really
!!!  **
(gdb) print **list
Cannot access memory at address 0x6e657773.             ** humm
...       **
(gdb) print sawbang
$7 = 0                                                  ** 0=FALSE,
great **
(gdb) info args
list = (char **) 0x13108c
p = 0x21b0c08 "world"
(gdb) info locals
q = 0x6e657773 <Address 0x6e657773 out of bounds>
c = -60 '�'
sawbang = 0
(gdb) info frame
Stack level 0, frame at 0xefffed80:
 pc = 0x2202c in DISTwanted (art.c:1457); saved pc 0x22050
 called by frame at 0xefffedf0
 source language c.
 Arglist at 0xefffed80, args: list=0x13108c, p=0x21b0c08 "world"
 Locals at 0xefffed80,
(gdb) info stack                                   ** this is kind of
useful **
#0  0x2202c in DISTwanted (list=0x13108c, p=0x21b0c08 "world") at
art.c:1457
#1  0x22050 in DISTwantany (site=0x131088, article=0x2453488) at
art.c:1481
#2  0x22880 in ARTpropagate (Data=0xeffff1f0, hops=0x28dcc08,
hopcount=10, 
    list=0x2453488) at art.c:1775
#3  0x24298 in ARTpost (cp=0x13e8c8, Replic=0x0, ihave=0x1 "O") at
art.c:2757
#4  0x2c7b4 in NCpostit (cp=0x13e8c8) at nc.c:243
#5  0x2e834 in NCproc (cp=0x13e8c8) at nc.c:1162
#6  0x28f78 in CHANreadloop () at chan.c:988
#7  0x2bf0c in main (ac=149, av=0xeffffe7c) at innd.c:1011

Find the bug and you could win inn-1.6b4!

I am keeping the core file so if you are missing something useful let me
know
and I will post it back here.

Pierre Belanger - RISQ division of the Computer research institute of
Montreal

Technical Details
Message-ID: <33EC1698.74C4C1C4@risq.qc.ca>
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
References: <yy3g1svhzgg.fsf@velo.pp.vix.com> <5rtdam$e6h$1@news.eris.dera.gov.uk> <5sb597$o03$1@heracles.fw.cuci.nl>

Show Full Headers
Complete Article Headers
Message-ID: <33EC1698.74C4C1C4@risq.qc.ca>
Subject: INN beta 1.6b3 - coredump
Date: Sat, 09 Aug 1997 00:00:00 +0000
From: Pierre Belanger <belanger@risq.qc.ca>
References: <yy3g1svhzgg.fsf@velo.pp.vix.com> <5rtdam$e6h$1@news.eris.dera.gov.uk> <5sb597$o03$1@heracles.fw.cuci.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-mail
X-Deja-AN: 263034569
To: inn-bugs@isc.org
Organization: RISQ
Reply-To: pierre.belanger@risq.qc.ca
Newsgroups: news.software.nntp