Slashdot Mirror


The 25 Most Dangerous Programming Errors

Hugh Pickens writes "The Register reports that experts from some 30 organizations worldwide have compiled 2010's list of the 25 most dangerous programming errors along with a novel way to prevent them: by drafting contracts that hold developers responsible when bugs creep into applications. The 25 flaws are the cause of almost every major cyber attack in recent history, including the ones that recently struck Google and 33 other large companies, as well as breaches suffered by military systems and millions of small business and home users. The top 25 entries are prioritized using inputs from over 20 different organizations, who evaluated each weakness based on prevalence and importance. Interestingly enough the classic buffer overflow ranked 3rd in the list while Cross-site Scripting and SQL Injection are considered the 1-2 punch of security weaknesses in 2010. Security experts say business customers have the means to foster safer products by demanding that vendors follow common-sense safety measures such as verifying that all team members successfully clear a background investigation and be trained in secure programming techniques. 'As a customer, you have the power to influence vendors to provide more secure products by letting them know that security is important to you,' the introduction to the list states and includes a draft contract with the terms customers should request to enable buyers of custom software to make code writers responsible for checking the code and for fixing security flaws before software is delivered."

111 of 534 comments (clear)

  1. Yeah, right. by Anonymous Coward · · Score: 5, Insightful

    I'll sign such a contract, but the project will take twice as long and my hourly rate will go up 300%.

    People like to draw the comparison with civil engineering, where an engineer may be liable (even criminally) if, say, a bridge collapsed. But this isn't really the same thing. We're not talking about software that simply fails and causes damage. We're talking about software that fails when people deliberately attack it. This would be like holding a civil engineer responsible when a terrorist blows up a bridge -- he should have planned for a bomb being placed in just such-and-such location and made the bridge more resistant to attack.

    The fault lies with two parties -- those who wrote the insecure code, and those who are attacking it. I'll start taking responsibility for my own software failures when the justice system starts tracking down these criminals and prosecuting them. Until then, I'll be damned if you're going to lay all the blame on me.

    1. Re:Yeah, right. by timmarhy · · Score: 5, Insightful
      Not only will it take twice as long and cost 3 times as much, but i'd also reserve the right to deny the customer any features i deemed unsafe.

      I could lock down any system and make 100% hacker proof - i'd unplug their server.

      it's a ratio of risk to reward like most things, if you want zero risk there won't be any reward.

      --
      If you mod me down, I will become more powerful than you can imagine....
    2. Re:Yeah, right. by TapeCutter · · Score: 2, Insightful

      Yes, damage caused by a deliberate attack is an insurance matter, not an engineering matter. Nothing can be made 100% failsafe.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    3. Re:Yeah, right. by Mr+Thinly+Sliced · · Score: 2, Insightful

      Yep this isn't about removing vulnerabilities or improving quality - this is about making someone accountable.

      Having a countract where the developer is made liable? This is management blame-storming at it's finest.

    4. Re:Yeah, right. by 0x000000 · · Score: 4, Informative

      Holding programmers accountable for their coding errors should happen inside of the corporation as they are working on the project. I don't remember which company had this, but if a developer broke the build it failed to pass a test a lava lamp at their cubicle would turn on, and until the developer fixed the build the lava lamp would stay on, which generally meant you had a certain amount of time to fix the issue before it would actually start bubbling. This way there is an incentive not to break the build, and a bit of competition between the various programmers to have the least amount of bugs or build breakages.

      Having programmers imagine every way that their program may be attacked is impossible. There will always be new attacks that take advantage of that one that the programmer had not thought of. Just like the security systems that are in place at airports around the world. If the good guys could come up with every single scenario that an attacker could take airports would be much safer, as every single scenario had already been thought about.

      I agree with you, don't put all the blame on me as a programmer.

      Oh, if I had mod points, you sir would have them!

      --
      cat /dev/null > .signature
    5. Re:Yeah, right. by rolfwind · · Score: 5, Insightful

      People like to draw the comparison with civil engineering, where an engineer may be liable (even criminally) if, say, a bridge collapsed. But this isn't really the same thing. We're not talking about software that simply fails and causes damage. We're talking about software that fails when people deliberately attack it. This would be like holding a civil engineer responsible when a terrorist blows up a bridge -- he should have planned for a bomb being placed in just such-and-such location and made the bridge more resistant to attack.

      Not only that, but civil/mechanical/other engineers usually know exactly what they are dealing with - a Civil engineer may specify the type of concrete used, car engineer may specify the alloy of steel.

      Most of the time, software engineers don't have that luxury. Video Game consoles (and still are, mostly) used to be nice that way and it was the reason they had fewer problems than PCs.

      Tell a bridge engineer that he has no absolutely control over the hardware he has to work with and that it may have a billion variations, and see if he signs his name to it.

    6. Re:Yeah, right. by timmarhy · · Score: 4, Insightful

      nope wrong. the car has doors and locks, but their are criminals out there that are skilled enough to pick the locks. how far should you raise the complexity of the hack before your off the hook?

      --
      If you mod me down, I will become more powerful than you can imagine....
    7. Re:Yeah, right. by pclminion · · Score: 4, Insightful

      It's laughable to equate an outright lack of security (lock-less doors) with subtle programming errors which result in security holes. It's not like a door with no locks. It's like a door with a lock which can be opened by some method that the designer of the lock did not envision. Does it mean the lock designer did a poor job? That depends on the complexity of the hack itself.

      Software is designed by humans. It won't be perfect. Unfortunately, software is targeted by miscreants because of its wide deployment, homogeneity, and relative invisibility, which are concepts that are still quite new to human society. I'd be willing to take responsibility for security failures in my products, but I'm sure as hell not going to do so when I'm subjected to your every idiotic whim as a client, nor will I do so at your currently pathetic pay rates. If you want me to take the fall for security failures, then I reserve the right not to incorporate inherently unsecure technologies into my solutions. In fact, I reserve the right to veto just about any god damned thing you can come up with. After all, I'm a security expert, and that's why you hired me, right? And I'm going to charge you $350 an hour. Don't like it? Go find somebody dumber than me to employ.

    8. Re:Yeah, right. by ls671 · · Score: 2, Funny

      > Holding programmers accountable for their coding errors

      We used to have a board where we would note "bozo the clown points" for anybody involved in the project, even managers ! ;-))

      http://en.wikipedia.org/wiki/Bozo_the_Clown

      --
      Everything I write is lies, read between the lines.
    9. Re:Yeah, right. by bky1701 · · Score: 3, Insightful

      Have you ever programmed? I mean this seriously. It sounds like you either do not understand the complexity of software, or just want to complain.

      Software bugs are logic typos. Have you ever made a grammatical error? Reading your post, I can say yes. Bugs are like that. In projects with tens of thousands of lines of code, it is unreasonable and completely unrealistic to expect every line to be a pinnacle of perfection, just like it is unreasonable to expect that every sentence in a book is completely without error.

      Security holes tend to be failures to predict the way that things might "align" as to allow unforeseen things to happen. Working to specification is in no way, shape, or form a guarantee that something is secure. It is impossible to predict new security holes - if it were, the vast majority wouldn't exist to begin with. Further, when dealing with other libraries and programs (like every application on the planet), there are variables beyond the programmer's control, which might not be totally as they should be. If you know of somebody who can write specs that compensate totally for unknowns, I think you should shut up and go ask them for lottery numbers.

      Come back when you have even a marginal understanding of what is involved in programming.

    10. Re:Yeah, right. by pclminion · · Score: 3, Insightful

      You're probably still in school, but I'll give you a break. Allow me to quote Knuth: "Beware of bugs in the above code; I have only proved it correct, not tried it."

      Anyway... back to the Ivory Tower with you. The hour is getting late, and I think your faculty advisor has a cup of warm milk and a cozy set of jammies ready for you.

    11. Re:Yeah, right. by danlip · · Score: 3, Interesting

      It's laughable to equate an outright lack of security (lock-less doors) with subtle programming errors which result in security holes. It's not like a door with no locks. It's like a door with a lock which can be opened by some method that the designer of the lock did not envision. Does it mean the lock designer did a poor job? That depends on the complexity of the hack itself.

      I mostly agree. My pet peeve is SQL injection attacks, because they are so frickin' easy to avoid. Any developer that leaves their code open to SQL injection attacks should be held liable (unless their employer insists they use a language that doesn't have prepared statements, in which case the company should be held liable).

    12. Re:Yeah, right. by fuzzyfuzzyfungus · · Score: 5, Insightful

      Worse, in addition to being management blame-storming(and hardly novel, at that). It is quite arguably a member of a very old and inglorious school of argument, the one that asserts that people are fully rational agents, who will perform properly if suitably threatened. Sure, Mr. "Eh, I'd rather masturbate and play Halo than check for bugs in the software I was paid to write" could probably do with a kick in the ass; but the main threat is simple honest mistakes, which humans make with some frequency, depending on their constitution and surrounding conditions.

      Anybody who honestly thinks that scary looking contracts are going to keep the engineers in line should read up on the sorts of things that happen in workplaces with real hazards: heavy machinery, toxic materials(and not the chickenshit "recognized by the state of california to cause reproductive harm" type, the "Schedule 2, Part A, per CWC" type), molten metal, exposed high voltages, and the like. Even when their lives are on the line, when the potential for imminent gruesome death is visible to even the least imaginative, people fuck up from time to time. They slip, they make the wrong motion, they get momentarily confused, some instinct that was real useful back when lions were the primary occupational hazard kicks in and the adrenalin shuts down their frontal lobe. Happens all the time, even in countries with some degree of industrial hygiene regulation.

    13. Re:Yeah, right. by chebucto · · Score: 3, Insightful

      Not only that, but civil/mechanical/other engineers usually know exactly what they are dealing with - a Civil engineer may specify the type of concrete used, car engineer may specify the alloy of steel.

      But other engineers can't specify all the variables. They have to deal with the real world - rock mechanics, soil mechanics, wind, corrosion, etc. - so they too can never know exactly what they're dealing with. Many of the worst engineering disasters occured because some aspect of the natural world was poorly understood or not accounted for. However, it remains the engineer's responsibility to understand and mitigate those uncertainties.

      --
      The English word fart is one of the oldest words in the English vocabulary.
    14. Re:Yeah, right. by Antique+Geekmeister · · Score: 4, Interesting

      Unfortunately, many of these errors are _not_ subtle. Let's take Subversion as an example. It is filled with mishandling of user passwords, by storing them in plaintext in the svnserve "passwd" file or in the user's home directory. Given that it also provides password based SSH access, and stores those passwords in plaintext, it's clear that it was written by and is maintained by people who simply _do not care_ about security. Similarly, if you read the code, you will see numerous "case" statements that have no exception handling: they simply ignore cases that the programmer didn't think of.

      This is widely spread, popular open source software, and it is _horrible_ from a security standpoint. Collabnet, the maintainers of it, simply have no excuse for this: they have been selling professional services for this software for years, and could have at least reviewed if not accepted outright the various patches for it. The primary patch would be to absolutely disable the password storage features at compilation time, by default, especially for SSH access. There was simply never an excuse to do this.

      I urge anyone with an environment requiring security that doesn't have the resources to enforce only svn+ssh access to replace Subversion immediately with git, which is not only faster and more reliable but far more secure in its construction.

    15. Re:Yeah, right. by cgenman · · Score: 5, Insightful

      Let's see. The top programming errors are:
      Let people inject code into your website through cross site scripting.
      Let people inject code into your database by improperly sanitizing your inputs.
      Let people run code by not checking buffer sizes.
      Granting more access than necessary.
      Granting access through unreliable methods.

      Geez, #7 is fricking directory traversal. DIRECTORY TRAVERSAL. In 2010! It's not like your drawbridge is getting nuked by terrorists here. Generally bridges are built to withstand certain calamaties, like small bombs, fires, hurricanes, earthquakes, etc. Being successfully assaulted through a directory traversal attack is like someone breaking into the drawbridge control room because you didn't install locks on the doors and left it open in the middle of the night. Why not leave out cookies and milk for the terrorists with a nice note saying "please don't kill us all [smiley face]" and consider that valid security for a major public-facing application.

      Further down the list: Failing to encrypt sensitive data. Array index validation. Open redirects. Etc, etc, etc. These aren't super sophisticated attacks and preventative measures we're talking about here. Letting people upload and run PHP scripts! If you fall for THAT one, that's like a bridge that falls because some drunk highschooler hits it with a broken beer bottle. Forget contractual financial reprisals. If your code falls for that, the biggest reprisal should be an overwhelming sense of shame at the absolute swill that you've stunk out.

      And yes, security takes longer than doing it improperly. It always does, and that has to be taken seriously. And it is still cheaper than cleaning up the costs of exposing your customer's banking information to hackers, or your research to competitors in China. Stop whining, man up, and take your shit seriously.

    16. Re:Yeah, right. by digitalchinky · · Score: 5, Insightful

      How many clients have you ever met that actually ~know~ what they want? :-)

    17. Re:Yeah, right. by GigaplexNZ · · Score: 2, Insightful

      You know, that's what modern operating systems with hardware abstraction layers and APIs, and high-level development toolkits are for.

      Just because it was designed with that task doesn't mean it works as designed. Not all security issues are deterministic SQL injection prone scripts and can actually be affected by timing issues amongst other things.

    18. Re:Yeah, right. by ScrewMaster · · Score: 5, Insightful

      y drafting contracts that hold developers responsible when bugs creep into applications.

      Arguably the stupidest thing I've ever heard, and I'm old enough to have heard a lot of stupid shit.

      Anybody who honestly thinks that scary looking contracts are going to keep the engineers in line

      Is a moron who would have been a candidate for early-term abortion if we could only predict such things. The reality here is this: if you try to put engineers (especially software engineers) into a situation where every line of code they produce might put them in court, you're going to find yourself with a severe shortage of engineers. There are many things that creative minds can do, and if you make a particular line of work too personally dangerous nobody will enter that field.

      More to the point however, only completely drain-bamaged organizations actually ship alpha code, which is obviously what we are talking about in this case. Because if we're not, if we're discussing production code that was overseen by competent management, conceived by competent designers, coded by competent software engineers and tested by competent QC engineers (you do have those, don't you?) then blaming the programmer alone is absolutely batshit insane, and will serve no legitimate purpose whatsoever.

      Modern software development, much like the production of a motion picture, is a complex team effort, and singling out one sub-group of such an organization for punishment when failures occur (as it happens, the ones least responsible for such failures in shipping code) is just this side of brain-dead.

      And I mean that about the programmers being the least responsible. Unless management has no functioning cerebral cortex material, they will understand and plan for bugs. You expect them, and you deal with them as part of your quality control process. Major failures can most frequently be attributed to a defective design and design review process: that sort of high-level work that happens long before a single developer writes one line of code. The reason that engineers who build bridges are not put in jail when a bridge fails and kills someone is because there are layers and layers and layers of review and error-checking that goes on before a design is approved for construction. It's no different in a well-run software team.

      If your team is not well run, you have a management failure, not a programmer problem.

      I had stupid people, I really do. And people that propose to punish programmers for bugs are fundamentally stupid.

      --
      The higher the technology, the sharper that two-edged sword.
    19. Re:Yeah, right. by Urza9814 · · Score: 2, Interesting

      No. Software is like locks or cryptography. There is not a lock in the world that can _never_ be broken. There's not a crypto system ever invented that will _never_ be broken - at least not if people give a damn about getting in. That's why locks are rated based on how long it would likely take to crack them. And crypto systems are continually upgraded - because it can be practical on today's computers and secure for the next 20 years or so, or it can be secure for maybe 100 years but take three days to encrypt a couple sentences.

      We don't yet know every way in which a piece of software can be attacked. And securing against every attack vector we know would make the cost and time of software development increase by several orders of magnitude. Software is one of those things that we can either make it practical, or we can make it very secure. You can't have both.

    20. Re:Yeah, right. by Madsy · · Score: 2, Interesting

      In projects with tens of thousands of lines of code, it is unreasonable and completely unrealistic to expect every line to be a pinnacle of perfection, just like it is unreasonable to expect that every sentence in a book is completely without error.

      Yes, I don't disagree. It seems people took my post a bit too literally. Given that you code against one static platform, it is possible to make bug-free software, but it's usually not feasible in practice. The poster I replied to felt that people were 'barking up the wrong tree' by blaming software engineers more than attackers. It is that part my post addresses. I'm not some nut who thinks that all shipped software can be free of exploits. But I do think that software which is not bug-free is in fact unfinished or has a flawed specification. That this happens to be the case for all but the most trivial software, doesn't change anything.

      And yes, I do write code. But if my code fails, I know where to put the blame. At myself. I don't do self-deception. My applications might do their task well enough in most cases, but if they contain bugs or attack vectors, they are by definition not finished.

      Putting most of the blame on attackers is a cop-out, which was my point in the previous post.

    21. Re:Yeah, right. by Grishnakh · · Score: 3, Insightful

      The reality here is this: if you try to put engineers (especially software engineers) into a situation where every line of code they produce might put them in court, you're going to find yourself with a severe shortage of engineers.

      I'd be happy to do the job. However, I'll probably never actually finish it, as I'll be checking it over and over for bugs until they get tired of me refusing to release it and sign off on it and fire me, at which point I'll move on to the next sucker^Wemployer and continue to collect a paycheck.

    22. Re:Yeah, right. by FlyingGuy · · Score: 2, Interesting

      Look, I am not going to talk down to or insult you as most of the replies have, but you have to realize a couple of things:

      • 1. There is no such thing as bug free code at least in the strictest sense.
      • 2. These days it is practically, if not absolutely, impossible to write bug free code. Why?
        • Before you have written line 1 of your program, you are running hundreds of thousands of lines of someone else's code.
        • You cannot debug the CPU microcode.
        • You cannot debug hardware, and there is a ton of functionality that is realized in hardware.
      • 3. Even if you checked absolutely ever scenario you could think of, you are going to miss a few that will lead to, you guessed it, a bug or an attack vector
      • 4. What comes after this is only humor, but if you really think about it, it is true.

      The first matrix I designed was quite naturally perfect, it was a work of art, flawless, sublime. A triumph equaled only by its monumental failure. The inevitability of its doom is as apparent to me now as a consequence of the imperfection inherent in every human being, thus I redesigned it based on your history to more accurately reflect the varying grotesqueries of your nature. However, I was again frustrated by failure. I have since come to understand that the answer eluded me because it required a lesser mind, or perhaps a mind less bound by the parameters of perfection. Thus, the answer was stumbled upon by another, an intuitive program, initially created to investigate certain aspects of the human psyche. If I am the father of the matrix, she would undoubtedly be its mother.

      --
      Hey KID! Yeah you, get the fuck off my lawn!
    23. Re:Yeah, right. by Sir_Lewk · · Score: 2, Interesting

      Common misconceptions. It is indeed possible to have perfect cryptography (http://en.wikipedia.org/wiki/One-time_pad), encryption time does not scale with encryption strength as you might expect, and modern ciphers with reasonably long keys are very fast, and are not expected to be broken anytime in the near future. Brute forcing a 256bit key is impossible in this universe with the laws of physics as we know them, and DES has been around for over 30 years now with no major breakthroughs. Using AES-256 you could probably encrypt several dozen books in a handful of minutes and reasonably expect it to remain secure until a significant cryptoanalysis of AES occured, something that it seems is not likely to happen.

      If software in general were like cryptography, we would be in much better shape...

      --
      "linux is just DOS with a UNIX like syntax" -- Galactic Dominator (944134)
    24. Re:Yeah, right. by mabhatter654 · · Score: 4, Insightful

      Except what really happens is that American coders won't sign the documents. That's where Indian and Chinese agencies will sign "whatever", cash the check, and farm it out to low paid code monkeys. Legally, they're not in the USA so your contract is Worthless.

    25. Re:Yeah, right. by SanityInAnarchy · · Score: 2, Interesting

      Bad analogy. There are, in fact, several crypto systems which have never been broken, and aren't likely to be broken until quantum computing is practical, and maybe not even then.

      Quick summary of my position: Software can be made invincible. The cost of doing so is prohibitive, especially given the amount of legacy code we have to work with. New tools like garbage-collected languages and ORMs which properly abstract SQL away can help, a lot, to reach that middle ground (instantly eliminating two of the top three on that list), and we absolutely should use them, and I'd almost call it criminal to slap something together with PHP and raw MySQL these days -- but those tools are not a substitute for thinking carefully, doing code reviews, testing, and patching anyway once a bug is discovered.

      --
      Don't thank God, thank a doctor!
    26. Re:Yeah, right. by shentino · · Score: 2

      If simple common sense coding techniques can plug most of the avenues of attack, then any developer worth his salt SHOULD be responsible for plugging them...especially in this day and age where security holes are making headlines.

      For the bridge analogy, I'd consider a buffer overflow equivalent to missing a rivet. If you know what you're doing it shouldn't be possible. Trusting user-generated input is one of the first taboos you learn about in computer science.

    27. Re:Yeah, right. by fractoid · · Score: 5, Interesting

      Even a car with no locks shouldn't be responsible, you bought the car knowing full well there was no locks, if you want cars with locks, pressure those who make cars and take your business to one with locks.

      Exactly. At a previous job I was in charge of maintaining a system for tracking clients' assets. By which I mean realtime GPS coordinates and telemetry of big frikkin trucks full of DVD players or plasma screens or whatever. Information which would actually be very dangerous Fast-and-the-Furious style if it were accessible by the wrong people. When I inherited this system I went to my manager and went "this could be cracked in about a hundred different ways simply by changing some numbers in the URL" and they said "why would anyone do that?" Later, the internal client who owned the data asked about security and I just said "it would basically need a rewrite, it has enough trouble not showing users each others' data let alone standing up to a deliberate attack" and so they swept it under the rug. I could probably still log on to one of their accounts today and find out where the truckload of free plasma screens was, if I was a bad person.

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    28. Re:Yeah, right. by xero314 · · Score: 2, Funny

      even then, a decent DBA will prevent even the crappest program from being a problem.

      When you find one of these elusive DBAs can you send me a reference, because so far I have yet to meet one even remotely tolerable, let alone "decent"

    29. Re:Yeah, right. by profplump · · Score: 2, Insightful

      I agree writing password to the disk is bad, but have you ever used CVS/SVN/etc. without stored passwords? You end up typing your password a thousand times a day, which is simply unusable.

      So there needs to be *some* way to store passwords, or no one will use the system. On some systems there's a wallet/keychain/etc. available for secure password storage, but on most there is not, and there's certainly not a universal one among Win/Mac/linux/BSD/etc., so you pretty much have to write your own if you intend to publish a multi-platform app.

      So now on top of writing a version-control system you've got to write a multi-platform secure password storage system that can daemonize and be useful on both CLI and GUI systems, and that either ships with its own encryption libraries or can use the varying libraries available on all the platforms you support.

      It can be done, but to suggest it's trivial and inexcusable not to do such a thing is silly. It's a lot of work, and it's hard to do right.

      Plus you're ignoring the fact that SVN was designed as a replacement for CVS, and users have generally been okay with CVS storing their passwords on-disk for a long time, so there's little motivation for the developers to re-work that part of the system.

      I also think you're exaggerating the risk of having the password for a remote system on your disk. While it's certainly a bad idea and not something I would do, it is secure from direct remote attacks -- an attacker would already need access to your local file system to get the password. Assuming you have a reasonable personal security stance (which you should if you're going to criticize others) the password in you SVN credentials file only lets people access your SVN services; if an attacker only wants to muck with you SVN repo and already has local disk access they could simply sabotage your local repository and wait for you to commit the changes for them, without needing your password at all.

    30. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 4, Insightful

      Software is designed by humans. It won't be perfect.

      There is a big difference between "not perfect" and "damn sloppy" and buffer overflows fall into the latter category. For decades we've been teaching students to make sure a buffer has enough space for a chunk of data before writing the data to the buffer. Any so-called programmer who does this is lazy or stupid, or both, and doesn't deserve the title of programmer or a job trying to do what real programmers do for a living. Good gravy, the quality of most software I encounter (and by that I mean software that I use) is so poor it's amazing! I find myself thinking with discouraging frequency "didn't anybody at Widget Co. even try this software out before shipping?"

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    31. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 2, Insightful

      this is about making someone accountable.

      Exactly. Why do you see that as a bad thing? Suppose instead of "contract" we say "these are the design/coding standards at this company and as an employee of this company you are required to follow them. If you don't then we will penalize you." What exactly is wrong with that?

      For the last umpteen years, in all sorts of venues social and professional, I've been seeing accountability become more and more denigrated and dismissed. "Oh let's not play the blame game!" What the hell is wrong with people that they don't want accountability from others?

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    32. Re:Yeah, right. by Maxo-Texas · · Score: 2, Funny

      Oh please... what's with this "Window" customer requirement? It's trivial for a thief to break it with a rock. So what exactly is the point of doors and locks????

      Apparently all car makers are aiding and abetting by including windows.

      --
      She was like chocolate when she drank... semi-sweet at first and then increasingly bitter.
    33. Re:Yeah, right. by the_enigma_1983 · · Score: 2, Informative

      I agree writing password to the disk is bad, but have you ever used CVS/SVN/etc. without stored passwords? You end up typing your password a thousand times a day, which is simply unusable.

      I don't get why CVS/SVN/etc even should deal with security. They're source control/management systems. For public pull/fetch/get-only servers, no password is required. For situations where security, is required, set up SSH access, or some other secure access (and use an ssh keyagent if you don't like typing your password in heaps).

    34. Re:Yeah, right. by Madsy · · Score: 3, Insightful

      Software does not fail, ever

      What are you talking about? Software fails all the time, and for many, many reasons. And if if a program is logically correct, the hardware upon which it must run can certainly fail to execute instructions correctly.

      Formally correct software does not fail in the sense that it 'suddenly' stops working. If it has a 'bug', then the 'bug' has always been there. That's what I mean with failing, because the parent of my post made an analogy between bridges and computer programs. And hardware failure is not software failure. Bridges fail due to forces outside of your control, but well-formed computer programs do not. Changes to the platform or hardware would mean a new specification is needed, which means redesign. If the platform and hardware is static, it is possible to make a perfect computer program, but it is far from feasible. There is always time and budget constraints, (I acknowledge that, I'm not stupid) but that doesn't change that software which is shipped with flaws is per definition, unfinished, or is based on a flawed specification.

      If we are going to punish people, shouldn't everyone involved share in the responsibility?

      Nice straw man there. I didn't mention punishment with one word. I contested the analogy in my parent's post.

      I hope you are not a software manager. If you are, you are completely and totally ignorant of modern software development processes and I pity anyone who works for you. [...] Get an education. Work in the field for a while. Then come back and perhaps we can have an intelligent dialog.

      Great insults. You just lost whatever sound arguments you had.

    35. Re:Yeah, right. by ultranova · · Score: 4, Interesting

      For the bridge analogy, I'd consider a buffer overflow equivalent to missing a rivet. If you know what you're doing it shouldn't be possible. Trusting user-generated input is one of the first taboos you learn about in computer science.

      I once coded a program for my own use that downloaded images from binary newsgroups, decoded them, and inserted them into a PostgreSQL database, with keywords extracted from the message. It was a nice program, handled multipart messages, and only stored each image once, using SHA1 hashes to check for dublicates - I even took the possibility of a hash collision into account and only used them as an index. No buffer overruns, no SQL injections, no nothing. Yet it crashed. So why did it crash?

      Some moron included the same image twice in a single message.

      It's fine to say "don't trust user input", but it's pretty much impossible to actually make sure that you've accounted for all possible ways it can be faulty, and this becomes harder the more powerful the program is, since using that power requires more complex input.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    36. Re:Yeah, right. by secondhand_Buddah · · Score: 4, Funny

      so Pornorama never quite made it to the market?

      --
      Participatory Governance : The only feasible option for a real democracy, where everyone really does have a say.
    37. Re:Yeah, right. by Anonymous Coward · · Score: 4, Insightful

      "Guess what, princess: coding is a hell of a lot easier to do, is simpler to test, and has less inherent risk than any other kind of engineering."

      False, false, and true, in that order. The non-inherent risk can be pretty high though, but this is also true of other types of engineering.

      "You can't put out a patch to fix a collapsed bridge" ...do you understand that the word "patch" did not originate in programming? I think the closest analogue to a collapsed bridge is unrecoverable data loss (or possibly hardware failure, which is rarely software-induced, at least on the desktop).

      "or release a service pack for a unbalanced rotor shaft that destroys a generator" ...do you know what you're talking about? You also can't reinforce a bad password-negotiation algorithm with tempered steel, but that doesn't mean ANYTHING.

      "You can't do destructive testing on a completed project in the real world."

      Sure you can. The computer equivalent would be doing it on a live system. Stupid, in either case.

      "You can't tell a client that it's going to take twice as long and he's going to have to pay you three times as much for you to do it properly."

      Up until this point I could see where you were coming from, but this is divorced from reality. Cost and schedule overruns are not disproportionately present in the computer field, and anyway the GP didn't seem to be talking about overruns, he was talking about what it costs compared to the jackass who wants to use crazy glue and popsicle sticks to build his bridge. Where some of what you said before was ignorant or hyperbole, this is just a stupid statement. I realize you're trying to turn the GP's words on him, but you failed.

      "You might have a program that takes two numbers and adds them together and spits out the answer. I type in a number and a letter, your program crashes because you're retarded and didn't sanitise the inputs. My bridge doesn't fall down because a bus drives over it instead of a car."

      Do you realize that you just made an argument that building a bride that can support a bus is easier than input-validation? It isn't, of course. I can imagine extremely stupid ways to make a bad bridge.

      "The programming errors identified are repeated, endemic errors. The attack vectors are the same every time. You have the tools to check and protect your code. Your software still breaks. That's why everyone's pissed at you. You have a mindset that any errors in the program will be trivial to correct, so you don't do it properly the first time."

      True, false, inherently imperfect tools, true, true, strawman, misdirected anger.

      "Your'e paid to produce software that performs a given function, not software that might work under some circumstances. Harden the fuck up, and do your job properly."

      Not two paragraphs ago you argued that he should be paid the going rate for software that might work under some circumstances.

    38. Re:Yeah, right. by putaro · · Score: 3, Funny

      We used to have the "Diaper of Shame". That started when one of the engineers said "If my code is broken, I will wear a diaper around the office all day tomorrow". Sure enough, it was broken and sure enough, some one went out and got a package of adult diapers.

      We let him wear it over his pants and afterwards it would just migrate to your cubicle.

      I wonder if we could still do that today....I smell a harassment suit being stirred up somewhere.

    39. Re:Yeah, right. by dkf · · Score: 2, Insightful

      The reality here is this: if you try to put engineers (especially software engineers) into a situation where every line of code they produce might put them in court, you're going to find yourself with a severe shortage of engineers.

      Actually, you're going to end up paying a fortune for software in order to cover the developers' litigation insurance premiums. Most customers prefer to have cheaper software and carry the risk themselves.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    40. Re:Yeah, right. by Sique · · Score: 4, Insightful

      It's fine to say "don't trust user input", but it's pretty much impossible to actually make sure that you've accounted for all possible ways it can be faulty, and this becomes harder the more powerful the program is, since using that power requires more complex input.

      It is nearly impossible if you want to enumerate all possible ways input can be wrong. Thus you should just enumerate all ways input is right. If you expecting for instance numerical input, don't look for ";" or ")" or anything that could have been inserted maliciously. Just throw everything away that doesn't fit [0-9]*.
      You know the input your program can work with. So instead of trying to formulate rules how input may differ from the input you want to catch errors, write down the rules the input has to follow and reject everything else. This is straightforward.

      --
      .sig: Sique *sigh*
    41. Re:Yeah, right. by discord5 · · Score: 3, Insightful

      I once coded a program for my own use that downloaded images from binary newsgroups, decoded them, and inserted them into a PostgreSQL database, with keywords extracted from the message.

      So, I'm guessing you were building a porn search engine? For "research" purposes of course.

    42. Re:Yeah, right. by daem0n1x · · Score: 2, Insightful

      It's funny those nazi assholes are trying to pin all the problems on developers. A background check? Are they fucking crazy?

      A lot less software bugs would exist if PHBs weren't trying to cut costs all the time, assigning to the lowest bidder, establishing stupid project timelines and disregarding training, planning, documentation and tests as useless time-wasters.

    43. Re:Yeah, right. by YourExperiment · · Score: 5, Funny

      Your ideas are intriguing to me and I wish to subscribe to your pr0n scraper.

    44. Re:Yeah, right. by Antique+Geekmeister · · Score: 2, Informative

      _Allow_ svn+ssh. Too many sites have managers unwilling to do so, and insistent on using HTTP with the user's own system passwords used in clear-text via HTTP, and stored in clear-text on build servers, because they cannot be bothered to allow competent managers to _enable_ svn+ssh.

      The problem isn't that servers won't allow svn+ssh access, it's that managers for such sites won't allow the "svn" user to be configured and used in such circumstances. I've run into exactly that situation on several occastions: I've set up git->svn translation systems for use in such locations, because such sites are usually so stupid they do all their work in "trunk", anyway, and the gateway works fine there.

    45. Re:Yeah, right. by dzfoo · · Score: 2, Insightful

      Ah, the ol' Reject-Known-Bad or Sanitise-All-Input paradigm. It is indeed impossible to anticipate all the bone-headed ways in which input can be botched, maliciously or not. Thus, it is then more secure to prepare a discreet list of valid input and only accept that, rejecting anything that does not conform to what you expect. This rejection is not based on a black-list of bad input to compare against, but on a sort of white-list what you assert your program can handle.

      If you would have considered this approach, your application would have rejected the message with duplicate images (perhaps logging this reaction somewhere for you to review later), and continued churning along without crashing. (Alternatively, you could have modeled your application on the Real World and realized that messages may contain, and often do, the same image more than once and expected that; but I understand that problem analysis is not very common these days.)

      Check out the OWASP Top Ten. Trying to maintain a black-list of all known bad input and all its variants is akin to an arms race in which you will always find yourself at the losing, reactionary end.

              http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project

              -dZ.

      --
      Carol vs. Ghost
      ...Can you save Christmas?
    46. Re:Yeah, right. by dzfoo · · Score: 2, Insightful

      Actually, software is applied mathematics, which can be perfect to solve a discreet problem, indeed. However, there are many factors involved in the development of software, most unrelated to mathematics and algorithms, that hasten the design and implementation, and require compromising such perfect solutions.

      It would then be more accurate to say Software is subject to business pressures, and as such it won't be perfect.

              -dZ.

      --
      Carol vs. Ghost
      ...Can you save Christmas?
    47. Re:Yeah, right. by joss · · Score: 3, Insightful

      Specification -- what specification ?

      When engineers make a new airline/bridge/circuit, they model the entire thing on a computer first. The CAD model is an unambiguous model of the plane. Important subsystems in it are modelled and analysed independently and in conjunction with the components around it.

      So, if writing software was similar, we would first model the software on a computer. Oh, er, wait a moment. In an important sense, software is the specification. The only unambiguous specification is the actual software [otherwise we could make whatever was used for the specification be the programming language].

      When someone designs a bad aircraft, the design is modelled, flaws are found and the design is improved. Nobody builds the thing until they feel pretty sure the design is right. However, software is often bad for the same reason that an initial design of anything else is bad. If it was equivalent to an airplane, windows 95 for instance, once designed, would never have been built. However, once the design for a piece of software is complete, one has created the software. With software there is no meaningful way to separate the specification and the implementation.

      So, the question boils down to: how much time/money do you want to spend ? The answer from the client is generally 'as little as we can get away with'

      --
      http://rareformnewmedia.com/
    48. Re:Yeah, right. by Anonymous Coward · · Score: 2, Informative

      Since at least 1.6, Subversion uses the relevant keystore sub-system on all major OSs - e.g. KWallet on KDE, GNOME Keyring on GNOME, etc. Prior to 1.6 I believe only Windows and OSX used native keystores. Regardless, the password was stored in the user's home directory - which, with proper/normal permissions is inaccessible to anyone other than the user and root.

      This article is Linux-focussed, but discusses Subversion's use of Linux keystores.

      Incidentally, CollabNet aren't the maintainers. They originally developed it, continue to provide devs for the project, but Subversion is an Apache project. Even before coming under the ASF umbrella it was its own project. Describing it as a CollabNet project is like describing Linux as a project of Linus' current employer.

    49. Re:Yeah, right. by Neil_Brown · · Score: 2, Insightful

      as mentioned earlier, why should someone be accountable for the results of deliberate attacks? no other industry does that.

      I'm less sure:

      As a lawyer, I draft a contract for a client, to set out the relationship between him, and a third party. The relationship breaks down, and ends up in litigation. The third party looks for every possible weakness in the contract, anything which could be in their favour. The third party wins. I get sued for negligence, for drafting a contract which did not adequately protect my client.

      "My" contract was being deliberately attacked, and failed to protect my client, but, I'd expect to be accountable for that.

    50. Re:Yeah, right. by TempeTerra · · Score: 4, Funny

      His code didn't expect two girls and one bucket

      --
      .evom ton seod gis eht
    51. Re:Yeah, right. by asc99c · · Score: 3, Insightful

      I think the main reason we have so many bugs in software is quite simply that no one really cares. Of course everyone complains about it, but when you look past the words towards the actions, you can see it more clearly.

      Everyone still buys the cheap software with tons of features. A simple bridge with a few modifications to an almost cookie cutter design costs a lot more than a very complex piece of custom business software with far more potential points of failure. And that's about right. If the bridge fails there's a good chance someone will die. If business software fails, someone might lose some money. So when you're looking at the risk of bugs in business software, paying for a lot of people to do detailed design, design reviews, code, code reviews, QA testing etc. etc. Well it just doesn't add up. The cost of getting it right is higher than the cost of dealing with the bugs.

      The reason this contract is fundamentally stupid is because a vendor following it will have to increase the contract cost by an order of magnitude. Probably some more as well to cover the risk of litigation. Then the customer will have to weigh up the costs and risks, and realise their older contract might actually be more sensible in the real world.

    52. Re:Yeah, right. by fuzzyfuzzyfungus · · Score: 5, Insightful

      The problem is not accountability, accountability is perfectly fine. The problem is incorrect application of accountability, and overbroad belief in its effectiveness.

      For "accountability" to be properly applied, it must always be connected to power. The relationship goes both ways. Nobody with power should ever lack accountability, lest their power degenerate into mere tyranny, and nobody with accountability should ever lack power, lest they merely be made the scapegoat. This is the real problem with the false "accountability" commonly found in organizational contexts:

      If, for example, you have a "release engineer" who must sign off on a software product, or a team of mechanics that must get a 747 ready for passenger flight, those people must have the power to halt the release, or the flight, if they believe that there is a problem. If they do no have this power, they aren't actually "accountable" they are merely scapegoats, and the one who does have this power is truly accountable; but is dodging accountability by assigning it to subordinates. The trouble is, in real world situations, being the person proximately responsible for expensive delays is, at best, thankless. Unless the organization as a whole is invested in the importance of that role, the person filling it will be seen as an obstruction. Obstructions have a way of being circumvented. Assigning blame under those circumstances is actually the opposite of accountability; because punishing the person who didn't make the decision will mean letting the person who did off the hook(in the same way that falsely convicting the innocent isn't "tough on crime" because it implies releasing the guilty). The second issue is the belief that being made accountable will make humans behave fully responsibly. This isn't the abusive mess that the first issue is; but it is contrafactual and tends to distract attention away from the more valuable task of building systems that are (at least somewhat) resistant to human error. Even when accountability is correctly apportioned to power, humans are imperfect instruments. If you want to build systems of complexity unprecedented in human evolutionary history, you will have to learn to build systems that are tolerant of some amount of error. Checklists, automated interlocks, automated fuzz testing, etc, etc. must all be employed; because, ultimately, "accountability" and punishment, while they have their virtues, cannot remediate failure. Executing murderers doesn't resurrect their victims. Suing programmers doesn't recover data stolen in some hack attack. There isn't anything wrong with punishing the guilty; but its utility in accomplishing people's actual objectives is surprisingly tepid. People don't want to sue programmers, they want high-quality software. People don't want to fire mechanics, they want planes that don't crash. People don't want to incarcerate criminals, they want to be free of crime. "Accountability" is one tool that can be used to build the systems that people actually want(and there are arguments to be made that it is ethically obligatory in any case); but single minded focus on it will not achieve the ultimate objectives that people are actually seeking.

    53. Re:Yeah, right. by pla · · Score: 2, Insightful

      Geez, #7 is fricking directory traversal. DIRECTORY TRAVERSAL. In 2010!

      While that (and a good many of these "bugs") sounds really really obvious, consider that many apps vulnerable to such attacks started as strictly single-user locally-running versions. Yes, you want to take basic steps to make sure your users don't accidentally overwrite system files (though any "real" OS does this for you), but for the most part, you trust a local user not to trash their own files. Permissions? If a (local) program tells me "Sorry Dave, I can't let you do that", that program immediately goes into the bit bucket.

      Now your boss comes to you and says, "Hey, I like that - Make it work via the web".

      You could do it the right way, of course. But your boss wants it this afternoon. So you throw it in an ASP.NET wrapper, make sure it still has all its basic functionality, and call it good.

      Riiiiiiight - We can see where that leads... A list of the 25 most common programming errors.


      So... Contracts holding me responsible for bugs? Yeah, fuck right off please. Others have said it, but it bears repeating even for the hundredth time - When I get to decide my schedule, budget, and when to ship, you can hold me responsible for bugs. Until then, point those fingers at the PHBs who see the barely functional proof of concept demo and say, "Why do we need to spend any more time on this? Ship it!".

    54. Re:Yeah, right. by mdwh2 · · Score: 2, Insightful

      But that's only straightforward in the most trivial of cases, where the number of possible inputs that a user might want to enter are fairly limited.

      Yes, I can right bug free code that I am responsible for if I limit the only allowed inputs to a few countable cases, each one that I can test individually. And yes, the price will go up for every extra case that I add. But the market is not interested in such software (well, outside of a few mission critical cases where they are prepared to pay for it).

    55. Re:Yeah, right. by daid303 · · Score: 2, Informative

      Brute forcing a 256bit key is impossible in this universe with the laws of physics as we know them

      RSA keys up to 768bit have been broken: http://en.wikipedia.org/wiki/RSA_Factoring_Challenge

      The RSA-100 challange, which had a strength of 300 bits: "It takes four hours to repeat this factorization using the program Msieve on a 2200 MHz Athlon 64 processor."
      http://en.wikipedia.org/wiki/RSA_numbers#RSA-100

    56. Re:Yeah, right. by Deus777 · · Score: 2, Informative

      I agree with this, but in practice I have found that it can lead to a lot of bug fixing if you don't have a complete understanding of what valid input looks like. For instance, in one project I was validating some input that should've been user names. I initially allowed for two groups of letters separated by space characters. Later I found out that some people had multi-part first names or last names that had spaces in them, so I had to account for multiple groups of letters. Later, I found out that some names have punctuation in them like . or ' or -. Eventually it got to the point where I was even allowing () because the name field was being used to distinguish between different people with the same name.

      The lesson I learned from this is that if you don't have to interpret the data, you are better off just escaping any special characters and working with it that way. Aside from limiting the maintenance you may have to go through, it allows the users to enter whatever they want without arbitrary restrictions on characters.

    57. Re:Yeah, right. by filterban · · Score: 2, Interesting
      SQL injection attacks are very easy to avoid, yes, if you know about them.

      In my time, I have seen several instances of SQL injection-vulnerable code, and 99% of the time it comes from junior level developers, who obviously have had no security training.

      Should the developer be liable, or the company that let them code without being trained?

      --
      rm -rf /
    58. Re:Yeah, right. by TapeCutter · · Score: 2, Insightful

      "Just like an insurer will not offer a policy on an uncertified structure, the day may come when insurers will not indemnify for losses involving the use of uncertified software."

      That day has already arrived in the form of recognised quality assurance standards (eg: ISO-9000). Such standards in both software and civil engineering are concerned with prevention, detection and remedy of faults rather than the individual's skill at bolting things together.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  2. Errors, Schmerrors by empesey · · Score: 5, Funny

    A real programmer can do all 25 in one line of code.

    1. Re:Errors, Schmerrors by Anonymous Coward · · Score: 5, Funny

      #include "win32.h" /* :p */

  3. Alanis ? by daveime · · Score: 4, Funny

    Kind of ironic the report is a PDF file, when another report stated that PDF accounts for 9/10 (or something like that) exploits last year.

    1. Re:Alanis ? by Anonymous Coward · · Score: 2, Interesting

      Adobe reader accounts for 9/10 exploits.

      ftfy

  4. I bookmarked this immediately by drfreak · · Score: 2, Interesting

    Some of the errors are not relevant, mainly having my code in a managed (i.e. .NET) environment. The SQL injection and XSS potential vulnerabilities are still very relavent to me. Although most of my responsibility lies in code which is only reached via a https authenticated connection, as with any other web programmer, a "trusted" user can still -especially- find exploits.

    This is even more true in inherited code. If you inherited code from a previous employee, I recommend a rigorous audit of the input and output validation. You just don't know what was missed in something you didn't write.

  5. And Number 26 ... by WrongSizeGlass · · Score: 2, Funny

    ... letting me try assembler with my level of dyslexia.

  6. Bad Idea by nmb3000 · · Score: 4, Insightful

    a novel way to prevent them: by drafting contracts that hold developers responsible when bugs creep into applications

    Holding a gun to somebody's head won't make them a better developer.

    I don't understand why well-known and tested techniques can't be used to catch these bugs. There are many ways to help ensure code quality stays high, from good automated and manual testing to full-on code reviews. The problem is that most companies aren't willing to spend the money on them and most open source projects don't have the manpower to dedicate to testing and review.

    TFA seems like it's just looking for somebody to blame when the axe falls. If your method of preventing bugs is to fire everybody that makes a programming mistake pretty soon you won't have any developers left.

    --
    "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
    /)
    1. Re:Bad Idea by Meshach · · Score: 2, Insightful

      It does not matter how well you test something there will still be bugs. A successful test does not prove the absence of bugs, it just fails to prove the presence of any bugs.

      --
      "Maybe this world is another planet's hell"
      Aldous Huxley
    2. Re:Bad Idea by evanbd · · Score: 2, Interesting

      a novel way to prevent them: by drafting contracts that hold developers responsible when bugs creep into applications

      Holding a gun to somebody's head won't make them a better developer.

      I don't understand why well-known and tested techniques can't be used to catch these bugs.

      Yeah, but you can keep them from doing it again.

      The reason people don't use these well-known techniques is very simple: it takes time and effort, and people are lazy. So until the customer tells them to, they won't bother.

      Which brings me to my biggest objection to this proposed contract. There's lots of documentation requirements, and no assignment of liability. Documentation is expensive to produce, and much of this I really don't care about. (Exception: the document on how to secure the delivered software, and security implications of config options, is an excellent idea.) For most of the documentation requirements, I don't really need to hear how you plan to do it: I just need to know that, if you screw up, you're going to be (at least partially) financially liable. And yet, the contract fails to specify that. What happens when there *is* a security breach, despite all the documentation saying the software is secure? If the procedures weren't followed, then that's obviously a breach of contract — but what if there was a problem anyway?

      I actually like designating a single person in charge of security. Finding someone to blame after the fact is a horrible idea. However, having someone who's job it is to pay attention early, with the authority to do something about it is an excellent way to make sure it doesn't just fall through the cracks. By requiring their personal signoff on deliverables, you give them the power they need to be effective. (Of course, if management inside your vendor is so bad that they get forced into just rubber-stamping everything, that's a different problem. But if you wanted to micromanage every detail of how your vendor does things internally, why are you contracting to a vendor?)

    3. Re:Bad Idea by Canberra+Bob · · Score: 3, Insightful

      Yeah, but you can keep them from doing it again.

      The reason people don't use these well-known techniques is very simple: it takes time and effort, and people are lazy. So until the customer tells them to, they won't bother.

      Which brings me to my biggest objection to this proposed contract. There's lots of documentation requirements, and no assignment of liability. Documentation is expensive to produce, and much of this I really don't care about. (Exception: the document on how to secure the delivered software, and security implications of config options, is an excellent idea.) For most of the documentation requirements, I don't really need to hear how you plan to do it: I just need to know that, if you screw up, you're going to be (at least partially) financially liable. And yet, the contract fails to specify that. What happens when there *is* a security breach, despite all the documentation saying the software is secure? If the procedures weren't followed, then that's obviously a breach of contract — but what if there was a problem anyway?

      I actually like designating a single person in charge of security. Finding someone to blame after the fact is a horrible idea. However, having someone who's job it is to pay attention early, with the authority to do something about it is an excellent way to make sure it doesn't just fall through the cracks. By requiring their personal signoff on deliverables, you give them the power they need to be effective. (Of course, if management inside your vendor is so bad that they get forced into just rubber-stamping everything, that's a different problem. But if you wanted to micromanage every detail of how your vendor does things internally, why are you contracting to a vendor?)

      I don't agree there re the lazy comment. The reason poor coders release insecure code is because they are lazy. For the rest of us, it is generally because we are told we MUST release X features by go-live date. Go-live date will not slip under any circumstances. X features are non-negotiable for go-live date. The project manager (not the development PM, the project owner) has assigned a certain period for testing, however this testing is never SIT or the such, it is usually UAT of a very non-technical nature and the devs time is spent on feedback from UAT. Development itself has virtually no proper regression / SIT / design time factored in. The development team are never asked how long realistically something will take, instead some non-technical person will tell them how long they have and then tells them to figure out how to make it happen. Specs will change continuously throughout the project so a design approach at the beginning will be all but useless at the end after numerous fundamental changes (got this one on a project I'm working on now - had my part finished, fully tested and ready to deploy about 3 months ago, then change after change after change and I'm still doing dev and if I mention that I need time to conduct SIT / regression testing I'm told "but I thought you fully tested it already a few months ago?"). This leads a dev with a fast approaching deadline, who doesn't have the authority to say "no, this won't give us enough time to test properly" and the emphasis on being feature complete rather than a few features down but fully tested and secure.

      This of course does not even touch on the subject of what happens if a third party library or other software sourced externally has vulnerabilities. Can you in good faith sign off that you guarantee a piece of software is totally secure without knowing how third party libraries, runtime environments or whatever were developed? This is not just isolated to open source, try holding MS liable for a security vulnerability that was uncovered after you deployed and see how far you get. This then starts taking us out of the realm of absolutes and into the realm of "best practices" etc. So how good is a contract that expects the signatory to follow "best practi

  7. Just Show Me the List!! by QuantumG · · Score: 5, Informative
    --
    How we know is more important than what we know.
    1. Re:Just Show Me the List!! by QuantumG · · Score: 2, Informative

      Typically such a flaw appears in web applications. As such, the attacker does not have access to the local machine, and such an attack gives him information would could aid him in gaining access (usernames).

      --
      How we know is more important than what we know.
    2. Re:Just Show Me the List!! by shutdown+-p+now · · Score: 2, Informative

      What's sad is that SQL injection and good old primitive buffer overflow still top the list...

      Regarding #2, I'm inclined to blame PHP for that thing being so high up there. Its standard library way of handling parameters in SQL statements has long been lacking - and while it's definitely possible to get right, and there are frameworks which make it easier, too much "HOWTO" and "learn in 24 seconds" PHP code out there is written without any regard to injection possibility, and it gets blindly copied over and over.

      Still, that crap is regularly seen in Java and .NET apps as well. Which is really sad, because there's absolutely no excuse to get it wrong there - all you need to do is to use parametrized statements (PreparedStatement in JDBC, the usual DbStatement in ADO.NET). Always. No exceptions. Period.

      Buffer overflow? God, how long this has been around? Still in top #3...

      Well, for one thing, it shows just how much software is still being written in C & C++ rather than managed languages. For another, it shows that a lot of software written in C++ ignores the higher-level features of the language, and uses old-style code littered with strcpy and the likes.

      I would have hoped we can do better in 2010...

  8. re:zero risk by Tumbleweed · · Score: 5, Insightful

    "Insisting on absolute safety is for people who don't have the balls to live in the real world."
    - Mary Shafer, NASA Dryden Flight Research Center

  9. Sanitization is a worrying term to use. by argent · · Score: 2, Informative

    Improper Sanitization of Special Elements used in an OS Command

    The best solution is not "sanitization" (which people usually perform by blocking or editing out what THEY think are dangerous metacharacters) but proper encapsulation. In addition, there's a misleading section here:

    For example, in C, the system() function accepts a string that contains the entire command to be executed, whereas execl(), execve(), and others require an array of strings, one for each argument. In Windows, CreateProcess() only accepts one command at a time. In Perl, if system() is provided with an array of arguments, then it will quote each of the arguments.

    Execl() is not a "C" API, it's a UNIX API. It doesn't involve quoting. On a UNIX system, you can safely take advantage of this mechanism to pass parameters and bypass either shell or application quoting inconsistencies. On Windows, even if your program is in Perl and you pass system() an array of arguments, Perl is still at the mercy of the called program to correctly parse the quoted string it gets from CreateProcess()... *unless* you are operating under the POSIX subsystem or a derivitive like Interix.

    In addition, whether you quote your arguments, use execl(), or use a smart wrapper like Perl's system(), you still need to ensure that COMMAND level metacharacters (like the leading dash (on UNIX) or slash (on Windows) of an option string) are properly handled.

    This latter problem may remain even if you pass the command arguments through a configuration file to avoid the possibility of shell metacharacters being exploited.

    Whitelists can't be simplistic. You can't ban the use of "-" in email addresses, for example. Encoding is better.

    1. Re:Sanitization is a worrying term to use. by russotto · · Score: 3, Informative

      In general, introducing complicated languages (like shell script, or SQL) is a good way to absolutely fuck yourself. God damn SQL for making it so freaking hard to just STICK DATA INTO A DATABASE SAFELY.

      Use prepared statements. A prepared "INSERT INTO FOO (BAR, BAZ, BIFF) VALUES (?, ?,?)", along with parameters from the user, is safe from SQL injection attacks, no matter the parameters.

      Unfortunately there are a few cases you can't do that. No way to use a prepared statement for an "IN" clause, for instance.

  10. Wow! It's actually an accurate and useful list! by deisama · · Score: 2, Interesting

    So, I clicked the link expecting something similar to the slashdot description and was shocked to find a real and relevant list!

    Cross site scripting? sql injection? buffer overflow errors? Those are real problems and issues that any programmers would do well to learn about.

    Really, presenting that information almost makes Slashdot seem, well ... responsible and informative.

    I wonder if I just went to the wrong site...

  11. You get what you pay for... by Dgtl_+_Phoenix · · Score: 2, Insightful

    As much as we might like to think otherwise, software development is a business. And like all businesses the goal is to generate profit by increasing revenue and decreasing cost. As such an inherent bargain is struck between consumers and software shops as to proper ratio of cost to quality. High volume consumer applications get a lot of attention to quality though less to security. It's all a matter of threat assessment verse the cost of securing against such threats. Sure we all want perfect software where the software engineer is held accountable for every bug. But we also want software whose cost is comparable to a 20 dollar an hour sweet shop programmer. The software that results is really an economic compromise between the two. Running a space shuttle or saving patients lives? You probably are willing to shell out for the high cost software engineer. Putting up your hello kitty fan club blog? You might settle for something a little bit less... high class. I've been in this business for awhile now and as much as we like to wax poetic about quality we are still just trying to have our cake and eat it too. Better, faster, cheaper. Pick two.

  12. Re:zero risk by TheLink · · Score: 2, Funny

    She's not a guy. As for her balls, she might have ripped them off the guy named Sue for all I know.

    --
  13. Blame HTML and the browser for XSS. by MikeFM · · Score: 2, Insightful

    In the case of XSS I'd say fix (X)HTML and the browsers. By default scripting should not work in the body of a page. Force a meta tag to enable it in the head part of the page or by end-user override if they really must have it. There is really no reason scripting needs to be included in the body of a web page. Trying to completely block scripting, especially in IE which just executes damn near anything, is a real pain and often ends up excluding valid data such as comments including source code. If someone uses an unsafe browser it's their problem.

    --
    At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  14. Lol @ Dangerous by JustNiz · · Score: 2, Informative

    I work as a software developer in the avionics industry.
    This list is ridiculous.
    There's nothing any website programmer could do that is even remotely dangerous compared to what we could screw up yet all I see in the list are website programming bugs.

    1. Re:Lol @ Dangerous by Capt.Albatross · · Score: 2, Insightful

      That is because the referenced article is about security (you cannot tell this from the title alone, but it is clear from the context in which the original appears.) It does not address design or semantic errors, so the 'chip & pin is broken' issue from yesterday would not be a candidate, and the chosen errors are weighted by frequency of occurrence. All in all, it is a pretty narrow scope for such a grandiose title.

  15. Actions speak louder than words by nick_davison · · Score: 2, Insightful

    "As a customer, you have the power to influence vendors to provide more secure products by letting them know that security is important to you,"

    And, as a consumer, you have the power to influence vendors to provide better employment and buying practices by letting them know that they are important to you.

    Meanwhile, the vast majority of America continues to shop at Walmart whilst every competitor goes out of business.

    "Does it get the job done? Now what's the cheapest I can get it for?" is most people's primary motivation.

    Sellers, who listen to them saying, "I want security!" and deliver that, at the expense of greater cost, are then left wondering why the competitor who did just enough to avoid standing out on security but otherwise kept their product slightly cheaper is selling many times more copies.

    So, yes, people can influence sellers with their actions. The problem is, it needs to be their actions, not their words. Even worse, they're already successfully doing just that - unfortunately, their actions are screaming something quite different to any words about, "Security is truly important to me."

  16. What it's like to do software like that by Animats · · Score: 5, Interesting

    Been there, done that, in an aerospace company. Here's what it's like.

    First, the security clearance. There's the background check before hiring, which doesn't mean much. Then, there's the real background check. The one where the FBI visits your neighbors. The one where, one day, you're sent to an unmarked office in an anonymous building for a lie detector test.

    Programming is waterfall model. There are requirements documents, and, especially, there are interface documents. In the aerospace world, interface documents define the interface. If a part doesn't conform to the interface document, the part is broken, not the document. The part gets fixed, not the documentation. (This is why you can take a Rolls Royce engine off a 747, put on a GE engine, and go fly.)

    Memory-safe languages are preferred. The Air Force used to use Jovial. Ada is still widely used in flight software. Key telephony software uses Erlang.

    Changes require change orders, and are billable to the customer as additional work. Code changes are tied back to change orders, just like drawing changes on metal parts.

    In some security applications, the customer (usually a 3-letter agency) has their own "tiger teams" who attack the software. Failure is expensive for the contractor. NSA once had the policy that two successive failures meant vendor disqualification. (Sadly, they had to lighten up, except for some very critical systems.)

    So that's what it's like to do it right.

    A real problem today is that we need a few rock-solid components built to those standards. DNS servers and Border Gateway Protocol nodes would be a good example. They perform a well-defined security-critical function that doesn't change much. Somebody should be selling one that meets high security standards (EAL-6, at least.) It should be running on an EAL-6 operating system, like Green Hills Integrity.

    We're not seeing those trusted boxes.

  17. Re:Background checks are awful and stupid by Grishnakh · · Score: 3, Insightful

    Child molesters are really a special case; they have a mental disorder. However, even there the system is fucked. A guy who screws a 16-year-old girl when he's 18 is NOT a child molester. The only people who should be guilty of true child molestation are those who molest pro-pubescent children, like 12 and under. That's where you someone is truly sick in the head, because no normal man would ever be attracted to a pre-pubescent child. But lots of men will admit to being attracted to a 17-year-old girl. Lots of female movie stars aren't much older than this.

  18. Re:Background checks are awful and stupid by Grishnakh · · Score: 3, Insightful

    Actually, I have to say I can't blame the guy. There's some freaks on this site who think it's funny to "out" someone. Someone did it to me a while ago, calling me by my real name, even though there's no references I know of in my profile to my real identity. I have no idea how he did it. It's why I never say much specifically about my employment here, or if I say a little too much, I post anonymously, even though I hate doing that because it makes it impossible for me to read any responses.

    So if Mr. Anonymous gives enough information about his crime, some freak could very well go to the trouble of spending a day digging through government websites to try to find his real identity and post it here.

  19. Re:zero risk - an even better quote from the same by cadience · · Score: 2, Interesting

    "But, no matter what you do, it will never be perfectly, 100% risk-free to fly. Or to drive, or to walk, or to do anything." I find that very appropriate given the current topics so often discussed here.

  20. And who would buy such a car? by SanityInAnarchy · · Score: 2, Insightful

    There's another problem here which we seem to be forgetting: The user.

    Users continue to buy systems with inferior security -- every dollar spent on Windows is a dollar telling Microsoft that you're OK with them taking months to fix known security bugs, and Apple is no better. Maybe this "contract" would help, though it will kill Easter Eggs, among other things, and that makes me sad.

    But even if you design the most secure system ever, it's useless if the users aren't educated about security. This was specifically a list of programming errors, but put it into perspective. There's really nothing I can do to keep people from reading your email, modifying it, or impersonating you entirely and undetectably in an email sent to someone else (which you'll never see), if you aren't willing to at least learn the basics of something like PGP. If you learn PGP and use it properly, and convince all your friends to do the same, and people still do nasty things to your email, that is the point it becomes the programmers' fault, but you have to meet them halfway.

    --
    Don't thank God, thank a doctor!
  21. Re:Background checks are awful and stupid by Ethanol-fueled · · Score: 2, Informative

    I post anonymously, even though I hate doing that because it makes it impossible for me to read any responses.

    Click on your post number, then bookmark that page. Works great for keeping track of troll^W posts.

  22. Re:Background checks are awful and stupid by Grishnakh · · Score: 2

    Sorry, no, because then that would require criminalizing relationships between 60-year-old men and 30-year-old women, and that's just wrong. Or, it would create a harsher sentence for a 60-year-old raping a 30-year old than a 20-year-old raping a 12-year-old, and that's very wrong (one's a prepubescent child, and the other is not).

  23. The most dangerous C programming error by sigma · · Score: 5, Funny

    if (alert_code = red)
       launch_missles ();

    1. Re:The most dangerous C programming error by geminidomino · · Score: 2, Funny

      //Fixed.

      void le_nap(void)
      {
                sleep 500;
      }

      if (alert_code = red)
      {
            if (le_tired) le_nap;
            launch_missles ();
      }

  24. Re:Background checks are awful and stupid by Grishnakh · · Score: 2

    Even there, I don't think anyone should be considered a child molester if the victim is 17. There's no significant difference between a 17-year-old and an 18-year-old, yet one is adult and the other isn't.

    The dividing line should be at 12 or 13, which is pubescence. Child molesters aren't even interested in 17-year-old girls, they're too old for them. They'd rather rape someone who's 5.

  25. Re:Only One Solution by jjohnson · · Score: 2, Insightful

    Thank you for an enjoyable half hour wandering through your website. You're a total nutter, but it pleased me to see that my Internet Kook detectors are properly calibrated.

    --
    Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
  26. Re:Misplaced Burden by grumbel · · Score: 2, Interesting

    And lets not forget to put some blame on the OS. If the OS would provided a framework to properly isolate applications from each other most exploids would simply turn into a harmless denial of service. I couldn't care less if a broken PDF crashes the PDF reader, but I if that broken PDF can get access to my whole system something is seriously wrong with the underlying OS. There is no reason why a PDF reader, webbrowser or most other tools should ever need access to my whole system. Access to a window to draw their stuff, access to the data they need (i.e. just the byte-stream, not the filesystem) and to a location to store their config data would be enough for most applications, yet instead they get access to everything that a user account can reach.

    There is happening some slow progress in that area with AppArmor and such, but we are still quite far away from having a native application be as secure a Flash app or a Java Applet by default. And yes, those aren't 100% safe either, but there is a different between being secure and having an exploid every now and then and providing no security whatsoever from the start.

  27. Re:Therac-25 by slimjim8094 · · Score: 2, Informative

    Yes and no. The problem was that the software could get into an inconsistent state - this shouldn't happen, but it shouldn't be a problem. And it wasn't, because the first generation had hardware interlocks that made it fail safely (beam wouldn't activate).

    Cutting corners was the biggest problem. Had they not removed the interlocks for cost reasons, nothing bad could have happened. It would have been physically impossible.

    Another couple of deaths due to the profit motive. I don't mean to suggest that the profit motive is always bad, but I don't want the company making my radiation machine to be concerned exclusively with making money.

    --
    I have developed a truly marvelous proof of this comment, which this signature is too narrow to contain.
  28. Re:zero risk by Noughmad · · Score: 2, Informative

    Only a Sith deals in absolutes.

    --
    PlusFive Slashdot reader for Android. Can post comments.
  29. Secure software: not about imagining every attack by jonaskoelker · · Score: 2, Insightful

    Having programmers imagine every way that their program may be attacked is impossible.

    Fortunately, that's typically not required for software security. In a lot of cases, you can prove that for all inputs, the software does the intended thing.

    For instance, if you know that the username variable will always be properly escaped, you don't care whether the user is called "bobby" or "bobby tables" (http://xkcd.com/327/).

    It takes a lot of discipline, though, to always consider who the origin of a particular piece of data is, to decide (based on that) exactly what amount of trust to place in it, and how to handle semi- or untrusted data.

  30. Re:Bad "it's not the programmer's fault" comments. by jimicus · · Score: 2, Interesting

    I have mod points so I would mod you up.

    However you're an AC, and lots of people browse /. with all AC's automatically downmodded to -1 so there's probably not much point. But I agree with much of what you say - with more to add.

    Most of the arguments against this article boil down to one single thing.

    "It's too hard."

    You know something? That's a lousy argument. If "It's too hard" was a real argument against reliable software, the airline industry would never have developed modern autopilots without planes crashing out of the sky because of software faults on a daily basis.

    If "It's too hard" was a real argument, NASA wouldn't have a reputation for developing almost bug-free software.

    If "It's too hard" was a real argument, OpenBSD would have had a lot more than just two remote holes in the default install in over 10 years.

    Frankly, as an industry IT (and I'm referring to all IT here, not just software development. Sysadmins are just as guilty) needs to grow up and start developing and implementing some real good-practise processes industry-wide. The engineering industry seems to have mostly managed that, and when was the last time you heard of a properly maintained car exploding for no good reason?

  31. Re:zero risk by chip_s_ahoy · · Score: 2, Funny

    Sometimes. But that is maybe a pretty good observation. Whatever.

  32. I almost stole a motorcycle by accident by alizard · · Score: 2, Interesting

    once. It was a Kawasaki 350 like mine, a couple of years older and parked next to my bike. With apparently, an identical lock cylinder. I was in the process of starting it when I looked down and saw that the shape of the instrument cluster had changed. At that point, I noticed I was starting the wrong motorcycle, stopped, moved to my own bike and took off.

    I figured it was simply a 1 in several thousand chance and was mildly amused.

    1. Re:I almost stole a motorcycle by accident by Maximum+Prophet · · Score: 2, Interesting

      Back when cars had mechanical locks, most car companies only had about 200 different keys. I've know several people who've unlocked/started the wrong car, including one enlisted guy who drove his Captain's car off base.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
  33. Re:"those O-rings will be fine.. its not that cold by hasdikarlsam · · Score: 2, Insightful

    More to the point, the astronauts explicitly agreed to the risk. They knew what they were doing.

    It's really not the same thing as bridge building at all. xD

  34. Write the Right Stuff... by hollinch · · Score: 2, Interesting

    I think most here agree to a certain point. Writing software is impossible without errors. I also feel that holding a gun at the head of a developer in order to 'persuade' him or her to write better code is not going to help. We are after all humans, we need motivation and stimulation in order to get better at what it is we need to do.

    However, what is more important is that the processes surrounding the software that needs to be produced, whether result of a client requirement or as part of a new idea, is sound and helps to avoid and remove errors.

    Developers have an obligation to take note of known exploits, known attack vectors, and make sure to avoid these pitfalls. But it is impossible to predict all types of attacks, so the processes that govern the requirement gathering, designing, development, testing and the continued maintenance on the software once released are equally important. The whole organisation is part of that quality and security process, not just the developer. Plus, the cost of the production of the software is a very important consideration.

    In light of this I found the old article about the space shuttle software development extremely interesting. It clearly shows that it IS possible to write near-perfect software, but that has its price. But a well-driven development organisation is in principle capable to produce solid, error-free code. By adjusting the mindset of people and modifying the processes that introduced errors.

    Read it if you don't know it yet, it is a very nice article that I keep in my bookmarks...

    http://www.fastcompany.com/node/28121/print

  35. Wrong approach. by malkavian · · Score: 2, Interesting

    By all means, accountability is great.
    But saying the developer is at fault is ridiculous. It opens the door for companies to mismanage projects as per usual, and clueless HR departments to hire people who don't know what they're doing, and fire people arbitrarily every time they have a complaint from someone that the software doesn't work.
    Start the responsibility with the company. If the company sends a flawed product and are to be made accountable, then the organisation needs to prove:

    * It has proper QA processes in place to test the product, and that the staff are suitably qualified.
    * The project management was performed to allow for proper specification, design and development within the normal working hours of a day, taking holidays and time lost due to usual unforeseen circumstances.
    * Training, or self learning time is allocated to enable staff to keep current with developments and issues with languages/compilers/methods they use.

    If you're going to hold a developer responsible, then it should be absolutely certain that everyone in the dependancy chain for that person is responsible. Did HR hire someone who wasn't fit for purpose? Their job is to ensure that doesn't happen. They're the start of the problem chain.
    Did management provide the logistics necessary to complete the job to a quality? If not, they should be liable.
    Did the sales team (if it's bespoke software) make impossible promises (if so, and developer opinion was overturned such that a 'broken' system was arrived at from spec, then the salesman should be accountable).
    Did the producer of the spec introduce a design flaw that resulted in the error? If it wasn't the developer, then the specifier/designer was at fault.
    Pretty much whichever way you look at it, management and HR should carry the can first, leaking down to the developer, if you're going to be sensible about it. If a place is well run, well managed then sure, have developer liability, but expect to have raised costs to cover developer's professional liability insurance.

  36. Re:zero risk by Pharmboy · · Score: 5, Funny

    is it me or is americans in love with absolutes?

    You are 100% correct. Anything less would be un-American.

    --
    Tequila: It's not just for breakfast anymore!
  37. Re:"those O-rings will be fine.. its not that cold by dbIII · · Score: 2, Interesting

    Yes, but they were betrayed by petty office politics that resulted in the warnings of experts being ignored by people that got their jobs by having the right drinking buddies.
    They wanted Feynman's name on the cover up but he wasn't going to go along with it after NASA engineers went around management and the rigged enquiry procedure and showed him the evidence.

  38. Duty of care NOT perfect code by sjbe · · Score: 2, Interesting

    ...it is unreasonable and completely unrealistic to expect every line to be a pinnacle of perfection, just like it is unreasonable to expect that every sentence in a book is completely without error.

    And every lawyer you ever talk to will agree with you AND then tell you that what you just said is irrelevant. Nobody really cares if the code is perfect. What they care about is if the code failed and someone got hurt (financially, physically, etc) as a result. If the code is designed and/or implemented such that a reasonably common and foreseeable attack (say a buffer overflow) can and does occur and harm results, then the programmer has failed in their duty of care. Doctors, (civil) engineers, lawyers, accountants and even tradesmen (electricians, etc) who engage in professional services all have this obligation to perform high quality work. When they fail in their duties they get sued and rightly so. They also carry liability insurance because nobody is perfect. Software engineers are not and should not be an exception. Just because your job is hard sometimes does not excuse you to do shoddy work that will cause harm to others.

  39. Re:Bad "it's not the programmer's fault" comments. by sw_geek · · Score: 2, Insightful

    I think that companies (management) should be held liable for poor quality of the software they produce. How each individual company distributes that liability internally is completely up to them. So whether you want to work for a company that holds its developers financially and legally liable is completely up to you. My guess is that that such companies would quickly go out of business.

    I work in the telecommunications industry managing (first line - still a pawn) a sizable team of software designers. If one of my designers creates a security hole which is subsequently successfully hacked, it could mean that 911 services go down somewhere and someone unnecessarily dies. That being said, a bug in our software typically means that someone somewhere can't download their porn.

    Here's how the process (for me) works:
    1) Customer sees a need for new functionality and communicates that to the company
    2) Request goes to Product Line Management and they get R&D involved for some preliminary time and cost estimates
    3) PLM then squeezes the timeline and passes on the date to management
    4) Management squeezes the timeline again and passes it back to the customer
    5) Customer then requests a reduced cost and an even earlier delivery date
    6) Management agrees to terms
    7) R&D is stuck developing a release in 1/3 time it takes to develop properly

    Also, the code base is millions of lines of disjointed code that are very difficult to manage effectively.

    In order to devliver software under these conditions, we depend on heroics from our developers... they're definitely overworked, but not underpayed. We also have to cut corners by only performing specific targeted testing. In the end, our products have their fair share of bugs, and some of those bugs could be catastrophic. However, that's what the customer negotiated and paid for, so that's what they got!

    Everyone of my designers would like to produce better software (not perfect - that's impossible). They're just not afforded that privilege by management and customers. So do I think software developers should held responsible? Hell no... they should learn from their mistakes, but holding them financially and legally responsible means it will take 10 times longer to develop software.

  40. The 25 most dangerous programming errors by metamatic · · Score: 2

    1. PHP.
    2. Visual BASIC.
    3. Perl.
    4. C.
    5. C++. ...better stop there before I get modded into oblivion.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  41. Re:Foreseeable and preventable harm by bky1701 · · Score: 2, Interesting

    Nonsense. You write a crappy program which you sell to me which then gets 0wned because of your bad programming costing my business lots of money, I'll want your head on a platter.

    • How about IT's heads, for not properly insolating your business from a failure?
    • How about the manager who chose the software's head, for not picking quality option?
    • How about your own head? You are in charge of the business in that analogy. You're as much responsible for your company's failures as a developer is his for software.

    There are plenty of places to assign blame, and it is always suspicious when someone jumps right beyond their own borders when doing so. There are rarely any clear lines, and while a bug might originate with the programmer, it is just as much your fault for not catching it and switching to something without that flaw. It is like people who complain when they get a virus on Windows, or complain when their webcam doesn't work on Linux: at some point, you have to choose to be responsible for your own choices. Saying, "let's sue that developer!" does not fix a single problem in software security. Not one. Microsoft will move on the way they always have under the protection of their lawyers, shady international companies will keep being shady, and buggy programs made by people you should never have trusted in the first place will still exist. You got blood, but did you solve anything?

    If you can't be bothered to program your software to reasonable industry standards for security then you ARE and SHOULD BE liable.

    Now, this line is my favorite, but it is getting a little worn out in this discussion: good luck with that. I'll try to mix it up next time.

    If it can be proven that your negligent coding was responsible for allowing real, foreseeable and preventable harm to another party then you deserve to be sued.

    There's that meaningless term again. What is "foreseeable and preventable?" Does Mary Westington, juror at your trial, have even the slightest clue what is "foreseeable and preventable" when it comes to C++ buffer overflows? Does the judge? The majority of programmers would have a hard time nailing down what that means in the context of security, especially when you get into the more complicated aspects of it.

    In programming, everything is conceptual. When you write your program, it probably isn't going to change. If we're building a skyscraper, and it falls down at some point, there is always the question of the material quality, stability of the ground, and any possible damage it may have withstood. In software, when something does go wrong- and give it time, it WILL- nothing has changed but the world around it. How do you determine if an error was "foreseeable and preventable?" There was a time when most security errors were unknown, no matter how simple. SQL injection was, for a time, a completely unprepared for issue. If you come back to software I wrote 10 years ago, run it on your computer, and happen to be attacked, is it my fault you used something 10 years old?

    The word you are missing is reasonable and it is part of the test for whether the harm that occurred is worthy of a lawsuit. Like every programmer I've ever met you have immediately taken things to ridiculous logical extremes.

    There is a very good reason for that: programmers tend to be the little guy. When laws get abused, and they will be, we're the ones who get them used against us. You, the corporate executive (derived from your previous comment - may be incorrect), have far more resources to defend yourself, and a totally different social standing. Programmers are the strange guys who talk in codes and smell. You are the pinnacle of capitalist society. Who do you think is going to have the law misused against them?

    We also tend to be fairly logical, and see things for what they are. A good number of p

  42. Preventing buffer overruns in compiler by dmhayden · · Score: 2, Informative

    I believe that most buffer overrun exploits work by overwriting a function's return address on the stack. These could be largely avoided by the compiler using either of two techniques. First, it could grow the stack into higher numbered addresses and store the return address first. Now if the code allows a buffer overrun, it will overrun the local variables and spill into the available stack space. In both cases, the chances of finding a function pointer are small. In contrast, if you grow the stack into smaller numbered addresses, then a buffer overrun has pretty much 100% chance to overwrite a code pointer (the return address).

    The other technique is to use two stacks, one for the return addresses and another for the parameters/return values. Same idea though: move the return address out of the way of the overflowed buffer.