Secure Programming in GNU/Linux Systems: Part I
LNXPhreak writes "A new article on OSWeekly.com discusses secure programming in GPU/Linux systems in terms of programming talent and requirements. Quote: "A "secure program" is an application that sits on a security boundary, taking input from a source that does not have the same access rights as the program. Such programs include application programs used as viewers of remote data, web applications (including CGI scripts), network servers, and setuid/setgid programs."
Mod parent indeed (that's +5).
FTFA: -Programmers are human, and humans are lazy. Thus, programmers will often use the "easy'' approach instead of a secure approach, and once it works, they often fail to fix it later.
...But, you've also bested my Spaniard, which means you must have studied, and in studying you must have learned that man is mortal, so you would have put the poison as far from yourself as possible, so I can clearly not choose the wine in front of me.
GPU/Linux eh? Way to go, "editors".
Avoid programming in C as much as possible.
They called me mad, and I called them mad, and damn them, they outvoted me. -Nathaniel Lee
Does anyone other than Richard Stallman really call it GNU/Linux? How come you never hear of GNU/FreeBSD? I mean there are a ton of GNU applications also on BSD right?
Just wondering....
"Leo Fender was in a 'state of grace' when he designed the Stratocaster." -- Paul Reed Smith
...in GNU/Linux systems: 1500 pages, 3 volumes. ...in Windows systems: Two words: "You don't".
Love over Gold.
Actually, C is an unsafe language, and guns are dangerous, even in the right hands. The definition of "The Right Hands(tm)" is: "Someone who knows how intrinsically dangerous they are by nature."
... it is a powerful one. One can write secure code with C, just as one can shoot oneself in the foot with it. You significantly minimize the risk of shooting yourself in the foot when you take a course that helps you understand how and why the gun is dangerous, and the methods you can use to mitigate the risk.
....
While we are throwing cliches around, I will toss this one out there: "The right tool for the right job."
You wouldn't want to protect yourself from an attacker with a sponge, even though they are soft and fuzzy and safe. You wouldn't want to go deer hunting with a compiler. The problem is this: A gun in the hands of a person who doesn't understand why people think they are dangerous, is very dangerous!
C is not a safe language
Here is the problem, though: You don't need a C permit to write code using the C language." As a result, there are far too many people out there haphazardly swinging the barrel of their C compiler around thinking C saftey is a matter of pointers. You can be as careful as you want about where you point your gun when it is in your hands, but if you believe that gun safety begins and ends there, someone is more than likely going to get hurt. It is not enough to be careful where you point your C compilers barrel. You need to lock it up when you are not using it
Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
The use of unconstrained pointers and casting (don't forget that in C this includes arrays!), combined with allocation of local data in the same stack that contains state information (registers to be restored upon function return) is at the heart of a large portion (most?) of the common security vulnerabilities on PCs.
Some large-ish number of years ago I saw an article in which the author (don't recall the name offhand, sorry) asserted that raw pointers were the data equivalent of GOTOs. Both are potentially useful as under-the-hood implementation mechanisms, but entirely too easy to abuse for them to be exposed in a high-level-language.
Did someone get Linux to run on a graphics card now? damn.
Sitting Walrus Blog
PHP is the worst language I have ever used, from a security perspective. Scan the security lists for the programs that have the most problems -- they ain't C programs.
WTF does that mean?
you fucking tard
just because something isn't perfect doesn't mean it needs to be torn down
get off my internet