🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #67711

Re: [INN 2.4 source] history/his.c strcmp

#67711
From: Russ Allbery
Date: Mon, 19 Jan 2004 22:21
30 lines
2233 bytes
Jeffrey M Vinocur <jeff@litech.org> writes:
> Innocenti Maresin  <av95@comtv.ru> wrote:

>>    for (i = 0; i < NUM_HIS_METHODS; ++i) {
>>        if (strcmp(method, his_methods[i].name) == 0)
>>            break;
>>    }

>> I.e. program performs 
>> a non-length-limited comparision (strcmp) of 2 unknown strings, 

strcmp is perfectly safe if the strings you're working with are guaranteed
to be nul-terminated, regardless of how long they are.  In this particular
case, you're getting a segfault because one of the strings is NULL, not
because of any sort of overflow.  This is a bug, but is not exploitable
regardless of the source of the string (and in this case, since it's
coming from your local configuration, it's obviously also not exploitable
because of that).

I'll improve the error message.  :)

> Russ, I still can't authenticate to CVS, can't you fix this?

Yup.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87isj7y3zj.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <400BBF16.C7C71F15@comtv.ru> <buhfbu$5oj$1@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <87isj7y3zj.fsf@windlord.stanford.edu>
Subject: Re: [INN 2.4 source] history/his.c strcmp
Date: Mon, 19 Jan 2004 14:21:04 -0800
From: Russ Allbery <rra@stanford.edu>
References: <400BBF16.C7C71F15@comtv.ru> <buhfbu$5oj$1@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 30
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1074550864 9358 171.64.19.147 (19 Jan 2004 22:21:04
 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Common Lisp, linux)
Cancel-Lock: sha1:C37evevsWyQnQXq1Vn7G9Fi3R/Q=