To view parent comment, click here.
To read all comments associated with this story, please click here.
sakeniwefu,
"There is no language safer than C in a Unix-like environment, because their shortcomings are well understood by anyone who has taken the time to learn about them."
I say this as a knowledgeable C developer...it is far easier to corrupt the process in C than many of the other languages around.
Even though I code very defensively, I sometimes end up writing bugs. These can be as "harmless" as following the wrong code path and functions returning wrong answers (these errors will happen in any language), or they can corrupt the heap and stack (these errors would have been prevented/caught with safe languages).
"Saying that C isn't secure because of buffer overflows is a bit silly nowadays."
C doesn't imply the existence of buffer overflows, however many languages do imply the non-existence of them.
I often prefer C never-the-less, but it takes a great deal of effort to make it safe under all conceivable conditions.




Member since:
2008-02-26
There is no language safer than C in a Unix-like environment, because their shortcomings are well understood by anyone who has taken the time to learn about them.
Saying that C isn't secure because of buffer overflows is a bit silly nowadays.
Memory corruption attacks are going the way of the dodo. The few still working, rely on lazy implementations of exploit prevention technologies or evil designs such as self-modifying-code and custom memory management. All high level management decisions which can be fixed, or not far away from C level.
Most security bugs being talked about in OpenBSD misc@ and tech@ lists nowadays are logic bugs. Most actual exploits for other systems in the wild, exploit logic bugs.
Your hash function drops every other bit because of some logic error and anyone can login as root in about ten attempts? Your web server code uploads any file to a user-specified path, and has permissions for everything? A race condition in your file locks?
No problem, just use Haskell. Oh, wait...
Please tell me how your safe languages will help me.
About proofs, Donald Knuth had this to say.
It's easy to make something work as designed. It's harder to design something right, especially if you think you don't need to worry about security.
Edited 2011-09-01 15:22 UTC