🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #67716

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

#67716
From: Jeffrey M. Vinocur
Date: Mon, 19 Jan 2004 23:35
26 lines
2192 bytes
In article <87isj7y3zj.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>
>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).

And in fact, it's not even exploitable by way of the local
configuration -- no matter what you put in inn.conf, the char* is
still going to end up properly terminated.  

Not that it matters in this case, of course.  We're not trying to
protect INN from users who have write access to the config files.

(...and besides, strcmp isn't strcpy; even if you get strcmp to
run off the end of a string, it's only ever going to be a denial
of service.)


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <buhpjk$dms$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.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!news.maxwell.syr.edu!news.litech.org!not-for-mail
References: <400BBF16.C7C71F15@comtv.ru> <buhfbu$5oj$1@puck.litech.org> <87isj7y3zj.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <buhpjk$dms$1@puck.litech.org>
Subject: Re: [INN 2.4 source] history/his.c strcmp
Date: Mon, 19 Jan 2004 23:35:16 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <400BBF16.C7C71F15@comtv.ru> <buhfbu$5oj$1@puck.litech.org> <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.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!news.maxwell.syr.edu!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 26
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1074555316 14044 66.218.0.75 (19 Jan 2004 23:35:16
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Mon, 19 Jan 2004 23:35:16 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)