Vandoorselaere Yoann <yoann@mandrakesoft.com> said:
> Horst von Brand <vonbrand@inf.utfsm.cl> writes:
[...]
> > strncpy(3) and its ilk instead of strcpy(3) et al is standard
> > recomendation, take a look at the Secure-Programs-HOWTO for instance.
> Sorry, but i think the vast majority of people
> *here* know how to write secure programs.
> The problem is existing programs using non secured functions.
Audit and rewrite what needs redoing. No way around that, in the end.
> > (BTW, how would this mythical function(s) know the buffer bounds just by
> > looking at the stack?)
> This isn't *this* mythical function.
> as i've already said, you LD_PRELOAD a library which provide a replacement
> for dangerous function like strcpy...
If strcpy(3) can check bounds, why on earth doesn't the libc one do so?
[...]
> Ps : i can't post the URL of the library i'm talking about...
> i'm not allowed to until the press release is done.
> And yes, it's LGPL'ed software :-)
I'd really like to see it. Any way of doing as claimed I can think up
offhand involve _massive_ slowdown, if they even work in all cases. BTW,
gcc has this recently-aqcuired habit of inlining all sorts of functions,
sometimes with quite a bit of help from the standard header files in
glibc, so many of the targets for your replacement will be gone by the time
the program runs.
-- Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:15 EST