Thread View: news.software.nntp
5 messages
5 total messages
Started by Forrest J. Cavalier III
Thu, 31 Jul 1997 00:00
Comparing 1.5.1, 1.5.1sec, 1.6b2
Author: Forrest J. Cavalier III
Date: Thu, 31 Jul 1997 00:00
Date: Thu, 31 Jul 1997 00:00
146 lines
5562 bytes
5562 bytes
I am still working on sorting it all out. But with the reports
of yet more bugs, I thought I should make some private work
more public so that others can help find the cause of recent
reports of core dumps in 1.5.1sec
I have created unified sources of 1.5.1, 1.5.1sec and 1.6b2.
http://www.mibsoftware.com/userkt/inn/unified97/innd/
(Right now only the innd subdirectory is finished.)
The files in that directory are in an experimental mark-up format
which allows easy comparison of all three versions.
Here is an example of code in the mibexp markup format, which
shows how the unified format allows easy comparison. (This is
from innd.c)
-- Begin Example ---
#mibexp#ifexp INN1P6BS XINN1P6B2
Path.Data = NEW(char, Path.Used + 1);
(void)snprintf(Path.Data, Path.Used + 1, "%s!", path);
#mibexp#elifexp XINN151SEC
Path.Used = strlen (path) + 1 ;
Path.Size = Path.Used + 1 ;
Path.Data = NEW(char, Path.Size);
(void)snprintf(Path.Data, Path.Size, "%s!", path);
#mibexp#elseexp
Path.Data = NEW(char, Path.Used + 1);
(void)sprintf(Path.Data, "%s!", path);
#mibexp#endexp 770
/* Get the Xref prefix. */
Xref.Size = STRLEN("Xref: ") + strlen(path) + 1;
Xref.Data = NEW(char, Xref.Size);
-- End Example ---
The mark-up is similar to C #if/#endif conditionals, and it
is described in more detail below.
Outline of Planned work
- - - - - - - - - - - -
I am going through each mibexp and change each control into
one of the following categories:
INN151SL, INN160SL
String limit overrun patches. Actual bugs, which
should be patched.
Some may be impossible to trigger without truly bizarre
config.data setups. (Such as when strlen(CTRLBIN)+
strlen(_PATH_BADCONTROLPROG) > 256)
Most are not external threats. (I.e. only local config.data
or programming (perl filters) could cause the overrun.
There is at least one instance of passing strerror() as a %s
argument to sprintf. This was changed in 1.5.1sec to
use sprintf() I don't know that this should count, but I
put it in this category also.
Perhaps this category should be split, with using XS for
those cases where external data is being processed.
INN151BS, INN160BS
Belt and Suspenders patches: string limit patches which
were not necessary. (The limit was already considered
when sizing buffers, etc.)
INN151CC, INN160CC
Change in comments. Documentation change, fix, etc with
NO executable code change.
INN1P6FE,
Feature enhancement, operational change
INN151DF, INN160CC
Other Defect Fix
INN160SD, INN151SD
Unnecessary String limit patch attempts which are defective.
(All the ones I reported to James got fixed before 1.5.1sec
went public.)
I suspect that recent reports of core dumping by INN1.5.1sec innd
are from one of two sources:
1. A newly introduced defect. (Of particular interest are the
cases where 1.5.1sec and 1.6b2 do not agree.)
2. An uncovered latent defect. (Exposed due to changed use
of malloc() subsystem, etc.)
In either case, the unified format makes inspecting code changes
much easier. I think the safest course of action is to isolate
ONLY the NECESSARY string limit and defect changes to protect against
external attacks. I think this is a very small subset of all the
changes. This should be 1.5.1sec.
The long-term course of action is to re-engineer INN with limitless
strings. Right now, the 1.5.1sec "solution" is to truncate strings.
I disagree with this method, especially in functions like the
new FileGlue() (innd/innd.c) which truncate strings silently. This
is not the behavior you want when you are building a path to
files and executables.
I had hoped to have it all sorted out by now. But I got side-tracked
in creating the experimental versions of the tools to support the
output format. The output of GNU diff -D was useful in comparing only
two versions, which was not adequate for this work.. It took time to create
the necessary tools. (Did I just re-invent some wheel?)
Apologies for the brief description and "unpolished" look to everything.
Having more people inspect makes it more likely to find defects
sooner.
Questions & comments welcomed.
Forrest Cavalier, Mib Software, INN customization and consulting
Further explanation of the mibexp markup format.
- - - - - - - - - - - - - - - - - - - - - - - -
1. Syntax:
#mibexp#ifexp CONTROL [CONTROL2...]
#mibexp#elifexp CONTROL [CONTROL2...]
#mibexp#elseexp
#mibexp#endexp N
Where N is the line number of the base version: in this case
the 1.5.1 version.
2. The else clause is always the base version.
3. Processing occurs BEFORE comments or other conditionals
are interpreted.
4. mibexp directives may not be nested.
I have tools for creating and manipulating mibexp files, but
they are still experimental. (I.e. not fully tested.)
Re: Comparing 1.5.1, 1.5.1sec, 1.6b2
Author: Forrest J. Cavalier III
Date: Thu, 31 Jul 1997 00:00
Date: Thu, 31 Jul 1997 00:00
22 lines
1040 bytes
1040 bytes
> > You mean that you put the code, of iind.c for example, of all three versions in > one file? If so then one could compile to any desired version? It can be done by running it through an export utility before it is compiled. The purpose of the format is to allow easy comparison of more than two versions. RCS (or similar) is a much better choice for maintaining versions. I wasn't trying to duplicate it. Forrest
Re: Comparing 1.5.1, 1.5.1sec, 1.6b2
Author: Forrest J. Cavalier III
Date: Thu, 31 Jul 1997 00:00
Date: Thu, 31 Jul 1997 00:00
24 lines
1170 bytes
1170 bytes
In article <5rp1ig$asn$1@news1.epix.net>, mibsoft@epix.net wrote... > >I am still working on sorting it all out. But with the reports >of yet more bugs, I thought I should make some private work >more public so that others can help find the cause of recent >reports of core dumps in 1.5.1sec > >I have created unified sources of 1.5.1, 1.5.1sec and 1.6b2. > > http://www.mibsoftware.com/userkt/inn/unified97/innd/ > (Right now only the innd subdirectory is finished.) > subdirectories lib, nnrpd, dbz, and expire are now available for code comparisons. A tar.gz file is also available. Forrest
Re: Comparing 1.5.1, 1.5.1sec, 1.6b2
Author: Luis G
Date: Thu, 31 Jul 1997 00:00
Date: Thu, 31 Jul 1997 00:00
31 lines
1339 bytes
1339 bytes
Forrest: You mean that you put the code, of iind.c for example, of all three versions in one file? If so then one could compile to any desired version? How do you issu your compile command then? Would RCS done the job? See RCS a System for Version Control by Walter F. TIchy RCS is free and I believe widely used to this day. Within RCS there is a command called rcsdiff which compares RCS revisions. RCS also maintains a tree of revisions and it can maintain separate lines of development. The only trouble I see is that RCS maybe only works for two revisions. Does it work for three? I do not know. I have never used RCS. My company uses for maintaining versions of our code. Is this off the mark? Luis
Re: Comparing 1.5.1, 1.5.1sec, 1.6b2
Author: Forrest J. Cavalier III
Date: Fri, 01 Aug 1997 00:00
Date: Fri, 01 Aug 1997 00:00
28 lines
1322 bytes
1322 bytes
The INN source files at
http://www.mibsoftware.com/userkt/inn/unified97/
have been updated with the sources from 1.5.1sec2 and
1.6 beta 3.
The added version tags are:
XINN151S2
XINN160B3
All previous version tags were left intact, so the files
are useful for comparing what changed between all the
various versions. (Yes, that makes it a 5 way comparison
-- try to do that with diff!)
Future updates of my files will be announced to the
inn-workers mailing list only, since news.software.nntp
is too broad of an audience for interest in this work.
Future updates will probably remove some version tags, since
1.5.1sec and 1.6b2 will be (should be) quickly retired.
Forrest Cavalier, Mib Software, INN customization and consulting
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads