Subject: Re: FreSSH and bounds checking
To: None <current-users@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 03/08/2002 15:58:12
[ On Friday, March 8, 2002 at 18:21:56 (+0000), xs@kittenz.org wrote: ]
> Subject: Re: FreSSH and bounds checking
>
> gcc-ssp strikes me as a nice fall back in some situations, but
> I don't think it would have helped one bit with this bug,
It may not have helped, but it doesn't hurt either -- I've not noticed
any performance problems with using it on one of the most performance
sensitive applications I run: Xserver. (That may be in part due to
better code generation in GCC-2.95.3 vs. EGCS 1.1.2 though.)
> for that
> you would need a malloc implementation that mprotect()'d
> each side of the allocated area, so the program would die if the heap
> overflowed or was accessed,
You mean like what pkgsrc/devel/electricfence can do?
> but this is very inefficient and not so
> portable and might fail too. (I think it would add 8192 bytes to each
> malloc on i386.)
I don't find ElectricFence too big a pig, though it is slower for sure.
There's also the excellent debugging in Phong Vo's vmalloc, which
unfortunately does not yet have a pkgsrc module, which even with full
run-time debugging enabled isn't noticably slower in most applications.
Gray Watson's Debug Malloc library is also very efficient and has caught
a number of bugs in programs I've maintained over the years.
--
Greg A. Woods
+1 416 218-0098; <gwoods@acm.org>; <g.a.woods@ieee.org>; <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>