|
|||||||||||
|
RE: Are bad developer libraries the problem with M$ software?
From: <cc_mofo(at)hushmail.com>
Date: Tue Nov 19 2002 - 15:53:17 EST This thread is making a couple of points to me: 1. Secure coding requires intermediate skill (at minimum) in the language being used. 2. Some languages require use of explicit security features, others require careful use of base features; see #1. 3. Code that looks "secure" or "safe" may give a false sense of security; see #1. All of which goes back to Fred Brooks. One skilled, disciplined developer cannot be replaced by any number of lesser skilled developers--regardless of the tools they use. And it is my belief that tools and languages differ primarily in the time it takes to get basic literacy, not in the time it takes to master them; advanced knowledge of any language/environment never takes less than about 5 years. BTW, this whole array vs. pointer issue has a further set of subtleties that have not yet been touched on; check out "Deep C Secrets" by Peter Van Linden, who dedicates a whole chapter to this topic.
-----Original Message-----
Hi all, > > Same problem; not safe anyway. (sizeof (dst) - strlen(dst) - 1, if anything) > Another thing to use is consistency, for example,
char dst[50];
This could be exploitable if user_supplied_data is 50 or more bytes long. In specific, 50 - 50 - 1 == -1 Since strncat's len parameter is size_t (which is unsigned), strncat is willing to append _way_ to many bytes. IIRC, some fingerd's had this problem (possibly some identd, *shrug*). Similar things can be done to snprintf and so on. A wrapper around those library calls could be used to check if its unsigned (and wouldn't have that much drawback, because I can't think of anything that'd do a >2G string operation normally), by using int as opposed to size_t. I guess this comes to the class of integer over/under flows now :)
Sincerely,
Get your free encrypted email at https://www.hushmail.com Received on Wed Nov 20 06:08:27 2002 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:44 EDT |
||||||||||
|
|||||||||||