From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb0e,cdca3dc8d6167cd4 X-Google-Attributes: gidfdb0e,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-12-21 16:34:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.shore.net!Ives.egh.com!JOHN Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec From: John Santos Subject: Re: Congratulations for the festive season In-Reply-To: Message-ID: <1011221190540.59837B-100000@Ives.egh.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Fri, 21 Dec 2001 19:35:05 -0500 NNTP-Posting-Host: 209.192.204.112 X-Complaints-To: abuse@shore.net X-Trace: news.shore.net 1008981248 209.192.204.112 (Fri, 21 Dec 2001 19:34:08 EST) NNTP-Posting-Date: Fri, 21 Dec 2001 19:34:08 EST Organization: Shore.Net, a PRIMUS Company (info@shore.net) Xref: archiver1.google.com comp.os.vms:56702 alt.sys.pdp10:8571 comp.sys.dec:10098 On Fri, 21 Dec 2001, Mark Crispin wrote: > On Fri, 21 Dec 2001, John J Francini wrote: > > Hence, buffer overflows and other nastiness. This philosophy is by NO > > MEANS restricted to Unix; it is very much evident in Microsoft-written OSes > > and applications (like Exchange, IIS, and many others), as well as plenty > > of other products. > > Including VMS. The reason why there aren't many buffer overflow attacks > on VMS is that the target is uncommon and uninteresting to the bad guys. > It's a form of security through obscurity. > > If VMS had achieved the level of success that UNIX did, and UNIX faded > into obscurity the way VMS did, then CERT bulletins would be filled with > the latest VMS buffer overflow attacks, and UNIX users would be snickering > about VMS insecurity. This turns out not to be the case. Most VMS languages use counted strings and the OTS routines that do string copies that check the counts when copying to fixed-length buffers, and truncate and/or warn you (but never, ever write past the end of the destination.) This philosophy has been present since day one - ever notice the very non-RISCy MOVC5 instruction in the VAX instruction set? Sure this hurts performance sometimes: you have to store, maintain, check and pass around all those pesky counts, and you can't do the cheap trick of copy bytes until you hit a in a tight loop. Instead you have to compare source and destination sizes, set your loop counter to the minimum, and copy. Sometimes you don't get to stop early if the source string is short, since you may need to fill the destination. On the other hand, is not a special character in strings. (In-band flow control is generally a bad idea.) But what's a few nano-seconds if it saves you hours of crash/reboot/recovery time and debugging? Especially when the fix is to manually insert code that does the same bounds checking, in a less efficient manner? Most (all?) exceptions to the above are in C programs that use -terminated strings, and most of those were imported from Unix, so I don't understand why the Unix users would be laughing. I think they would be too busy fixing their own systems to be worrying about others. Or maybe if the implementors of most of the public-domain software (TCP/IP, etc., etc.) had grown up on VMS instead of Unix, they would have been dismayed on discovering the lack of buffer overflow protection in the usual C libraries and would have insisted on (or implemented themselves) a standard set of counted string functions that everyone would use, and would have soon acquired direct support in ANSI C (for counted string literals and constants) and buffer overflow attacks on Unix would be a thing of the past. > -- Mark -- > > http://staff.washington.edu/mrc > Science does not emerge from voting, party politics, or public debate. -- John Santos Evans Griffiths & Hart, Inc. 781-861-0670 ext 539