Re: Privilege-escalation attacks on NT-based Windows are unfixable
From: Alun Jones (alun@texis.com)Date: 08/23/02
- Next message: Ursus Horibilis: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Previous message: Alun Jones: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- In reply to: David Wagner: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Next in thread: Barry Margolin: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Reply: Barry Margolin: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Reply: Edward Elliott: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Reply: David Wagner: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: alun@texis.com (Alun Jones) Date: Fri, 23 Aug 2002 18:15:55 GMT
In article <ak5s74$2t42$2@agate.berkeley.edu>, daw@mozart.cs.berkeley.edu
(David Wagner) wrote:
>Barry Margolin wrote:
>>But given that programmers have *chosen* to program in a language with
>>these known flaws, they are implicitly taking on the resposibility of doing
>>their own checking.
>
>In theory, maybe. In practice, I don't buy it. The alternatives
>have many other disadvantages, which might outweigh the existence of
>buffer overruns. The fact is, the C language and libraries are flawed
>by the fact that the contain such pitfalls. We can give the programmer
>some of the blame for knowingly using a flawed language, but we should
>also pin a good deal of the blame on the flawed language itself, too.
And yet, the language providers will essentially be unable to fix the flaw in
the language, because of the large number of people out there that use strcpy
et al.
Assigning blame is considerably less important than producing and distributing
fixes. If I have a program that doesn't check a buffer passed into strcpy,
then I'm not going to wait for the language standards people to come up with a
library that doesn't include strcpy, then wait for my compiler vendor to obey
that standard and remove backward-compatibility switches, I'm going to fix the
buffer check.
Then, too, there's the argument that strcpy is not a flaw in the language - if
you have a function that's documented to scan for the first null-byte, and
copy everything up to and including that byte into the destination, then you
should, as a secure programmer, be aware that every time you call strcpy, you
must have checked the destination is big enough to hold it! If strcpy didn't
exist, someone would invent it, and the problem would still exist. Trying to
prevent bounds overflow is a Sisyphean task - each time you try to stop it by
preventing the use of one or other function, someone comes up with a new way
to cause it, or rewrites the proscribed function. I've seen a company #define
strcpy as SAFE_STRCPY, and provide a strcpy function that asserted and
terminated when a target string was not big enough, then one of their
employees goes and writes a different SAFE_STRCPY that, well, isn't safe, to
get around an imagined problem, and then leave it there for later programmers
to get into trouble with.
At some point, the application programmers have got to stop saying "the
operating system / programming language _let_ me do something stupid - waah!",
and admit that many of the mistakes we make and inflict on the world are
because we weren't thinking completely at the time of writing the code.
Alun.
~~~~
[Please don't email posters, if a Usenet response is appropriate.]
-- Texas Imperial Software | Try WFTPD, the Windows FTP Server. Find us at 1602 Harvest Moon Place | http://www.wftpd.com or email alun@texis.com Cedar Park TX 78613-1419 | VISA/MC accepted. NT-based sites, be sure to Fax/Voice +1(512)258-9858 | read details of WFTPD Pro for XP/2000/NT.
- Next message: Ursus Horibilis: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Previous message: Alun Jones: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- In reply to: David Wagner: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Next in thread: Barry Margolin: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Reply: Barry Margolin: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Reply: Edward Elliott: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Reply: David Wagner: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|