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."

534 comments

  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 140Mandak262Jamuna · · Score: 1, Insightful

      Bad analogy. It is like holding the car company responsible for making cars without doors and locks when they get stolen. True, stealing a car is a criminal activity. But designing a car that can not be secured effectively is aiding and abetting.

      --
      sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    5. 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
    6. 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.

    7. 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....
    8. Re:Yeah, right. by razvan784 · · Score: 1

      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.

      You know, that's what modern operating systems with hardware abstraction layers and APIs, and high-level development toolkits are for. I don't think I care what hardware or even OS my stinky, SQL-injection-prone PHP code is running on. Sheesh.

    9. 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.

    10. 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.
    11. Re:Yeah, right. by Madsy · · Score: 0, Troll

      Software does not fail, ever. It either works according to the specification, or it does not. Any attack vector or 'bug' is a fault with the program which has always been there. Bridges and other structures can't be made 100% secure, but software can and should. If a piece of software is not, then either it does not work according to the specification (as in, not finished), or it was deliberately made to be faulty. This is where your analogy breaks down. A well-formed program is 'invincible', but a bridge can never be, unless someone invents a material which is resistant to corrosion, shock, extreme heat/cold, and never gets tired.

      In fact, since software cannot fail, ever, designing a well-formed specification and software following that specification exactly, is the only thing you can be responsible for as a software engineer. Since the very definition of "works according to specification" implies the absence of any vulnerabilities, is it really so hard to see why the blame is put on the software authors, in addition to the 'attackers'?

      Feel free to ship unfinished software, or make it insecure on purpose. But then don't be surprised of the opinion customers and your peers hold for you.

    12. Re:Yeah, right. by Anonymous Coward · · Score: 0

      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.

    13. Re:Yeah, right. by ehrichweiss · · Score: 1

      Marshall Sylvar the hypnotist used to say "No Risks. No Goodies." It seems to fit most everywhere in life.

      --
      0x09F911029D74E35BD84156C5635688C0
    14. Re:Yeah, right. by Anonymous Coward · · Score: 0

      It's also laughable to say that someone who didn't provide locks was "abetting" a break-in. Criminal liability doesn't actually work that way (thank God).

    15. 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.

    16. 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.

    17. 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).

    18. 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.

    19. Re:Yeah, right. by OrangeCatholic · · Score: 1

      >Since the very definition of "works according to specification" implies the absence of any vulnerabilities, is it really so hard to see why the blame is put on the software authors

      What about the client who purchased the software? Aren't they responsible for specifying what they want?

      It seems backwards to hold the vendor responsible for testing. The client has to define what the software is supposed to do.

      Toyota's Prius braking problem is a perfect example. It gets fooled when you go over a bump. Who was supposed to think of that, the developers in a lab, or the managers who ship the thing?

    20. Re:Yeah, right. by timmarhy · · Score: 1

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

      --
      If you mod me down, I will become more powerful than you can imagine....
    21. 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.
    22. 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.

    23. Re:Yeah, right. by Cassini2 · · Score: 1

      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.

      A civil engineer can be disciplined for not checking that a building is built to his/her specifications. The engineer is responsible for ensuring that the general contractor and the trades actually build what was intended. As such, many engineering contracts run for 60 or 90 days after project completion, allowing enough time to ensure all trades have been paid, and all work done to standard.

      An exception is a "design only" contract, in which case you certify nothing, because you have absolutely no idea how someone might interpret the plans.

    24. Re:Yeah, right. by Kingrames · · Score: 1

      Not quite.
      If the attacks are guaranteed, then yes, you are expected to prepare for them as best as you can. That means establishing a paper trail that exposes each and every person in management for every time that they cut costs and endangered security while they were at it.
      If you were hired to build a structure in an area where spontaneous fires occurred and you didn't even bother making anything heat-resistant, then yes, you should be sued, for being a damn moron.

      I don't think the readers of Slashdot would be the kind of programmers to do a slack-jawed job on anything, really, unless they didn't yet know a better way to do it, but there are unethical people out there who would make a shoddy program and then sell information on how to attack it to third-parties who could make a quick buck off of exploiting those vulnerabilities.
      Those people absolutely should face charges.

      --
      If you can read this, I forgot to post anonymously.
    25. 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.

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

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

    27. Re:Yeah, right. by Nefarious+Wheel · · Score: 1

      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.

      Yes - you can only predict nature, not politics or the sweeping winds of change. Bridges have been built before terrorism was a concern. The military has always known how to destroy things that civil engineers build. It's the nature of life. You can't re-write history that's writ in things that were built, you can only build anew with the new concerns in mind.

      But engineers have tried. The World Trade Towers were designed to survive an impact of a fully-laden Boeing 707, I heard. 747's were far off in the future.

      In times long past I was guilty of writing software with absolutely no concern for security at all. Why should I have? It was a quick and dirty piece in Vax Fortran/TDMS/RMS and written before the frigging Internet existed. And I found out that twenty years later, the program - a months work designed to be thrown away when new software would come in to replace it - was still in use. Hey, it worked, and it survived bit decay far better than I expected.

      But like you, I refuse - utterly - to be responsible for its security in a world that didn't exist when it was written. I've moved on.

      --
      Do not mock my vision of impractical footwear
    28. Re:Yeah, right. by the_Bionic_lemming · · Score: 1

      Bad analogy. It is like holding the car company responsible for making cars without doors and locks when they get stolen. True, stealing a car is a criminal activity. But designing a car that can not be secured effectively is aiding and abetting.

      Speaking to bad analogies
      Brick, meet car window.

      Oh wait, you need a windshield???

      --
      _ _ _ Go for the eyes Boo! GO FOR THE EYES!
    29. Re:Yeah, right. by Anonymous Coward · · Score: 0

      That'd be awesome.

      "I'm sorry, sir. But electricity flowing into your server is considered a security risk."

    30. Re:Yeah, right. by fractoid · · Score: 1

      Insurance matter? Isn't it more a criminal matter?

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    31. Re:Yeah, right. by Tuoqui · · Score: 1

      Except the difference is the Civil Engineer is expected to deal with things that are reasonable. Loads on the bridge, wind, tensile strength of materials, etc... A bomb is not a reasonable thing for a civil engineer to be protecting against.

      Whereas the Software developer is working in an environment akin to a virtual mine field. All of these common attacks could be detected and avoided ahead of time thus saving a whole lot of headache for everyone involved. Still they cant really be expected to defend against things which arent known (like the stuff on this list must be).

      --
      09F911029D74E35BD84156C5635688C0
      +2 Troll is Slashdot's way of saying groupthink is confused
    32. Re:Yeah, right. by d1r3lnd · · Score: 1

      If you come up with a process to write "invincible" code, for the love of God, don't let the Russian mob get their hands on it. I waste too much time already dealing with relatives' loused up computers.

    33. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Bollocks to that. If you think using a SQL prepared statement and passing in parameters will take 3 times the effort of concatenating parameters into a string, then frankly you don't deserve to be working as a developer.

      Writing code that avoids these sort of issues should not really take any longer for someone who actually understands what they're doing.

      Yes, the crims are responsible too, but frankly that's a bit of a dumb argument. I don't imagine you're the sort of person who'd leave all the doors and windows to your house open when you leave for work in the morning expecting everybody who passes by to be as honest and upstanding as you

    34. 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.

    35. Re:Yeah, right. by Murdoch5 · · Score: 1
      But if you did something stupid like build a great spot for a terrorist to put that bomb then you should be held responsible. It's the same thing in software, if you take a short cut to safe time / effort and that ends up being what was exploited then your still responsible. What this article is talking about is taking the right steps in the first place to assure you don't have to be the one who wrote the software, that crashed the company, that lost a million dollars all because you didn't want to invest the time.

      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.

      I agree the fault lies with who wrote the code and the attacker but you can't say because some one attacked it it's not your fault it failed. It's your fault it was allowed to fail the way it did and you should be the one held responsible. On the other hand if your software ran on a platform that was exploited and that caused your software to fail then it's not your fault. For instance, if Windows was hacked and that allowed you program to crash then your not the one who's responsible for your software crashing.

      But lets be honest, a lot of programmers, including my self, take short cuts to save time and it leads to bugs. The only difference is when my software crashes it only takes out a school computer or the prof needs to restart my program and I will be the one held responsible.

    36. 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.
    37. Re:Yeah, right. by Anonymous Coward · · Score: 0

      IAABE, and you don't have the full idea of what goes into the design of a bridge.

      1) The plans and specifications will state only the minimum requirements of the material to be used when specifically calling out a material. The Contractor is allowed to use anything that he or she wants as long as it meets a set of criteria. As for means and methods, the Contractor has full right to do whatever he or she pleases given a limited review by the Engineer. The Engineer can only say no to a method if the Engineer can provide a valid reason to say no. Thus, the Engineer's design has to take into account for multiple variations of construction. If there is a limit to what can be done, the Engineer has to set the limit beforehand or the Engineer pays for it. Programs often sell with a minimum specification list based on computer hardware, OS, and additional software needed. How is this different?

      2) While the Engineer doesn't have to design for everything, the Engineer has to design for a set of different load cases that a bridge has a high probability of seeing within its lifetime. This includes hurricanes, earthquakes, vehicle crashes, and is beginning to include bomb blasts. The design will not resist everything and is not supposed to. Instead, the design represents a series of best practices of which to minimize risk to an acceptable level. Any structural code is essentially a set of things to check for. This list is a set of things to check for when programming. How hard would it be to set up a contract that held the programmer liable for only those 25 errors? The Programmer's risk goes up, but the reward will too. Name a better way of getting rid of bad programmers than making them liable for their mistakes.

      3) There are people dedicated to ensuring that even with liability given to the work of an Engineer, that mistakes will get caught beforehand. Will all mistakes get caught? No, but a vast majority of them will. Why is it that the only major form of outside quality control for computer software known to the public is for video games consoles or smartphones?

      From the viewpoint of a non-programmer, it looks like the profession of programming could be made and standardized to the point where a programmer is liable for their code. However, the profession itself does not want to do so as it would reduce everyone down to near commodity status.

    38. 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.

    39. Re:Yeah, right. by Surt · · Score: 1

      It's both. You get money from your insurance company, and they pursue the criminals in the courts to recover if possible.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    40. Re:Yeah, right. by GigaplexNZ · · Score: 1

      Zero. Then again, I've never met any clients. I'm just a code monkey, someone else deals with meeting the customers.

    41. Re:Yeah, right. by Surt · · Score: 1

      More like creating a car door with locks that can be defeated by a slim jim. Oh wait, that's what we actually have, and they don't hold the engineers of those cars liable for theft.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    42. Re:Yeah, right. by ArundelCastle · · Score: 1

      I'll be damned if you're going to lay all the blame on me.

      I think you've hit upon it. This exact phrase appears on the contracts, next to your blood stained signature.

    43. Re:Yeah, right. by Bengie · · Score: 1

      your bridge analogy only works if you add in that the engineers can also make any part of the bridge bomb proof. The issue is double checking all of the bridge's surface area for non-bomb proof parts. SQL injection is still high on the list for attacks and it EASILY protected against. I learned about paramerterized input the first day of working with datasets at school.

      Validate your input at all 3 tiers, paramaterize your input, use stored procedures, good to go.

      For cross site exploits, just validate, escape, and/or filter input from the client.

      I mean, really. Some of this stuff is just common sense. Hmmm, if the client input HTML/XML/Javascript into and input then it gets displayed/integrated into the website, I wonder what they could do.... hum-de-dum.. nah, no one would want to do that.

      The only time I don't validate my data is if I'm expecting an integer. Then I just parse the string into an INT and catch any exceptions.

    44. Re:Yeah, right. by ScrewMaster · · Score: 1

      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.

      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. Furthermore, as I pointed out in my previous post in this thread. the programmer is, by definition, the person least responsible for problems in shipping code. Unless your company takes a programmer's untested work, burns it to a CD and ships it to customers, you've just completely ignored all the other people involved in software development. For example, the quality assurance folks whose job it is to find bugs. Not to mention the architects and designers who are responsible for making sure that basic design is correct before a programmer even touches a keyboard, and a host of other people who have a role in producing quality software. If we are going to punish people, shouldn't everyone involved share in the responsibility?

      Linus said it best: "How should I know if it works. That's what QC is for."

      Get an education. Work in the field for a while. Then come back and perhaps we can have an intelligent dialog.

      --
      The higher the technology, the sharper that two-edged sword.
    45. Re:Yeah, right. by Anonymous Coward · · Score: 0

      It's 2010. You can't make any case for SQL injection and cross site scripting still being on the list.

    46. 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.

    47. 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.

    48. 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!
    49. Re:Yeah, right. by scdeimos · · Score: 1

      Yes - you can only predict nature, not politics or the sweeping winds of change.

      Really? Could you tell me when the next earthquake will occur in California?

      The World Trade Towers were designed to survive an impact of a fully-laden Boeing 707, I heard. 747's were far off in the future.

      Last I heard they sustained the impacts just fine - it was the heat generated from the fuel fires that caused the floor trusses to sag and eventually compromised the core columns in the buildings.

    50. Re:Yeah, right. by kenj0418 · · Score: 1

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

      I think the guy in this Dilbert cartoon knows what he wants: http://www.michelleyaiser.com/blog/?p=63 :-)

    51. Re:Yeah, right. by mweather · · Score: 1

      This would be like holding a civil engineer responsible when a terrorist blows up a bridge.

      It's more akin to holding a civil engineer responsible when your bomb-proof room blows up.

    52. 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)
    53. Re:Yeah, right. by SanityInAnarchy · · Score: 1

      Working to specification is in no way, shape, or form a guarantee that something is secure.

      In particular, either the specification is too vague -- as GP suggests, "absence of any vulnerabilities" -- or the specification is specific enough to be nearly code already, in which case, the security bugs will be in the spec as well as the code, assuming the "software engineer" does a perfect job of translating the specs into code. If they don't, there will be more security bugs.

      --
      Don't thank God, thank a doctor!
    54. Re:Yeah, right. by mabhatter654 · · Score: 1

      yes and know. When our IT department started having to follow SOX and other code management tools, the first thing to managers was "put in a ticket".

      What will happen is developers will become full-blown assholes about every little thing. Everything will be required to be signed off in triplicate. Code will be awesome but delivery will push out 6 months minimum.

    55. 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.

    56. 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!
    57. Re:Yeah, right. by M.+Baranczak · · Score: 1

      Some of us like having lava lamps on our desks.

    58. Re:Yeah, right. by Anonymous Coward · · Score: 0

      I completely agree with you, why not just tell programmers not to introduce security holes?

      The clearer we tell them the less likely it is to happen. When I write specifications, the first page is devoted entirely to the following:

          "This software must not have any bugs or security flaws"

      In 72pt font. And since I've started doing this I've never seen a single fault in any software. It amazes me that NASA and the US government still struggle with such a simple concept as creating perfect software when I mastered it at the age of 12.

      Perhaps we could get together an collaborate on a book, "And you call urself a programmer???" has a nice ring to it don't you think?

    59. 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.

    60. Re:Yeah, right. by caywen · · Score: 1

      No, we won't lay all the blame, only half. You're still fired, though.

    61. Re:Yeah, right. by Anonymous Coward · · Score: 0

      After reading your entire rambling post, I'm not exactly clear what your point is. Are you suggesting that programmers should be contractually liable for any security flaws in their software, or are you just venting at the parent to take their "shit" seriously?

      In fact, how does your post relate to the parent poster at all, who seemed to only be commenting on the relation to civil engineering? What in his post suggests that he doesn't take his "shit" seriously?

      It is ironic that the only post that seems to be whining is your post, in which you demand that others stop whining.

    62. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Sorry your argument doesn't hold up to Convertibles and Dunebuggies.

    63. Re:Yeah, right. by Anonymous Coward · · Score: 0

      The one where the guy doesn't know his requirements should have been given a console version of "Hello, World"!

    64. Re:Yeah, right. by Anonymous Coward · · Score: 0

      I see where you are coming from, but without context it sounds dangerously close to "make it work"-ism or "I don't give a damn"-ism.

      I also see the point of the parent of your post.

      They're not contradictory.

      Computer programs are like (mathematical) functions whose general behaviour is known but whose specific values are unknown. You have some function f which has some property (like f(x) >= 0 for all x). You can design a program for f (say that the program provides function g), but occasionally g(x) != f(x). That's what a bug is.

      Figuring out f is usually very difficult. The grandparent post is talking about g.

    65. Re:Yeah, right. by timmarhy · · Score: 0, Troll

      it was as if 1000's of OSS nerds cried out and then were silent.

      --
      If you mod me down, I will become more powerful than you can imagine....
    66. 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.
    67. Re:Yeah, right. by KingMotley · · Score: 1

      I'd sign that contract. No changes, and I wish others were forced to as well.

    68. Re:Yeah, right. by Kjella · · Score: 1

      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.

      Since you started this analogy, I'm fairly sure a civil engineer designing a bunker would be liable. But there's a cost of designing all buildings to be bunkers, and I doubt most companies would pay it.

      --
      Live today, because you never know what tomorrow brings
    69. 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"

    70. Re:Yeah, right. by Anonymous Coward · · Score: 0

      You seem to be considering every possible bug. Your analogy of the civil engineer is correct but leaving a website blatantly open to a cross site script isn't like having a bridge blown up by terrorists. It's more like using metals that will corrode in corrosive environments eventually leading to failure of a critical part of the bridge.

      I don't expect software to be free from hackers sitting at the terminal and applying malicious patches (a good analogy for planting a bomb on a supporting beam), what I do expect is that it is secure against all the common attack vectors often used by script kiddies and spammers. The comparison to civil engineering in this case would be looking at widely varying weather conditions, ground samples, possibilities of natural disasters and other external forces that are daily trying to take down our tallest buildings.

      If a hacker has access to a terminal then you're 0wned. If a terrorist with a bomb has access to the bridge you're 0wned.
      If a script kiddy is playing with some SQL injection and you're 0wned, then quite frankly you didn't do you due diligence. Go back to the logic diagrams, or equations, or whatever the civil engineering comparison is.

      I wonder if anyone will read this before it gets modded into the ground by poor programmers.

    71. Re:Yeah, right. by vcgodinich · · Score: 1
      When will people realize that software / computers are -way- more complex than bridges?

      As such, Computers / Software are way less of a "product" and more of a "service" than Bridges.

      Even the most product like static programs are constantly updated, optimized and fixed.

      Just take a look at some of the software we try the hardest to make not fail, aircraft guidance systems. These fail ALL the time, and that's just life.

    72. 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.

    73. Re:Yeah, right. by Anonymous Coward · · Score: 0

      (And I'm going to charge you $350 an hour. Don't like it? Go find somebody dumber than me to employ.)

      oooh... oooh... Pick Me, Pick me!

      Judging from this persons well reasoned response, i can assure you, i am definitely dumber than he is.

      So send me in coach, I'll do it for only $325 an hour!

    74. 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
    75. Re:Yeah, right. by vcgodinich · · Score: 1

      A big hole in the ground says they didn't survive "just fine".

    76. Re:Yeah, right. by Anonymous Coward · · Score: 0

      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.

      That's actually a great analogy. You CAN get a civil engineer to design a bomb-resistant bridge. And like you said, you can expect to see the construction last much longer, and the cost will be well over triple. You want hardened software, you CAN ALREADY GET IT. As long as you are willing to pay for it.

    77. 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
    78. 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.
    79. Re:Yeah, right. by Anonymous Coward · · Score: 0

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

      As someone with more than a marginal understanding let me add this to your comment:

      The majority of critical security flaws are often due to the client changing their specifications mid-project, or attempting to force the developers to use specific solutions which don't integrate properly within the constraints the client requires.

      Or in other words, to be quite blunt, much of the time the critical flaws in custom software solutions is due to the simple fact that it is actually impossible to deliver a 100% secure product which conforms 100% to the customer specifications. If you've ever had to program custom stuff you'll already understand what I mean, and if you've never had to do so it's doubtful you'll ever really understand.

    80. Re:Yeah, right. by Anonymous Coward · · Score: 0

      We do something similar where I work, only instead of shame, we go right to the wallet.

      Every time a developer breaks the build, they put $10 in the jar. And another $5 per (work) hour that the build remains broken. If a developer makes the build unstable (failing tests) and doesn't have it fixed in 30 minutes, they put $5 in plus another $1 for per hour it remains unstable.

      At the end of each quarter, the developer with the highest percentage of clean checkins gets it all. We do percentages because a couple of us spend a lot of time in meetings and don't check in as often. Also, one of our metrics that determines our bonuses is the health of the build, so we've got a lot of incentive to get things right.

    81. Re:Yeah, right. by celle · · Score: 1

      Engineers rarely get sued for mistakes, that's what the corp is for. So you want to hold programmers directly responsible for mistakes and outside actions that are often beyond their control then lets start with their bosses and upward who weren't doing their job in quality control by under paying them for the risk and not checking the code produced.

    82. 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).

    83. Re:Yeah, right. by Brett+Buck · · Score: 1, Redundant

      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.

                  I have to ask you the same question - have *you* ever written a program? Each line should be perfect, and when it's not, it's like a grammatical error? The serious bugs are certainly not like typos. A strange new type of program called a "compiler" can find most typos.

                The biggest sort of problem with programming is making sure that different parts work together and don't give unexpected results. Every routine or section can be absolutely perfectly written and but not interact the way you expected. Looking at it line at a time and determining that line's "perfection" will get you pretty much nowhere.

    84. 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.

    85. Re:Yeah, right. by Anonymous Coward · · Score: 0

      You must be young and/or inexperienced. If you weren't then you would realize that nothing in this universe is ever "finished" in the way you describe. Nothing, period. Perfection is an impossible goal when taken literally.

    86. Re:Yeah, right. by starfishsystems · · Score: 1
      Have you ever made a grammatical error? Reading your post, I can say yes.

      Care to point it out for us? You raise an interesting idea, but throwing false accusations around is not a great way to gain favor for it.

      Neither is scorn. Too bad for your interesting idea. Oh well, it was pretty much based on hyperbole anyway. Let me restate it for you, just to be sure we're all on the same page.

      The nonexistence of bugs in a given body of code is not provable. Some bugs constitute security exposures. Therefore security is not a provable property of code. Therefore complainers are ignorant and should shut up.

      If we followed your reasoning, we would make no effort to improve code, since perfection is impossible. But as the parent correctly noted, the top-rated security errors are quite characteristic. This is not at all the case as you make it out to be for doing nothing, it appears, but rudely telling people to shut up.

      Everyone's entitled to their opinion, but your defeatism pretends to insight and maturity that it plainly lacks. Go to the back of the class.

      --
      Parity: What to do when the weekend comes.
    87. 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.

    88. Re:Yeah, right. by Anonymous Coward · · Score: 0, Insightful

      You're a bunch of prissy prima donnas. 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. Unlike a software bug, you can't put out a patch to fix a collapsed bridge, or release a service pack for a unbalanced rotor shaft that destroys a generator. If you cross a couple of phases on parallelled transformers, you don't get to change a variable and try again. You can't do destructive testing on a completed project in the real world. 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.

      Your 'terrorist blowing up a bridge' straw man is a crock of shit. We're talking about functions that you could expect the completed product to perform, not fucking miracles. 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. 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.

      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.

    89. Re:Yeah, right. by starfishsystems · · Score: 1

      This is why Bruce Schneier predicts that the pressure for code assurance will ultimately be brought by insurers, because it's a matter of risk management, which is what insurers offer.

      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.

      --
      Parity: What to do when the weekend comes.
    90. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Err, accessing SVN repo via SSH from a *developer*'s box.... Why would it be unsafe to store the password?

      Consider that the dev box is haxed. Are you worried now that suddenly someone can ssh into a remote repo? Or are you more concerned that someone can now insert their own changes into the code tree that are later pushed by the dev to the central repo anyway?

      If a developer can't secure their own workspace, then not sure I would trust their code *EVER*.

      But aside from that, storing passwords that are not meant to be stored is a bad idea. And yes, git is better :)

    91. Re:Yeah, right. by mvdwege · · Score: 1

      subtle programming errors?!

      Most security vulnerabilities are due to programmers simply not checking for exceptional conditions, like overflowing the bounds of an array or a buffer, or not checking input. These are not subtle errors. These are egregious errors.

      And they're surprisingly common. On one of the programming newsgroups I read, at least once a month someone has to remind a poster to 'always check the condition of open. The language even has an idiomatic construct to do so, yet it is ignored regularly.

      Dammit, if I as a sysadmin can write my Perl scripts with every check in place, how hard can it be for a professional developer?

      Mart

      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    92. 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.
    93. Re:Yeah, right. by Eivind · · Score: 1

      prepared statements solve 99% of it, agreed. You still need to find a reasonable solution to the remaining 1%, but even that isn't hard.

      I'm talking of things like, sometimes it arises that it'd be useful to do some variant of "select $column_name from footable order by $some_column" which isn't, atleast not with all databases, doable as a prepared statement. (whereas stuff like "select name from person where id = $variable" which is much more typical, is.)

    94. Re:Yeah, right. by zalas · · Score: 1

      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.

      Is this behavior new? I've been using svn+ssh for a few years now and I have to type in my password every time I run Subversion (sometimes multiple times depending on the action), regardless of whether I was on Windows, Mac or Linux. In all cases, Subversion launches the ssh client on the system and asks you to feed it your password.

    95. Re:Yeah, right. by ]ix[ · · Score: 1

      A more sensible comparison to civil engineering would perhaps bee that we in that field have to comply to a large number of standards and norms whenever we design and build stuff. Sanitizing database input is fairly equivalent to meeting fire code standards. I.E. Escalators that catch fire tend to do so because of litter. Littering is illegal but the escalator should still be safe to use in a real world environment.

      Having standards and holding coders liable would indeed make progress slower but it would also add a new level of much needed maturity to the software industry.

      --
      This is my sig, show me yours
    96. Re:Yeah, right. by ultranova · · Score: 1

      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.

      Indeed. However, the customer disagrees, gives the job to whoever does it cheapest, and damn security. Then, when the shit they bought blows up on their faces, they'll get angry and write articles demanding the incompetent minimum wage programmers they insisted using due to being cheap be held legally liable for being worth every penny they got paid, and not a single one more.

      Stop whining, man up, and take your shit seriously.

      Hey, you make people compete with Chinese slave labour for lowest pay, don't be amazed they'll also compete for lowest quality.

      --

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

    97. Re:Yeah, right. by Endo13 · · Score: 1

      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.

      I understand what you're getting at, but that's only true in the real world when the software is installed and used in such a way that it can never be altered by other software, or even faulty hardware. (A console video game is a good example of such software, and that is also why console video games in general have far less problems than PC games and software.) And that is precisely what makes it impossible to code "invincible" software, which is what all the irate people responding to you are getting at.

      --
      There is no -1 Disagree mod. Slashdot.org/faq defines mod options. USE IT.
    98. 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.

    99. Re:Yeah, right. by maxwell+demon · · Score: 1

      OK, but buffer overflows are not visible to the customer. So probably the better analogy would be cars with locks which accept any key, not just yours. Have you ever tried to open your car with another key? I guess not. You simply trust that your car company did it right. And if they didn't do it right, you certainly would blame the car company for using insecure locks, not the customers for not checking that the locks really don't work with any keys.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    100. Re:Yeah, right. by prider · · Score: 1

      You (usually) get what you pay for. Assign a mediocre programmer to the task and you'll probably get mediocre results..

    101. Re:Yeah, right. by putaro · · Score: 1

      Perhaps that ssh password also allows a shell login. Perhaps they use the same password in multiple places. Storing passwords in plaintext is bad. Remember also that developers "boxes" these days often include laptops which have a bad habit of being left in coffee shops and other public places.

    102. Re:Yeah, right. by Anonymous Coward · · Score: 0

      This post makes me wonder if you actually read what the GP was saying.

    103. Re:Yeah, right. by Anonymous Coward · · Score: 0

      It's even more laughable than that. It's actually considerably easier to defeat an ordinary door lock than it is to find and exploit most security holes (such as a buffer overflow vulnerability).

      The difference is that the latter can be automated, so even though the houses of the world are not in any reasonable sense secure it is still impractical for thieves to rob everyone. Whereas once an exploit is developed it can result in millions of compromised systems within mere hours.

    104. Re:Yeah, right. by stephanruby · · Score: 1

      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.

      Bad analogy. It's more like a client/boss requests a proof-of-concept prototype. And in the case of a civil engineer, the engineer may deliver just a miniature model bridge, but that's ok, he knows there is no danger in mistaking the tiny miniature bridge from an actual real bridge.

      In the case of a software engineer, it's not all that simple. Your prototype may have taken you a weekend to code. And you've trained the marketing guy to click in just the right places so as not to crash your app, but to the customer, what he sees is a perfectly working app, and that's what he wants right away. It's not uncommon to hear that proof-of-concept one-off prototypes are launched into production as soon as they've been demoed to the higher-ups.

      And yes, enforcing strict contracts is one way to mitigate such problems, but part of the solution is also for the non-technical customer/client/project manager to also study the field of software engineering. A generic software checklist (written by someone else) is great, but that's really only the tip of the iceberg. The customers/clients/stakeholders should really be familiar with books like "The Mythical-Man Month", "Peopleware", "Code Complete", etc. Don't assume that just because you're smart, you can just ignore the accumulated wisdom of an entire field. It's really not that simple.

    105. Re:Yeah, right. by Anonymous Coward · · Score: 0

      ... 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.

      Right, great example, like simple lock bumping that's been around for decades - patented in 1928, known & shared in areas within the trade for over 3 decades, and increasingly publicized throughout most of the last decade - in the media, on radio & tv, in slashdot ..... No reason for a lock designer, manufacturer, tester, marketer, distributor, seller or installer to be aware of that.

    106. 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.

    107. Re:Yeah, right. by serviscope_minor · · Score: 1

      Use svn+ssh and passwordless SSH by upolading your ssh public key to the SVN/CVS/DARCS/GIT/Mercurial/Bazaar/whatever server you use. It works on all unix and I strongly suspect Windows as well. You can protect your keys with a password so that you only have to enter it occasionally.

      Works great for me.

      Of course, if your servers don't support ssh access, then you're stuck.

      --
      SJW n. One who posts facts.
    108. Re:Yeah, right. by AlbertinaJane · · Score: 0

      I'll make sure I never hire you! There are developers on the market who take their jobs seriously. They made a bug. They're to blame. (Not that I'm defending attackers, but I just don't care!) You need to write your code right. The way you're putting it, you can write it good and well and demand decent money. But since no one is paying decent money you're writing poor code. That just makes you a poor developer.

    109. Re:Yeah, right. by Lord+Lode · · Score: 1

      I think that behaviour is as old as SVN. When I check out a repo the first time (or commit to it the first time), SVN has always asked me whether I want to remember the password.

      And last time I think even a KWallet dialog popped up, so maybe the makers of SVN recently did something to this?

    110. Re:Yeah, right. by jonaskoelker · · Score: 1

      And it is still cheaper than cleaning up the costs of exposing your customer's banking information to hackers

      Not if you have insurance.

    111. Re:Yeah, right. by juletre · · Score: 1

      All of them. They want ~everything~

      --
      "he, who has quotes in his signature, is a douche" - unknown.
    112. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Hmm... I'm not too keen on car analogies. Where'd that pizza analogy guy go?

    113. Re:Yeah, right. by Anonymous Coward · · Score: 0

      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.

      Engineers designing large buildings do consider the possibility of deliberate attack, among a range of other possibilities, and design them to be resistant. Obviously they can't guarantee that a building will survive anything up to a nuclear explosion - but they can say things like "If you plant a bomb to destroy this structural member, then these other members will take the strain.".

      Software could use this sort of risk analysis. And it will have it - as soon as customers accept that it will increase costs, and pay accordingly.

    114. 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'!"
    115. Re:Yeah, right. by dkf · · Score: 1

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

      They know they want you to read their mind, stop asking questions, and have it all built already. For free.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    116. Re:Yeah, right. by Anonymous Coward · · Score: 1, Insightful

      I think you are being a little hard on the fellow.

      His thesis is correct, but it does fail to address the enormity that a truly full specification of a large piece of software would be.

      It would be like an engineer having to specify the alignment of every crystal of iron in some rebar or the position of all the different particles in an aggregate of concrete.

      An engineer can use a material with the expectation that it will behave in a predictable way to build larger structures. In software we still don't have the materials engineering part sorted yet. How can we expect to build reliable bridges without dependable girders? This is something which needs to be addressed.

    117. Re:Yeah, right. by dargaud · · Score: 1

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

      Happened to me once. The specs were basically: 'we want the same thing as this 15-year old device, but with modern hardware (to replace 2 racks of analog electronics) and software'. After a few months of design, we did the install (both electronics and software) in an afternoon, the client was happy, basically haven't heard since.

      --
      Non-Linux Penguins ?
    118. Re:Yeah, right. by u38cg · · Score: 1

      Security is rubbish everywhere. In this fair city in which I live, there is a building open to the public. Within that building, there is a room, little used, but accessible. Within that room there is a cupboard. Within that cupboard there are twelve antique silver candelabras, each worth several thousands of pounds. And any member of the public could walk in with a rucksack stuffed with newspaper and be out in minutes.

      --
      [FUCK BETA]
    119. 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*
    120. Re:Yeah, right. by Anonymous Coward · · Score: 0

      He made a analogy. Idiot.

    121. Re:Yeah, right. by dollargonzo · · Score: 1

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

      --
      BSD is for people who love UNIX. Linux is for those who hate Microsoft.
    122. 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.

    123. 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.

    124. Re:Yeah, right. by Sique · · Score: 1

      In your special case you wanted your files to be unique, and yet you didn't handle your input accordingly. If you want elements to be unique you have to handle each element separately. So either you handle only one image per message (and either reject all messages with more than one image or stop processing after the first image decoded), or you break down your input into the single elements before feeding them to the storage.

      --
      .sig: Sique *sigh*
    125. Re:Yeah, right. by YourExperiment · · Score: 5, Funny

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

    126. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Code does not exist in a vacuum.

      A "system" comprises many interacting bits. Even if a programmer wrote "perfect" code, the security of that code can be bypassed when someone else changes the Web server or SQL server configuration, or there is an "upgrade" of the Web or SQL server in which some defaults have changed.

      That's not anything under the control of the original programmer.

    127. 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.

    128. Re:Yeah, right. by bit01 · · Score: 1

      it was as if 1000's of OSS nerds cried out and then were silent.

      As opposed to the CSS nerds who live in blissful ignorance. And are proud of it.

      ---

      Open source software is everything that closed source software is. Plus the source is available.

    129. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Have you read the list? Most of the errors are embarrasingly simple to fix.

      Validate user input.
      Check pointers and array indices.

      That is not rocket surgery. It's like a bridge engineer not measuring the length of the planned bridge or not building a foundation first.

    130. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      The "asking if it wants you to remember the password" is actually new. It didn't do that until version 1.6.x. RHEL still ships with version 1.4.2, by default, which just stores it without asking.

      Your site administrators are apparently competent enough to have installed the a more recent, non-vendor provided release of Subversion on your site. Good for you: but it would still be amusing to "su" to the various usernames in /etc/passwd and home directores in any NFS shared /home directory, scrape the passwords in $HOME/.subversion, and email them to their owners to mention how poor the security is for the sites using such password based access. It's especially funny to use the passwords to access those site's webmail servers, and send them their passwords using their own accounts.

      No, I don't do this to my clients or partners. But I do show up at security meetings with the printout of passwords, as a demonstration of proof of the concept.

    131. 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?
    132. Re:Yeah, right. by HyperQuantum · · Score: 1

      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.

      Another example: just try to find a movie on imdb.com that has an empty 'Goofs' page. I never encountered one.

      --
      I am not really here right now.
    133. Re:Yeah, right. by zsau · · Score: 1

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

      Sounds like win-win. You get more money, they get more safety. I would also throw in official licensing requirements. And in North American style, a professional doctorate would be the minimum qualification.

      Of course, people could hire just anyone to write their software. But they don't hire just anyone to design their bridges...

      --
      Look out!
    134. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Computer systems can be very complex beasts.
      But the 24 most dangerous programming errors are not.
      I'll give you race conditions (frequent source of Heisenbugs).

    135. 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?
    136. 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/
    137. Re:Yeah, right. by Civil_Disobedient · · Score: 1

      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

      This is why you always use a surrogate key and compare the hashes later in a validation routine. /normalization nazi

    138. Re:Yeah, right. by chthon · · Score: 1

      The most striking example I have ever seen of this was in an aluminium mill. We produced rolled aluminium, and from we had all kinds of machines to process aluminium rolls and to create sub-assemblies.

      One day an ambulance needed to come. On one of the processing machines where a roll of aluminium was processed through another roll, the night shift had invented a nifty little game : running on the rotating aluminium roll. The result was that one of them slipped and lost his leg in the roll where the aluminium sheet was processed.

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

      They always know exactly what they "want", they never know what they actually need.

    140. Re:Yeah, right. by caluml · · Score: 1

      I once coded a program for my own use that downloaded from binary newsgroups

      Did the newsgroups start alt.binaries.pictures.erotica perchance?

    141. Re:Yeah, right. by caluml · · Score: 1

      prepared statements solve 99% of it

      What's the 1% they don't solve? (Genuine question...)

    142. Re:Yeah, right. by ciggieposeur · · Score: 1

      However, the profession itself does not want to do so as it would reduce everyone down to near commodity status.

      As a fellow engineer myself and former programmer, I think it's more that the profession already is considered commodity status and the employers don't want the salary bar raised by having enforced standards.

      Think about the mentoring process of a new hire engineer. They've often got a partner slightly-older-hire plus an experienced mentor vetting all their work. That's perhaps 1.8 full-time salaries per unit of full-time work. When you're talking about a minor miscalculation leading to hundreds of thousands of dollars (minimum) wasted on a failed design, that makes a lot of sense. But for code? How many employers would be willing to pay $65,000 a year for 30 lines a day?

    143. 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.

    144. Re:Yeah, right. by Anonymous Coward · · Score: 0

      *SOB*
      None ...

    145. 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.

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

      His code didn't expect two girls and one bucket

      --
      .evom ton seod gis eht
    147. Re:Yeah, right. by Anonymous Coward · · Score: 0

      ssh-agent.

    148. Re:Yeah, right. by Pharmboy · · Score: 1

      That is actually an interesting way of rewarding good work and punishing bad work, but doesn't that put more pressure on speedy fixes rather than quality fixes when a bug is found?

      --
      Tequila: It's not just for breakfast anymore!
    149. 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.

    150. Re:Yeah, right. by Anonymous Coward · · Score: 0

      My longevity and health is dependent on a computer algorithm in the machine that I use every night. I have Obstructive Sleep Apnea and use a CPAP machine to help me breath at night. It has complex algorithms that adjust the air pressure to keep my airway open while I sleep. Without it I stop breathing and go into hypoxia.

      As a former programmer (now Network Engineer) I normally would side with you about the civil engineering comment. If this were Outlook 2010, or some other non-critical application I totally and 100% agree with you, however on the above application I certainly want something better than "well it looks ok, we'll put it out there, and when the bugs get reported we'll fix them".

    151. Re:Yeah, right. by Anonymous Coward · · Score: 0

      I see you never coded for the old Pentium chips. Software depends on hardware, hardware can be flaky, and there's sometimes nothing you can do to detect or adjust for it.

      Don't divide, intel inside.

    152. 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.

    153. 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!".

    154. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Who wouldn't rather masturbate and play halo than debug code? I mean come on... given the choice?

      I used to be a programmer - was slow and methodical - took a lot longer to write the equivalent code when compared to my immediate peers - but my code required a lot less debugging and maintenance and was easy for someone else to pick up what did what and why.

      Enter new hacker who could chuck together 'the same thing' in a few days and blam! The 'why can't you do this much work' type questions started and things got worse from there - the fact that we started to spend a lot more time debugging stuff didn't seem to hold any sway - in fact I ended up spending most of my time cleaning up after said hacker - pointing out how I could get the SQL server to execute SQL statements etc

      I lost the will to live (well, program at least). Left that job after a few more years of abuse - so as I'm no longer in the industry I say hell yeah, regulate the fuck out of it until no one wants to take the responsibility any more and open source should be made illegal as no one can be held to book for its flaws.

      Or perhaps we should realise that while silly mistakes are avoidable, we all still make them. Complex systems result in emergent properties. Whatever you make someone will break it. Can you guarantee the platform for which you code will not cause problems with your code due to a change in an api or a language version? Is the complier 100% free from bugs? Is the processor on which you code free from bugs? Questions questions questions...

      Can't remember the last time I wrote any serious code for anything other than an embedded micro controller for my own personal interest...

    155. Re:Yeah, right. by Daniel_Staal · · Score: 1

      If it's a contract that has been signed by both parties, it's not worthless. Sure there are more complexities in multinational contract law, but just because someone is in a different country from you doesn't mean you can't have a contract with them.*

      *(Various terms and exclusions apply. May not be applicable in all areas. Make sure to check with a lawyer before taking legal advice from the Internet.)

      --
      'Sensible' is a curse word.
    156. Re:Yeah, right. by vegiVamp · · Score: 1

      SQL injections as a top attack vector in 2010 seems more like a bridge with a slot labeled "bomb goes here", to me.

      --
      What a depressingly stupid machine.
    157. Re:Yeah, right. by mdwh2 · · Score: 1

      Trusting user-generated input is one of the first taboos you learn about in computer science.

      Yes, but only because we hold ourselves to a higher standard.

      Perhaps engineers shouldn't trust that people will always follow the safety and design limitations, but they don't get hold responsible for them (e.g., if someone drives a truck over a bridge, when it exceeds the safety load).

      Another issue, why is it the developer, and not say the testers, management, or the people who sold it for something beyond its original expected capabilities?

      And if I'm going to be responsible for the losses when things go wrong, I'll also expect a share in the profits when things go right - they can't have it both ways.

    158. 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).

    159. Re:Yeah, right. by mdwh2 · · Score: 1

      I once wrote a general newsreader, that included binary reading. It was funny when people would send me bug reports of the image decoding, and you can guess what kinds of images these were ... so there I am, genuinely having to download and decode pr0n for research and development purposes.

      Then of course I had to keep the images around, for my test set.

    160. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Gross negligence should be penalized. If you publish a critical, publicly accessible, internet-facing application without even considering any of these 25 issues, it's negligent.

      Another problem is that anyone who can print a business card can call himself a software "developer" or "engineer". So an additional step might be to stop allowing people who "don't know what they don't know" to publish applications by copying and pasting together code they don't even understand.

      While observing that railroad tracks in my town had not gone underwater during a flood, my father told me they were built to 100-year flood standards. As a software engineer, my first thought was "Wow, it sounds like someone competent actually designed the tracks. I never see this in software." He explained that those engineers have to be licensed, which helps to filter out the totally clueless.

    161. Re:Yeah, right. by pnewhook · · Score: 1

      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.

      If we're talking about making software engineering responsible just like any other engineering discipline (which I COMPLETELY agree with) then to corporate entity would take responsibility, not an individual engineer. That's one of the benefits of working under a corporate umbrella - legal indemnity (in most countries anyway).

      Unless of course you are contracting yourself out for engineering services, in which case you are most likely liable for the correctness of what you produce.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    162. Re:Yeah, right. by bakawolf · · Score: 1

      ...because you've rooted the boxes?

    163. 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

    164. Re:Yeah, right. by pnewhook · · Score: 1

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

      Not always. Sometime you have a jackass programmer that refuses to listen to any pre-written architecture, refuses to listen to QA, and thinks that he can just produce code in complete isolation from the rest of the team. He believes that code will be perfect and if there are problems, its because of all the other idiots he's forced to work with.

      I've had the unfortunate experience of having such an arrogant ass working for me, and the only way to fix this is to kick his incompetent butt off the team.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    165. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Until someone attaches a debugger or injects code, then all bets are off as implied in the summary.

    166. Re:Yeah, right. by pnewhook · · Score: 1

      The same reason why Ford was responsible for the Pinto design that allegedly resulted in the gas tank exploding on a rear end collision. A collision is not normal use of the car (could be considered an attack) but they were still held responsible.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    167. Re:Yeah, right. by pnewhook · · Score: 0, Flamebait

      Open source software is everything that closed source software is. Plus the source is available.

      ... with socialist overtones (lets work for free and release it so everyone can enjoy it! But if they do enjoy it, they have to work for free too!)

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    168. Re:Yeah, right. by Bakkster · · Score: 1

      Agreed. Again, if this is like every other engineering discipline, the firm will be held responsible when their Quality Management processes failed (aka, not following ISO or other processes), the engineer will be held responsible when they knew there was a problem (or remained willfully ignorant) but signed anyway (check their e-mails), and QC or programmers will be held responsible for falsifying data (fraud).

      You know, the way it should be.

      --
      Write your representatives! Repeal the 2nd Law of Thermodynamics!
    169. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Link or GTFO! :-)

    170. Re:Yeah, right. by sjames · · Score: 1

      Even more are skilled with bricks and specialize in yanking out expensive radios. Must the glass all be secured with metal mesh and a latch mechanism at the top? Should the car refuse to not roll the windows all the way up and latch them when the car is turned off? Should the wire mesh be replaced with steel bars in case the criminals bring heavy wire cutters? Should the door be impervious to the jaws of life in case the crooks are REALLY determined?

      Back to software, password recovery mechanisms are sometimes abused to gain access, especially by disgruntled admins. Should password recovery be made impossible? But then the admin can change the password just before resigning in a huff.

    171. Re:Yeah, right. by savuporo · · Score: 1

      Happy to do the job ? Now where are these TPS reports ?

      --
      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
    172. 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.

    173. Re:Yeah, right. by Sique · · Score: 1

      Most problems arise because your program code is not the one that is actually evaluating the input. If you feed for instance a field content which you expect to be a name into a database, then it's the database actually doing the evaluation. It's easy to forget in such a situation that you still have to check the input for sanity, because it's not your code that throws up if the input is malformed.

      But it's your coding responsibility what you feed to your backend. Just throwing stuff at it and hoping the error handling of the backend will take care gets you into trouble. I also know that many of us somehow take pride if our input routines somehow make sense of any input, and if someone tries an SQL injection they actually want their programs jump to the "Error: SQL injection attempt!" routine.

      But as much fun it is to play silly buggers with potential attackers, I think it makes more sense to stupidly filter out anything that you don't expect. You don't need to outright reject the whole input, but if you just ignore anything that is not [0-9] in my example, e.g. interpreting "1); DELETE * FROM table_1" as "11", you get a program which is very tolerant with user input and still doesn't risk any attacks.

      --
      .sig: Sique *sigh*
    174. Re:Yeah, right. by T.E.D. · · Score: 1

      Actually, there are perfectly good languages that automatically check all buffers lengths when used (or even at compile time). That would mostly remove the human element and we wouldn't have to rail against the occasional (or even usual) developer who leaves out a check.

      Instead folks insist on using crappy non-checking languages like C++. That's fine if you like C++, but don't complain about developers messing up and leaving off a buffer check, when the means for eradicating all buffer overflow errors is a simple language switch away. You knew what could happen when you picked up the gon...

    175. Re:Yeah, right. by CodeArtisan · · Score: 1

      You're a bunch of prissy prima donnas. 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. Unlike a software bug, you can't put out a patch to fix a collapsed bridge, or release a service pack for a unbalanced rotor shaft that destroys a generator.

      You do get the chance however to, say, recall a few million of your Toyotas. I would also argue the fact that a real-time embedded control system for a helicopter is inherently more difficult to test than a rotor shaft.

    176. Re:Yeah, right. by Anonymous Coward · · Score: 0

      OK, so let's enumerate all of the right messages and images that should have been allowed by his program. Actually I'll pass on doing that and leave it to you. If you finish before you die of old age, let me know.

    177. Re:Yeah, right. by JoeMerchant · · Score: 1

      Yeah, they're shipping alpha software, because it's the most "cost effective" thing to do.

      Arguably, management that ships alpha software should be the ones whose butt's are on the line for any failures, since they are the screwballs who underbid the contract in the first place. There are processes that can mitigate risk, I have worked in industries where they are mandated (medical), and now work in a shop where they are not... this shop is a little envious of the "luxury" of those processes, since they are in a competitive field where the other guys bid projects without those safety layers, they have to play that way too, or lose contracts. Nobody has died as a result, yet.

      Some industries have adopted the quality processes voluntarily, automotive used to do it just to save money, though Toyota still seems to have let some things slip lately. The "big players" have more to lose from the occasional spectacular screw-up, so they take the time to be more careful. But little guys who may or may not be in business a couple of years from now regardless, have little incentive to play it safer.

    178. Re:Yeah, right. by JoeMerchant · · Score: 1

      In my experience, out of work Americans will sign almost anything to get a paycheck.

    179. Re:Yeah, right. by danlip · · Score: 1

      The GP is talking about column names passed in as variables, which they correctly stated is not doable with prepared statements. I'd use something like an enum or some other fixed set of values that the user input would have to map to, and construct the SQL from that. In any case never inline user input directly into an SQL statement.

    180. Re:Yeah, right. by nahdude812 · · Score: 1

      The problem is the same as that which makes antivirus software imperfect. What you're describing assumes perfect knowledge of the input domain, and that simply doesn't exist except in extremely simple cases (such as validating an integer). As systems grow past single-value systems, the number of possible permutations increases as a very high order exponential.

      It's not possible to do the sort of work he was doing while validating against a list of known-good inputs. The known-good list would only be a set of messages he identified in advance as being valid, and that doesn't provide a very meaningful program (if it already has the set of good messages to validate against, it doesn't exactly need to go fetch them). So you try to write whitelist or blacklist rules which reasonably cover the possible domain, but by doing so it requires that you anticipate the sorts of situation which leads to valid and invalid inputs, and must accept that there'll be a certain false positive and false negative rate. It sounds like he anticipated a lot of potential problems (eg, the same image submitted in different posts), and corrected for them already. One he hadn't anticipated got past him (the same image twice in the same post).

      Antivirus software's whole job is to provide input validation for the operating system. The entire industry exists exclusively to do this, and the collective human expertise in that industry has so far not yet been up to the task of accomplishing this task successfully (and if there was a magic bullet, it would only take a single person to discover it to revolutionize the industry). It's not like that whole industry is going to read your post, slap its forehead and declare, "If only we had thought to validate the input and only accept it if it's good!" The domain of possibilities is simply too large to meaningfully cover it, and the same is true of newsgroup parsing.

    181. Re:Yeah, right. by weld · · Score: 1

      You are right. No one is talking about absolute 100% security here. The top 25 is the most egregious and easily remedied defects. These are the easy ones folks. Ones we know alot about and know how to prevent.

      We need software to be free of them because organizations are under attack through application vulnerabilities. Has anyone heard of Google/Aurora or Heartland Payment Systems? Both organizations were breached through software defects.

      When the environment changes software needs to change. You wouldn't take a regular car off road into a military usage and expect it to perform well. We are expecting the software process to not change (too expensive, too hard, 100% security is impossible) yet perform well under constant scrutiny and attack.

      We need to change how we build software and having customers set security requirements is the best way to do it.

      -Chris

    182. Re:Yeah, right. by mujadaddy · · Score: 1

      I'm a bad person, and I'd like to subscribe to your newsletter.

      --
      Populus vult decipi, ergo decipiatur...
      "Force shits upon Reason's back." - Poor Richard's Almanac
    183. 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 /
    184. Re:Yeah, right. by Anonymous Coward · · Score: 0

      And also from the bridge analogy, it is very hard for even the dumbest of users to accidentally misuse a bridge/road/door/etc... in such a way that it fails catastrophically. People consider using these things to be obvious, but when it comes to using computers logic and reason seem to fly out the window. People try to do strange things with software that they wouldn't attempt to do with anything else. Programmers cannot be expected to predict the infinite number of ways in which software can be abused, intentionally or otherwise. "When you think you made something idiot proof, they make a better idiot."

    185. Re:Yeah, right. by FrankSchwab · · Score: 1

      The fact that you had such an arrogant ass working for you is indeed a management failure.

      Yours.

      A programmer that "refuses to listen to any pre-written architecture, refuses to listen to QA, and thinks that he can just produce code in complete isolation from the rest of the team" should be fired. Plain and simple.

      If you had the authority to do so and didn't, then you are the management failure.
      If you didn't have the authority, and didn't request his firing from the person who had the authority, then you are the management failure.
      If you didn't have the authority, did request his firing from the person who had the authority and was told "no", then the management failure is the person who said "no".

      --
      And the worms ate into his brain.
    186. Re:Yeah, right. by danlip · · Score: 1

      Can you even graduate from school with a CS degree today and not know what an SQL injection attack is and how to avoid it? Or are we talking people without degrees? (I graduated before HTTP even existed, so I don't know personally, but it seems everyone should know the basics of security for web based apps).

    187. Re:Yeah, right. by darkvizier · · Score: 1

      prepared statements solve 99% of it

      What's the 1% they don't solve? (Genuine question...)

      I think he already answered that. His second paragraph talks about the occasional need for dynamically generated SQL. Dynamically generated != prepared, therefore you have your 1%.

    188. Re:Yeah, right. by tbuskey · · Score: 1

      I like the bridge analogy. It's well understood in terms of security, relability and accountability. The problem is mapping physical bridge flaws to software flaws. Then defining exceptions due to misuse, environment and unknown or acts of god.

      An engineer has a 4 year degree, then takes the EIT exam. With an EIT, they are mentored by a PE for X years, keep a journal. They can then take the PE exam. They get a stamp that's legally binding to put on blueprints, etc. The builders can't bid on contracts w/o a PE stamp on the design. Deviations w/o a stamp incur legal liability.

      So a new bridge is needed. The old one is torn down, a temporary bridge is put up until funding for the new bridge is obtained. It needs a stamp. The funding doesn't happened and the new bridge gets put off by the politicians. The temp bridge is now 30 years old. temp bridges are rated for 10 years and have a 2x factor of safety. It collapses with a car on it (White River Jct, VT in the 90s).

      IMO, the bridge was over built. It should have failed 10 years earlier :-)

      Other scenarios, other locations:
      The temp bridge is rated for 10 tons. Someone drives a 20 ton vehicle over it & it fails. A car strikes one of the support beams. The town skips painting & other maintenance. Ice builds up duing a 100yr flood against the main pillar, The town starts using salt on the roads because climate change now freezes the road all the time. The contractor didn't use the specified bolts. Lightning strikes the bridge (& it has no towers so lightening rods are not needed). Winds make the bridge sway. Someone builds a tower nearby that increases the wind effect.

    189. Re:Yeah, right. by chochos · · Score: 1

      I would like to read the clauses in the contract stating that the manager's also liable when they push software out the door before it's ready.

      If the programmers are going to be held responsible, they also must have the authority to specify realistic release dates. What happens when some product manager forces everyone to just commit what they have and release something the programmers know it's not ready yet, or hasn't been thoroughly tested?

      What liability will the testers have, in organizations with dedicated QA people?

    190. Re:Yeah, right. by dzfoo · · Score: 1

      >> It's not possible to do the sort of work he was doing while validating against a list of known-good inputs.

      I say it is possible. It may not be possible in every application, but on his particular example it certainly is. His problem was due to a misunderstanding of the problem domain: instead of treating each image as a unique entity in itself, irrespective of message, and attempt to compare it to the already retrieved images through some special mechanism, he made the assumption that images would be unique within a message. As it turned out this assumption was wrong, but it was unnecessary to begin with.

      I take your point and agree that knowing the entire input domain of a complex system may be impossible, but disagree that this will result in an inherent bug in the system. That which is not known should be treated as such and either ignored, dealt in some way, or flagged for later consideration, as the situation requires. You know the things you know, and therefore you can detect the things that you do not.

      >> The domain of possibilities is simply too large to meaningfully cover it, and the same is true of newsgroup parsing.

      This is true for the case of antivirus software, because over the years the problem domain (and in fact, the marketing claim) has been expanded to include not only known threats but future, unknown threats as well. For this, an attempt is made to make sense of the entire input domain, using heuristics and other statistical analyses, with the assumption that a certain percentage of false positives (or false negatives) is acceptable. This makes their effectiveness and usefulness rather questionable, depending on your threshold of acceptance.

      The same may be true for newsgroup parsing, if indeed the author intends to detect stuff he doesn't even know exists, nor in what form; but this is typically not the case. It is much more likely that the application scope will be narrowed to solve specific known problems. This is certainly the case in the example provided by the poster, where a specific and discreet problem exists: to retrieve all unique images from all messages. He made the assumption that the entire input domain was known and then proceeded to implemented the application accordingly, without any acknowledgement to the limitations of this design.

      That last part is bad design and bad practice, not an inherent flaw of software in general.

              -dZ.

      --
      Carol vs. Ghost
      ...Can you save Christmas?
    191. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Perhaps a better analogy would be a bridge designer who accidentally left a self-destruct mechanism in plain view. Script kiddies are attackers of opportunity only.

    192. Re:Yeah, right. by sjames · · Score: 1

      Tell him the bridge may be periodically "installed" in a new location not of his choosing and it is expected to contract or stretch to fit. He'll probably put you on call blocking and warn his colleagues that you're a time waster. You'll be the butt of jokes for years to come.

    193. Re:Yeah, right. by tholomyes · · Score: 1

      This, coupled with the fact that most software is written using software written by other people. Plus, the mathematical proofs of even the simplest functions are insanely long... *shudder*

      --
      When did the future switch from being a promise to a threat? -C. Palahniuk
    194. Re:Yeah, right. by Grishnakh · · Score: 1

      Exactly right. It's funny how managers are always trying to blame subordinates for their own failures. If you're the manager, you're the one in control, not your underlings. If your underlings aren't doing what they're supposed to, then fire them and get new underlings. If your own management won't give you control over your own underlings, then your upper management is to blame.

      Underlings are just that: underlings. They have no control over anything. As a manager, you're supposed to structure your business to reduce the risk from problems that any one underling can cause, and you're supposed to stay on top of what your underlings are doing. If you're "too busy" to do that, then your company has a management failure.

    195. Re:Yeah, right. by dzfoo · · Score: 1

      Very true, but my point is that software is not inherently flawed because humans write it, just as mathematics is not inherently flawed because humans discovered or created it. Software is flawed for many other reasons, mostly business pressures and time constraints, which are inherent in the development process itself, and not in the software.

          -dZ.

      --
      Carol vs. Ghost
      ...Can you save Christmas?
    196. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Even strongly reviewed code in tightly controlled circumstances, under perfect design standards will sometimes get bugs in it. Even after being reviewed in triplicate and having been in use for 10 years, there are still critical flaws in some software.

      Some flaws, even those that ARE remotely exploitable, are too subtle to detect by standard means.

      I know someone who does binary code analysis and has found vulnerabilities in EVERY single software package he's looked at. Granted, he's one of the best in the world at it and has found bugs in the asm code of software that has been through extensive unit-testing, automated and manual black box and 'crystal box' source code security reviews and exhaustive verification of every input...

      In some cases, the best modern compilers still generate subtle machine-level exploitable bugs with perfectly written code.

      This is not akin to building a highway bridge... It is more akin to building a space station. Sure, with exhaustive testing, it can be MOSTLY good, but there will ALWAYS be bugs in the system.

      I would wager the best of the best (hacker-wise) could find some issues in military-grade security software that spends more time in security audits than most software spends in the entire development cycle.

      How exactly does one "hold someone accountable" for this sort of issue?

    197. Re:Yeah, right. by Anonymous Coward · · Score: 0

      80% of the population should not be able to defeat it.

      (I just chose 80%, but it could be whatever percentage you are willing to pay for)

    198. Re:Yeah, right. by ScrewMaster · · Score: 1

      Not always. Sometime you have a jackass programmer that refuses to listen to any pre-written architecture, refuses to listen to QA, and thinks that he can just produce code in complete isolation from the rest of the team. He believes that code will be perfect and if there are problems, its because of all the other idiots he's forced to work with.

      I will repeat myself. If your team is not well run, you have a management failure. If you're going to keep an incompetent or insubordinate employee on the payroll, there'd better be a damn good reason. And you're right: an arrogant ass serves little purpose in a team programming environment. Either get the prick some counseling ... or fire his ass because he's a liability.

      The fact is, competence, in a team setting, has as much to do with normal human interaction as it does with technical ability. It just does, because in the end, what matters is the product, not the individual programmers. No matter how intellectually capable an individual may be, if he's a dick he's probably more trouble than he's worth. Get rid of him.

      --
      The higher the technology, the sharper that two-edged sword.
    199. Re:Yeah, right. by Arthur+Dent · · Score: 1

      You're a bunch of prissy prima donnas. 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. Unlike a software bug, you can't put out a patch to fix a collapsed bridge, or release a service pack for a unbalanced rotor shaft that destroys a generator.

      You do get the chance however to, say, recall a few million of your Toyotas. I would also argue the fact that a real-time embedded control system for a helicopter is inherently more difficult to test than a rotor shaft.

      You're a bunch of prissy prima donnas. 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. Unlike a software bug, you can't put out a patch to fix a collapsed bridge, or release a service pack for a unbalanced rotor shaft that destroys a generator.

      You do get the chance however to, say, recall a few million of your Toyotas. I would also argue the fact that a real-time embedded control system for a helicopter is inherently more difficult to test than a rotor shaft.

      It's closer to 400,000. Which is significantly less than "a few million".

    200. Re:Yeah, right. by nagnamer · · Score: 1

      I've had the unfortunate experience of having such an arrogant ass working for me, and the only way to fix this is to kick his incompetent butt off the team.

      In human resource management, there is a personality type called "maverick". This is the type of person that will do the job much better than anyone only as long as s/he is not made to follow rules, protocols, regulations and such BS. In other words, they suck at following rules. If you push them to follow rules, they might appear as any other incompetent jack ass, or they may even sabotage your work, or even do it your way, but subtly twisting your words just to prove a point. Now, in such cases, most managers simply sack the maverick, and hire a normal dude. But in reality it sometimes pays off big time if you let the person have her/his own way. And they also sometimes excel when working in isolation or from home, too, because they do believe (and sometimes partly justifiably) that everyone's a moron. It's a gamble, of course, but as with all gambling, jackpots are huge.

      Of course, your particular worker might be an asshole, but I also know from my own experience of working at a company that has plenty of workers with really bad attitude (newspapers are like that usually, not a very friendly place to work in) that lots of managers think their worker is at fault or being an asshole simply because bad attitude gets to them.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    201. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Sounds to me like intel is at fault. It's their processor that builds the stack in reverse causing buffer overflows to even be possible in the first place!

    202. Re:Yeah, right. by nagnamer · · Score: 1

      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.

      Or they will be pressed to sign bullshit contracts (I'm talking about those Americans who actually read them) and then suffer full consequences.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    203. Re:Yeah, right. by MikeBabcock · · Score: 1

      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.

      That's exactly what real Professional Engineering is all about. Sign on the dotted line that the building is safe. Sign on the dotted line that the road will carry the load. Sign on the dotted line that the bridge will survive specific winds.

      What we need is a few actual Professional Software Engineers taking responsibility for this crap just like out in the rest of the real world. Why do we treat software so much more laxly than building codes when bad software can cause hospital shutdowns or nuclear meltdowns?

      --
      - Michael T. Babcock (Yes, I blog)
    204. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 1

      I think it is fairly safe to say that - whether there is an "attack" or not - the general quality of software would improve if we started by firing people who can't perform simple programming tasks. That will achieve something useful and doesn't displace the accountability or create an imbalance between accountability and power.

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    205. Re:Yeah, right. by nagnamer · · Score: 1

      Whatever you make someone will break it.

      Not to mention the most unusual ways 'normal' people use software. Like trying to go to a website by typing the URL in the YouTube search box, locating a video that happens to be related to that site, clicking the link in the info box. That person now believes that it's the correct way, because it worked a few times. How can you predict those things? You can't. People are creative like that.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    206. Re:Yeah, right. by TemporalBeing · · Score: 1

      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.

      Please upgrade your installed version of SVN.

      Yes, at one point that was true, but it hasn't been for a long time. If I recall correctly, SVN 1.3 or 1.4 started using encrypted passwords on Windows, and as others have stated that data has always been stored in your home directory. SVN on Windows doesn't even use the registry (though the CollabNet installer does add some registry entries if you use it, but they are minimal and only useful for locating the installed versions).

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    207. Re:Yeah, right. by geminidomino · · Score: 1

      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.

      Absolutely. The last thing you want is your input telling your wife about the pr0n you're scraping to test your news reader. ;)

      Nah, I'm just busting balls. I'm actually of the same school of thought. Sanitize-all-4-life

    208. Re:Yeah, right. by nagnamer · · Score: 1

      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?

      I would argue that it would be far more efficient and beneficial for the company if they simply trained their people to pay attention to stuff like common errors mentioned in OP.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    209. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 1

      I wasn't suggesting anything like that. I think it is fairly safe to say that - whether there is an "attack" or not - the general quality of software would improve if we started by firing people who can't perform simple programming tasks. That will achieve something useful and doesn't displace the accountability or create an imbalance between accountability and power.

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

      That's not the point. The failure to check the buffer size is the symptom not the problem. The problem is sloppy programmers who can't or won't apply the tools they have been taught to the environment in which they are operating. The same guy who fails to perform a buffer check in C will fail to do something else in another language - because he is lazy or incompetent. And I'm not talking about someone who once in 100,000 lines of code accidentally makes this type of error because of a long shift or externally imposed deadline but someone that habitually is lazy or incompetent. Unfortunately there are all too many people fitting that description who are calling themselves programmers.

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

      Ummm isn't that what the degree (or whatever) is for? I mean this is pretty basic stuff....

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    212. Re:Yeah, right. by nahdude812 · · Score: 1

      His problem was due to a misunderstanding of the problem domain

      Certainly. So are most (arguably all at some level) software bugs, either because of imperfect understanding or because the domain has since shifted. With perfect knowledge of the input domain (and unlimited development time), no actual validation is required, non-validating standard logic will handle it. Unfortunately we neither have perfect knowledge nor unlimited time.

      I'm not saying he didn't make a mistake, I'm just saying it's impossible to never make a mistake.

      That last part is bad design and bad practice, not an inherent flaw of software in general.

      I agree, the flaw is not endemic to software, it's endemic to humans writing that software.

    213. Re:Yeah, right. by nagnamer · · Score: 1

      Ummm isn't that what the degree (or whatever) is for? I mean this is pretty basic stuff....

      So you want to enforce a degree through contract? Why didn't you just say so!

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    214. Re:Yeah, right. by StikyPad · · Score: 1

      I see where you're going with this. If we all just unplug our lamps, our code will be bug free. Very clever.

    215. Re:Yeah, right. by geminidomino · · Score: 1

      Can you even graduate from school with a CS degree today and not know what an SQL injection attack is and how to avoid it?

      Yes.

      Based only on my coursework (and not personal knowledge), it's not been covered. Nor should it have been. CS != Programming.

    216. Re:Yeah, right. by zalas · · Score: 1

      The behavior I've been seeing in all my time using Subversion (but I don't think I've used 1.6 yet) has been:
      1) If you use svn:// or https:/// or http:/// it'll automatically store credentials on commit so that you don't have to type in your password again on the next commit
      2) If you use svn+ssh:// it'll prompt you for your password every time you perform an action and sometimes multiple times if you're doing svn diff, etc.

      I also tried digging around in my ~/.subversion/auth directory and found that:
      1) svn:// (svn.simple) causes plaintext passwords to be stored
      2) https:/// (svn.ssl.server)'s auth cache doesn't contain any plaintext passwords
      3) svn+ssh:// creates no auth cache data
      4) ~/.subversion is world readable but ~/.subversion/auth is only user-readable

    217. Re:Yeah, right. by pclminion · · Score: 1

      So, because there exists one or more persons who have X level of stupidity, therefore all persons have X level of stupidity. Nice argument.

    218. Re:Yeah, right. by Hurricane78 · · Score: 1

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

      Behold my AXE! :D

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    219. Re:Yeah, right. by Hurricane78 · · Score: 1

      Of course you could. It would be something different if you just did it to him like that.

      But if someone says something outrageous, you make a official bet. With official, signed consequences. And there you go.
      Ask someone from the UK if you need tips. I heard they make bets on everything. :)

      I think a full-scale ballet outfit with tutu is a better punishment though. Including dancing the swan lake dance. ;)

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    220. Re:Yeah, right. by Bogtha · · Score: 1

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

      If it takes twice as long to complete a project when you take basic things like SQL injection into consideration, you are a terrible developer. Yes, no software is bug free, but most of this list is beginner stuff. The reason why it is so prevalent is not because it is twice as hard to write something with a basic level of security, it's because nobody holds developers accountable when we screw up, so kids who don't know what they are doing and have an awful work ethic never have the incentive to learn and just keep doing things badly.

      I'll start taking responsibility for my own software failures when the justice system starts tracking down these criminals and prosecuting them.

      You don't mind writing shitty, broken code with beginner mistakes in? Take some pride in your work, you are an embarrassment to our profession.

      --
      Bogtha Bogtha Bogtha
    221. Re:Yeah, right. by Anonymous Coward · · Score: 0

      I think I heard something like that over at Joel on Software. I think it was something they do at Fog Creek Software, but I'm probably wrong.

    222. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 1

      That isn't what I said. If you want to argue fine but please don't put words in my mouth.

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    223. Re:Yeah, right. by danlip · · Score: 1

      Based only on my coursework (and not personal knowledge), it's not been covered. Nor should it have been. CS != Programming.

      also BasicSecurityPrincipals != Programming.
      BasicSecurityPrincipals is a subset of CS.
      They should know enough to know these things exist
      and figure out how to handle them in whatever language
      they are encountering. CS degrees should be about
      high-level theory, not low-level details, but IMO
      anyone with a CS degree who implements that kind of
      vulnerability without thinking about how to avoid it
      doesn't deserve the piece of paper, and I'd think twice
      about hiring another new grad from the same school.

    224. Re:Yeah, right. by nagnamer · · Score: 1

      That isn't what I said. If you want to argue fine but please don't put words in my mouth.

      No humour day? OK, it was a joke. Of course you didn't say degrees should be enforced. I just wrote that to point out this:

      Since you've (you = a company, etc) employed people that posses skills that I said they should be trained for by you, and you said that a degree certifies that... Holding someone accountable is supposed to what? Force them to exercise their know-how? Isn't simply having a degree proof enough that the person is capable of handling the petty problems that they've learned about on the Uni? Of course not. That's why I think training by a skilled expert is more than welcome, at least as a refresher, and a far better alternative to contracts that can only be enforced after the shit's already hit the fan.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    225. Re:Yeah, right. by nagnamer · · Score: 1

      And before you ask, I think a degree is not a proof of anything useful other than you passed the tests, simply because you can pass by getting 8 problems out of 10 right. What about the remaining 2? Who cares. You've passed. And one of those 2 problems happens to be SQL injection. Yeah, it's basic, but you still passed without it.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    226. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 1

      Ok, sorry I didn't catch it as a joke... whoosh!

      On the rest... this stuff should be taught in University (or whatever) and the employer should be able to count on the employee knowing this stuff. Of course people cheat and some schools are better than others etc. etc. But there is something wrong somewhere when someone having a university degree does not know simple things like checking buffer length and my suspicion is that what is wrong is not going to be fixed by employer training. Of course YMMV.

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    227. Re:Yeah, right. by HolyCrapSCOsux · · Score: 1

      I used to work in construction, so I'll put it this way: Let's say you are building a vertical reinforced concrete column. The plans say you need 6 bundles of #6 reiforcement with such and such spacing. If the builder puts in 6 bundles of #6 bar and doesn't notice one of the bars is cracked, but the building inspector that is supposed to inspect the bar before the pour fails to notice it, and the column buckles under 150% load, do you sue the guy who put in the bar to oblivion?

      This is what we are talking about. Holding a code monkey liable for a QA'd piece of shipped software that is being used improperly.

      --
      0xB315AA8D852DCD3F3DCA578FD2E0BF88
    228. Re:Yeah, right. by geminidomino · · Score: 1

      You're right, they should know what it is, and that *was* covered in coursework, but the avoidance was covered as theory, not practice, in the requisite databases course.

      Probably my fault for taking the "AND" as boolean as opposed to spoken. Too much fixing just this problem.

      For the record, in case you don't already know: one of the schools that should be on your "think twice" list, based on the code I'm fixing, is University of Phoenix. (I know, it's probably obvious, but I'm finding injection vulnerabilities from a graduate as I type this.)

    229. Re:Yeah, right. by MikeBabcock · · Score: 1

      Actually no. I see a proposal for exactly how engineering does work. The code monkeys are responsible to their supervisor or employer, but the software is certified by a software engineer who signs off on it. Right now, that last step isn't done.

      Read the disclaimer that comes with any software, and imagine that same disclaimer attached to a bridge.

      --
      - Michael T. Babcock (Yes, I blog)
    230. Re:Yeah, right. by bgspence · · Score: 1

      It's relatively easy to attempt to follow best secure coding practices. It's really hard to get things exactly right. And, right enough for lawyers, thats nearly impossible.

      Just look at their sample contract. Even their lawyers can't write a sample contract they can stand behind. It is covered with disclaimers passing the buck. Here's what they propose at: http://www.sans.org/appseccontract/

      "DISCLAIMER: THIS DOCUMENT SHOULD BE CONSIDERED GUIDANCE ONLY. IT IS STRONGLY RECOMMENDED THAT YOU CONSULT A QUALIFIED ATTORNEY TO HELP YOU NEGOTIATE A SOFTWARE CONTRACT.
      Please be advised that there is no warranty, expressed or implied, and no assumption of any legal liability or responsibility for any third party's use, or the results of such use of this Document."

      Writing code or writing contracts is hard to get legally right. Code should be written with proper disclaimers to require the customer's security experts to review and approve deliverables. Thats how they kick the can down the street in their example contract.

    231. Re:Yeah, right. by nagnamer · · Score: 1

      On the rest... this stuff should be taught in University (or whatever) and the employer should be able to count on the employee knowing this stuff. Of course people cheat and some schools are better than others etc. etc. But there is something wrong somewhere when someone having a university degree does not know simple things like checking buffer length and my suspicion is that what is wrong is not going to be fixed by employer training. Of course YMMV.

      Well, there are always idiots. But in most normal cases, I'm sure proper training yields better results than insisting on degrees and/or threatening with lawsuits.

      Also consider this. There's a new threat discovered. Annex your contract with a new accountability clause or training?

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    232. Re:Yeah, right. by Sir_Lewk · · Score: 1

      I should have specified: 256 bit symmetric key cipher keys cannot be brute forced.

      You can brute force a public key cipher key of much larger size because given the public key, the private key is mathematically deducable. In the real world nobody uses less than a 1024 bit RSA key, though those are only expected to be good for a handful of more years. 2048 and 4096 are not going to fall anytime soon, though quantum computing will obsolete RSA entirely.

      --
      "linux is just DOS with a UNIX like syntax" -- Galactic Dominator (944134)
    233. Re:Yeah, right. by Anonymous Coward · · Score: 0

      It's not about bugs, it's about build and test failures. Even when the build passes all tests, you can still have bugs. What we encourage is ensuring that developers sync to the latest changes, build and run all tests and ensure that there haven't been any check-ins in the interim before checking in. If you do that, you'll be assured of not breaking the build or making it unstable. This kind of thing might be harder in a large environment with many developers, but in our 6 developer workplace, it works well.

      It's not really a way of rewarding good work and punishing bad work as much as it's a way to reward conscientious development practices and punish those who are sloppy and forgetful. We still have code reviews and other measures of the quality of people's work that figure into bonuses. But the build jar is mostly a way to have people compensate other developers for the inconvenience they cause them by breaking the build and the financial hit they take to their bonus because of the other developer's mistake. And it introduces the game element to the work environment which always makes things more interesting.

    234. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 1

      Ok, sorry I thought I was being clear earlier in the thread - I'm not necessarily supporting contracts specifying particular coding requirements. It seems to me that company coding standards are sufficient and if you don't apply the known coding standards then you are penalized or fired (personally I'd fire someone who thought it was ok to write data of unknown length into a buffer but that's just me). I'm not against company training but I don't think companies should need to teach so-called programmers the kind of things they ought to have learned in their 1st year courses.

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    235. Re:Yeah, right. by cstdenis · · Score: 1

      "didn't anybody at Widget Co. even try this software out before shipping?"

      No.

      http://thedailywtf.com/Articles/Test-No-Software-Before-it-Ships!.aspx

      --
      1984 was not supposed to be an instruction manual.
    236. Re:Yeah, right. by _xeno_ · · Score: 1

      2. These days it is practically, if not absolutely, impossible to write bug free code. Why?

      To expand on that, here's a simple anecdote. I wrote a Java program that simply updated a database with new values. This involved loading a database driver and untold other code.

      So I go to run it and the Java VM crashes. Bwah? I try to figure out why, but I can't find anything that's changed since the last time I ran it other than the data it was loading. I run it again, and it works perfectly.

      What went wrong the first time? Was it:

      1. A bug in the Java VM?
      2. A bug in the Linux OS that the Java VM was running on?
      3. A bug in the VirtualBox VM that the Linux OS was running on?
      4. A bug in the Windows XP OS that the VirtualBox VM was running on?
      5. A bug in the hardware that the Windows XP OS was running on?

      I have no clue - about all I can say is that judging from the stacktrace generated in the HotSpot crash report, it crashed somewhere in the HotSpot JIT. Why? No clue.

      --
      You are in a maze of twisty little relative jumps, all alike.
    237. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      No, because they insist on having NFS mounted home directories, and not securing or controlling it. Start up a live CD on any system in the building, NFS mount the home directories from any server, and I have the ability to read any home directory files I wish, either as the local "root" user or by doing an "su" to an appropriate uid.

      Then there's the backup tapes, which are often poorly secured and rarely configured to skip $HOME/.subversion/auth or to skip passphrase free SSH keys.

    238. Re:Yeah, right. by Nothing2Chere · · Score: 1

      Until the company fires the DBA for making a negative impact on the production release cycle, that is.

      Hypothetically, I mean. I'm not saying that I'm a bitter DBA who has been fired for promoting detailed requirements, fixed release cycles, test plans, and change control. That was someone else.

      N2C

    239. Re:Yeah, right. by zuperduperman · · Score: 1

      > 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.

      Bad analogies are just bad analogies. Here's a better bad analogy: It's like holding a civil engineer responsible for creating a design where the whole bridge collapses when an unsophisticated incident occurs such as a car deliberately ramming into a single pylon.

      I actually think it's entirely appropriate to hold a civil engineer responsible for that, and it's also entirely appropriate to hold software engineers responsible for simple, well known intrusion techniques such as SQL injection, XSS and CSRF.

    240. Re:Yeah, right. by Zaiff+Urgulbunger · · Score: 1

      Not even the spanish inquisition would've expected that!

    241. Re:Yeah, right. by nagnamer · · Score: 1

      Ok, sorry I thought I was being clear earlier in the thread - I'm not necessarily supporting contracts specifying particular coding requirements. It seems to me that company coding standards are sufficient and if you don't apply the known coding standards then you are penalized or fired (personally I'd fire someone who thought it was ok to write data of unknown length into a buffer but that's just me). I'm not against company training but I don't think companies should need to teach so-called programmers the kind of things they ought to have learned in their 1st year courses.

      Ok, we agree that contracts won't save you.

      Now about the degree. Buffer overflow? I don't know about it because I code in high-level languages that handle this for me. But, say, XSS is fairly new thing. Hindsight is smarter than foresight, but I remember an article that was published just a few years back, about how Yahoo allowed XSS attacks on its sites, and how such companies should invest more time in training its staff to handle these emerging attack vectors better. So this is the reality. It may be in curriculum today, but it wasn't before. A degree is still not be-all-end-all kind of thing, nor is curriculum. Today's curriculum will cover the top 25 from OP. But tomorrow there is a new top 25. And today's graduates are automatically out-of-date. And you must agree security is not trivial. You really have to invest a lot of time if you want to learn all things yourself. Training from a specialist is far more efficient, and saves more money, than relying on your employees self-teaching themselves everything.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    242. Re:Yeah, right. by Have+Brain+Will+Rent · · Score: 1

      Ok, we agree that contracts won't save you.

      That isn't what I said. As to the rest of what you said I wasn't claiming that

      A degree is still not be-all-end-all kind of thing, nor is curriculum.

      etc. etc. I make a simple statement that can be summarized as: Management has a right to expect that programmers should have basic programming skills and not be lazy. I find rather amazing the people who are trying to come up with all sorts of things to dispute this or try and make it management's responsibility to educate someone on things that they should have learned in first year. I haven't been talking about cutting edge stuff that isn't taught in university. Dealing with the buffer overflow problem has been taught in university for at least 30 years. Yet according to the article it is still the #3 problem. #3 after 30 years of training people not to do that. That isn't "cutting edge technology" and it isn't "things not taught in the curriculum today". It is a basic, let's say that again, basic , skill taught to programmers for decades now. Anyone who hasn't got it yet is either lazy or incompetent and has no business calling themself a programmer.

      And if your implementation language has protection to prevent this sort of problem it still isn't going to save you - the same guy who can't/won't deal with buffer overflow will find some way to screw up something else basic in whatever development environment is being used. Take your pick, stupid or lazy, they'll always be a problem. It is depressing that there are so many incompetent people around calling themselves programmers that they can manage to make this the #3 problem today. Almost as depressing is the number of people rushing to their defence whenever this topic comes up.

      As for me I consider this all self-evident and have nothing further to say on this thread... but have the last word if you like.

      --
      The tyrant will always find a pretext for his tyranny - Aesop
    243. Re:Yeah, right. by Dog-Cow · · Score: 1

      One recall alone is close to 400k. How many lines has Toyota recalled in the last few months? I've heard of 3 myself. Would not be surprised if it's more.

    244. Re:Yeah, right. by Dog-Cow · · Score: 1

      You can get sued if you fire someone for incompetence. It is incredibly difficult to fire someone these days unless it's under the cover of lay-offs. That's why so many large corporations use a lot of contractors. Easy come, easy go.

    245. Re:Yeah, right. by isilrion · · Score: 1

      prepared statements solve 99% of it

      What's the 1% they don't solve? (Genuine question...)

      Read his second paragraph... he gave an example there.

    246. Re:Yeah, right. by pnewhook · · Score: 1

      Unfortunately, this guy was also incompetent in the quality of his coding.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    247. Re:Yeah, right. by pnewhook · · Score: 1

      So this guy subverts authority, lies, is completely incompetent, blames failures on others, and somehow this is my fault??

      Yes it is management fault (I'm not management) for not getting rid of him when I stated what was going on, but this idiot is by no means blameless. Saying this is entirely managements fault is just naive.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    248. Re:Yeah, right. by lonecrow · · Score: 1

      "but i'd also reserve the right to deny the customer any features i deemed unsafe."

      Don't you already? Try convincing an engineer or architect to design or building a structure that violates safety code. It just isn't going to happen unless you have a corrupt engineer.

      I always maintain that security is the developers responsibility no matter what. If an engineer caved in to a customer request that ultimately resulted in death or injury do you think anyone cares that he was just giving the customer what they wanted?

      How many times does your client have the know-how to correctly assess the threat and risks security in programming? I am guessing not very often.

    249. Re:Yeah, right. by RockDoctor · · Score: 1

      Not only will it take twice as long and cost 3 times as much,

      [nitpick]6 times as much.[/nitpick]
      Twice as long at three times the rate equals six times.
      What do you think you are? An accountant, or a software engineer?

      --
      Birds are not dinosaur descendants;birds are dinosaurs, for all useful meanings of "birds", "are" and "dinosaurs"
    250. Re:Yeah, right. by nagnamer · · Score: 1

      Management has a right to expect that programmers should have basic programming skills and not be lazy.

      And you've also sort of claimed that such expectation should be enforced. Accountability means you're liable for not meeting the expectations of the manager, as outlined in the contract, if I'm not mistaken. In a more extreme case, hire a fool to do your job, no contract will save you from disaster. In a more common case, most people will make some sort of mistake at some point. Nobody is perfect, never was, never will be. Again, no contract will save you from disaster. Only a fool would expect it to prevent disasters. If a piece of legal document could save you from flying bullets, you wouldn't need a bullet-proof vest.

      I've said that training is an efficient alternative for a company. It's not about class struggle, but a constructive approach to the problem, proposed as an alternative to a destructive solution: the loose-lost contracts.

      I find rather amazing the people who are trying to come up with all sorts of things to dispute this or try and make it management's responsibility to educate

      Management's responsibility? No. It's in their best interest to do so, given that not all programmers fall into the category of all-knowing, and ever-self-improving in all fields. Companies hire people based on some other factors, too, like "He's got black belt in SQL", "Her jQuery visual effects are amazing!", "He knows the company, has worked here before." You can imagine all the possible reasons why the imperfect guy gets the job over someone who knows about XSS and CSRF inside-out. In reality that is. I've already given the Yahoo example. What did you think the management should have done in that case? Sue it's team and sack them? I'm sure most of the guys working at Yahoo at that time were not incompetent fools and lazy.

      I'd understand if you say that this is not efficient, although I would still disagree. But instead you say you're pissed off because it sounds like I'm talking about blame-shifting.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    251. Re:Yeah, right. by nagnamer · · Score: 1

      Unfortunately, this guy was also incompetent in the quality of his coding.

      I think those types are called an "ass" in HR management. :D

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    252. Re:Yeah, right. by JasterBobaMereel · · Score: 1

      It's simple .... the cheapest most temporary bridge costs a lot of money because it takes time and materials to build, I can copy the software in seconds

      If I had a choice of two bridges, one that cost $10 million, and was guaranteed to survive for 20 years unless there was a earthquake above 8.... or one for $100 that would fail after a year ..... guess which one most people would buy, then slap a notice on saying you cross at your own risk ...

      You don't need this contract, you just need to enforce the contract between the software company and the customer, software engineers don't build software alone, teams including testers, designers, managers do ...

      This would be like making the builders responsible for a bridge failure even though their colleagues decided to put the bridge in a stupid place, build it at the wrong time of year, build it with the wrong materials, and don't join the road to the bridge ...

      --
      Puteulanus fenestra mortis
    253. Re:Yeah, right. by JasterBobaMereel · · Score: 1

      It's more like requiring the engineer who designed and built the lock to take longer to do this than to design the rest of the car, and to end up with a lock that costs more then the car .... ..and then still blame them when the thief smashes the window to steal the contents ...

      --
      Puteulanus fenestra mortis
    254. Re:Yeah, right. by JasterBobaMereel · · Score: 1

      Sorry you think subversion should be secure ....?

      If you allow anyone to get to the point where they can access subversion then I would hope that the password is a formality at that point!

      The best security is don't let people who don't need access to have access at all ... not to use the program's security

      --
      Puteulanus fenestra mortis
    255. Re:Yeah, right. by ultranova · · Score: 1

      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]*.

      That's nice and good if you can do it, but in general you can't. In my example before, the input is a string who's character encoding may or may not be known. Parts of it are machine-generated, parts are human-generated, everything is mixed together into a cheerful mess, and even the machine-generated parts tend to have errors (but a least in a predictable pattern). And I can't simply reject unclear input, since the channel is one-way, so what I get is the best I'm ever going to get; I either parse it succesfully, or lose the information.

      More generally, as the power of the application input system approaches a Turing machine, input verification approaches impossible. You either use heuristics and accept that tehre's false positives or false negatives or both, or use strict verification and accept that verification of some inputs takes literally forever. And if you can't contact the user in unclear cases, you're faced with the task of deciding what level of ambiguity and chance of error is more acceptable than rejecting the input completely and with it any chance of getting it right.

      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.

      Only for simple programs, or programs that can afford to not tolerate any error. However, anal-retentive error checking is a pain to work with; the end user ends up using most of his time to figuring out ways to get past the safeguards to get the program to do what he wants. If he can't control some part of the input (like my news archiver), he's out of luck. That's not really acceptable.

      The best you can do in that kind of case is to make input parsing in layers. Each tries to make sense of the input from the previous layer, and is increasingly strict about it. In my example above, the error was finally caught at the database layer, which caused the insert program to shutdown - but the database itself remained fine and uncorrupted, and the insert program was supposed to quit in those conditions, since there's no way to handle an unknown error in a meaningful way without artificial intelligence.

      --

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

    256. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Grow some balls and get some plasmas bro.

    257. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      Your suggestions are sensible. Unfortunately, in fact, they are very often _not_ done. People don't like remembering multiple passwords, so I've had numerous corporate partners try to insist on using their normal login and email passwords, and insist that "we trust the people we work with" and therefore refuse to switch to a more secure approach. And "remote access to to your local file system" is _extremely_ common, most commonly via NFS but also via precisely this kind of password access on remote systems on which you do work.

      Interfering with the local repo is an interesting risk, but most sensible programmers review their submitted code changes before publishing them, so it's more likely to be noticed than someone with your password doing it themselves. And since your password is stored for HTTP, HTTPS, svnserve, and potentially for SSH access, they don't have to wait. They can usually submit the changes unattended.

    258. Re:Yeah, right. by ultranova · · Score: 1

      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.

      It did reject the message. It simply happened at such a late stage of input processing (during database insertion) that the resulting exception went unhandled and caused the program to exit - which was precisely what I wanted to happen, since it left all the previous messages on-screen for me to see, and made it really clear just where the unexpected error happened.

      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.

      So the way to avoid bugs is to not make any mistakes? Thanks, I'll keep that very useful advice in mind. You've certainly analyzed the problem well here, to come up with a solution that's so well applicable in the Real World.

      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.

      For what's basically a data mining program, there is no bad input. There's at most pointless input (in this case, messages that don't contain images), but the program can't know that given input is that before it has already been parsed.

      Extract images, check if they are already in the database, insert those that are not, insert message contents (minus the images), and set up a connection between the message and images it contained. Also parse whatever info you can from the message (newsgroup, date, etc) and link them to the message and, by extension, the image. There are no erroneous inputs, just inputs that we can extract less or no information from.

      --

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

    259. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      It sounds like you're using an SSH key for svn+ssh, and you're being prompted for that SSH key password, not a "user" password for svn_ssh. That is how that tool usually works: the key creates a local svnserve daemon on the server to SSH-tunnel a temporary tunnel for you, and the actual communications is done on that svnserve tunnel. Oh, dear, you've been reminding me of all this intricacy working around such fundamental implementation flaws.

      It sounds like you need a "key agent" for your svn+ssh access. If you're using Windows, investigate the use of the "Pageant" tool, which plays very nicely with TortoiseSVN. If you're on UNIX or Linux, investigate the use of "ssh-agent" or the "keychain" Perl script to manage your SSH keys.

      And just because a directory is not "world-readable" does not mean others can't read it. Remember, many sites use NFS. Anyone who can get root on _any NFS client_ can change their user privileges to any other user on that network, and access the NFS files as that user. And an accessible ~/.subversion/auth/ directory is just the right place to steal passwords to springboard to _other_ systems. Given that any fool can set up an SSH based subversion repository on any machine they have shell access to, and you as an admin may not know that your users have done so and are storing their passwords in the clear, it's just a nightmare of security issues. And it needn't have happened.

    260. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      Yes, I see. In order to use an open source tool securely, I have to force all my clients to use the Windows tool TortoiseSVN, because the default tool for UNIX and Linux is so badly written. I do like TortoiseSVN, it is a well designed tool.

      Unfortunately, I suggest you take a look at any sites that use "svn://" access to their Subversion repositoy. Those typically use plaintext passwords stored on the server in repo/conf/passwd. So it's not just client security that the Subversion authors mishandle, it's server side security as well.

    261. Re:Yeah, right. by Xest · · Score: 1

      This is truly groundbreaking, why has no one thought of this before? Even dating back before computer science, even mathematicians should've thought of a tool like this, they could've called it the input domain or something.

      Seriously though, you're dead right, this is one of those examples where the separation of math teaching from computing teaching has meant developers have lost an understanding of these sorts of basic principles. The same issue occurs with formal logic, where many developers don't actually understand what their boolean statements will really result in trues and falses for, or even when such statements are needlessly overly complicated.

      It's the sort of thing that has been stripped out of software engineering degrees, and is one of the points where software engineering and computer science degrees differ. Yet, as demonstrated here, it's also something that's fundamental to writing code that is valid much more consistently.

      I'm not against software engineering degrees, I strongly believe they are equally important in the real world, where I've seen just as many comp. sci. students completely and utterly unable to architect large scale applications, even if they can write the algorithms for each function itself. However I believe this sort of thing should be in software engineering regardless of the attempts to separate it from comp. sci. because it really is just fundamental to anyone writing code to make sure they get it right as often as humanly possible.

    262. Re:Yeah, right. by TemporalBeing · · Score: 1

      Yes, I see. In order to use an open source tool securely, I have to force all my clients to use the Windows tool TortoiseSVN, because the default tool for UNIX and Linux is so badly written. I do like TortoiseSVN, it is a well designed tool.

      The SVN command-line is available on Windows too. Also, all SVN clients use the libraries provided by SVN, used by the SVN command-line etc. So they all treat it equally in the same way. If one client stores it encrypted they all will. But you need a new enough version as several others have said.

      Unfortunately, I suggest you take a look at any sites that use "svn://" access to their Subversion repository. Those typically use plaintext passwords stored on the server in repo/conf/passwd. So it's not just client security that the Subversion authors mishandle, it's server side security as well.

      If you're that concerned, then don't use the svn:// protocol - use WebDAV instead. Then it uses the native Apache Authentication system; and with htaccess you get encrypted passwords.

      The Apache2/WebDAV is also the more robust version in many ways, and requires less system "hacks" to keep it running right especially with multiple users.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    263. Re:Yeah, right. by pnewhook · · Score: 1

      Flamebait??! Your socialist work for free agenda will NOT stifle the ideals of democracy where people get fair pay for work performed!! REBEL AGAINST THE OPEN SOURCE SOFTWARE SOCIALIST OVERLORDS !!!!!

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    264. Re:Yeah, right. by Coryoth · · Score: 1

      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].

      This isn't strictly true. I can write a specification for a square root function (i.e. that the return value squared is within some tolerance of the input) that is most definitely not an implementation of of a square root function. Likewise, I can write a specification of a sort function that could be fulfilled by many different implementations (merge sort, quick sort, etc.). And indeed, there are specification languages for software (JML, SPARK, Z, CASL, etc.) that are definitely not programming languages. Think of it this way: a type signature is a specification of a function, but a header file giving type signatures is certainly not an implementation. Of course a type signature is a fairly weak specification in most languages because type signatures are not very expressive, but that should give you the general idea -- replace raw type signatures with a more expressive specification language and you can specify without implementing just fine.

    265. Re:Yeah, right. by Anonymous Coward · · Score: 0

      > 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

      Was the one with the most points given the title "local Bozo"?

    266. Re:Yeah, right. by clone53421 · · Score: 1

      I'll start taking responsibility for my own software failures when the justice system starts tracking down these criminals and prosecuting them.

      Find a way to track them down better. Until then, it’s incredibly easy to do an SQL injection without getting caught, and you’re an idiot if you design a site that can be attacked in such a trivial way.

      I don’t want you to take responsibility for your failures, I want you to take responsibility for your stupidity. Failures happen much less often when the programmer isn’t a moron.

      If I can type “><script>alert(document.cookie);</script><!--” in a textbox in your site and an alert box pops up on the next page, you’re an idiot.

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    267. Re:Yeah, right. by clone53421 · · Score: 1

      It’s really an entirely different situation.

      You have physical access to the car. You don’t have physical access to a computer system. If you had physical access to the computer, you could do anything... disassemble it, reverse-engineer it, patch it, and make it do whatever you want.

      You don’t. You have a network connection over which you can send bytes. Ones and zeros. The computer on the other end had damn sure better be designed in such a way that no sequence of ones and zeros can damage it or get it to reveal data that shouldn’t have been available to me. If I come into your building and smash the box with a sledgehammer, then no... there is no way your software could have foreseen that “input”. But ones and zeros coming in by the normal input path? Absolutely.

      If you still require a car analogy, imagine the push-button door locks. Suppose that, by punching a particular sequence of numbers on the lock, I can reprogram the braking system to completely fail as soon as you get up to 60 MPH. Now did the designer fuck up? You bet your ass.

      This should never happen, and the person who designed it is a bleeding moron:
      http://mcckc.edu/searchResults.asp?cx=015941728899689753552%3Amvkfqavgtf4&ie=UTF-8&cof=FORID%3A11&q=%3E%3C%2Ftitle%3E%3Cscript%3Ealert%28document.cookie%29%3B%3C%2Fscript%3E%3C!&sa.x=0&sa.y=0#242
      View the source to see where the code fucks up. Obviously it’s an issue of not escaping the input.

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    268. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Flamebait??! Your socialist work for free agenda will NOT stifle the ideals of democracy where people get fair pay for work performed!! REBEL AGAINST THE OPEN SOURCE SOFTWARE SOCIALIST OVERLORDS !!!!!

      I never knew Liberty Prime had a slashdot account!

    269. Re:Yeah, right. by Anonymous Coward · · Score: 0

      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.

      The other responses have already shown your assertions to be baseless, but they missed this one: Many bridges have signs like "Weight Limit 10 Tons", and commercial vehicle drivers will obey such signs; when they don't, we'll probably read about it in the newspaper. The software equivalent is "Only digits are valid", which users will routinely ignore. So, fine, I'm willing to be held liable for people putting letters into my digit fields when you're willing to be held liable for the truck hauling 40 tons of battleship chains over your 10 ton limit bridge.

      And if you respond that many bridges have no such limits, I'll respond that many instances of software are similarly rugged. There's a reason much avionics software is painstakingly written in Ada (at great expense) - because it's worthwhile, and that's just one class of highly reliable software. Let me know when your uncrashable, perfectly bug-free MS Word clone (written in Ada if you want any realistic chance of achieving that) is available at competitive pricing. I'll wait.

      I hope your "Insightful" mod was due to a software error, which would the only rational basis for it.

      - T

    270. Re:Yeah, right. by Anonymous Coward · · Score: 0

      Accountability is also distributed in modern software development. What if the compiler or library has the bug? To what extent do you hold the customer-facing programmer accountable? One could argue that using the standard library is a choice. Yes, but writing your own is much worse. One could likewise argue that any bug is due to not enough testing. Yes, but how much testing will be paid for?

      I have a proposal: programmer finishes solution with minimal testing. Then it's up to the customer to decide how much testing is necessary, what tests are necessary, (pays more accordingly.) The customer shares the accountability.

    271. Re:Yeah, right. by jgrahn · · Score: 1

      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 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).

      Which is how I've used CVS for the last ten years. CVS isn't even aware that the transport is ssh. I don't use SVN, but I hear they too have managed to implement that in recent years.

    272. Re:Yeah, right. by jgrahn · · Score: 1

      Yes, I see. In order to use an open source tool securely, I have to force all my clients to use the Windows tool TortoiseSVN, because the default tool for UNIX and Linux is so badly written.

      Or you could just RTFM. CVS has worked tunneled over ssh(1) for more than a decade, and it has known *nothing* about the authentication phase. It hasn't even known what ssh *was*, other than a funny command it can fork and exec and use to contact the repository. It's such an obvious, safe and convenient design that I refuse to believe that even the SVN developers can get it wrong.

    273. Re:Yeah, right. by NotBornYesterday · · Score: 1

      The problem with that analogy is that physical laws that are fairly well known and understood today for engineering bridges and buildings do not undergo the rapid and radical evolution of software vulnerabilities. As languages like PHP and Java evolve, so do the exploits that are possible/likely. The force of gravity and tensile strength of mild steel are not new concepts, and are not open to new attacks that were not even conceived 10 years ago.

      --
      I prefer rogues to imbeciles because they sometimes take a rest.
    274. Re:Yeah, right. by starfishsystems · · Score: 1

      There is no analogy being presented here.

      All insurers do is apply actuarial data to risk management. If one software product is found to present unacceptable risks, its use will not be indemnified.

      --
      Parity: What to do when the weekend comes.
    275. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      I'm afraid they did: they merely duplicated CVS's careless approach to passwords and deliberately implemented the same password for SSH, HTTP, and HTTPS access. It is in fact _possible_ to use SSH keys for access, but ssh+svn access remains the only way for Subversion to enforce it properly. Barring Kerberized authentication, the other protocols should have been turned off by default years ago.

    276. Re:Yeah, right. by Anonymous Coward · · Score: 0

      You are not a very good developer, are you?

      Some people out there are already taking responsibility for their code quality and I hope they are making 300% your hourly rate.

    277. Re:Yeah, right. by jakykong · · Score: 1

      I'm not a professional in the field (yet), but here's just a thought:

      Pidgin keeps its passwords in plaintext. Their justification boils down to "If the system is sanely setup, nobody else should be able to see your user-only files anyway, and encrypting just gives a false sense of security."

      I suppose their justification depends precisely on the assumption that the system is setup securely (at least as far as permissions are concerned) to begin with, which is the assumption that is violated by NFS.

      That is, wouldn't it be better, instead of changing svn, to stop using NFS instead? Or is my lack of experience in the field causing me to miss something here?

    278. 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.
    279. Re:Yeah, right. by Antique+Geekmeister · · Score: 1

      Good for you: I'm glad you're thinking ahead about your career. What you're seeing from Pidgin is, unfortunately, commonplace thinking among developers who are convinced that no one sensible would leave themselves vulnerable by using a password that matters, and local security is not their problem. The thinking is similar to that of the Subversion authors, who unfortunately make it far too easy to accidentally store such passwords and who really need some sort of trivial access to their central servers.

      Unfortunately, Subversion became popular as a big advancement over CVS (which it was). And NFS remains the de facto UNIX and Linux file-sharing standard, despite its lack of security. I don't have the funding to throw out the NetApps and departmental network applicances where I work, and the infrastructure resources to switch everyone to CIFS. NFS merely enhances the risk profoundly, it doesn't eliminate the risks from backup tapes and whatever media you use to store home directory information.

      A better approach is to enforce the use of svn+ssh, and to provide the tools to manage it gracefully. Or switch to "git", which is not only noticeably more efficient and reliable and allows disconnected development, but merges code better, allows throwing out of material, has built-in features for GPG-signing code releases, and has tools to handle shared SSH account access gracefully such as a restricted shell for that common repository user, and "gitosis" for the keys. Subversion has none of that.

      Linus Torvalds and the other authors of "git" actually paid attention to security. For Subversion, and as you point out Pidgin", it was an afterthought they chose not to deal with themselves. And you can tell which are classic examples of violations of those security rules mentioned, and which actually paid _attention_ to the security issues.

    280. Re:Yeah, right. by Anonymous Coward · · Score: 0

      just like it is unreasonable to expect that every sentence in a book is completely without error.

      That is funny, because I know several professional editors, and that is precisely what they expect. Why are your standards so low?

      I am a professional software developer, and I have seen this attitude consistently amongst my peers. I do not understand why they are so defeatist about their own work, but they are. It is always me who has to go in and correct their logic errors, race conditions, rookie mistakes (using mutable objects as keys into HashMaps), and rampant spelling errors and grammatical mistakes in their code comments. There is no reason they could not have fixed those things themselves. They simply did not, and if you ask them, they just toss out the same defeatist tripe you did.

    281. Re:Yeah, right. by minchazo · · Score: 1

      Ahem. http://xkcd.com/327/ The only character that *might* be wrong is the ; You've *got* to be looking for the wrong input as well.

  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 MikeFM · · Score: 1

      I can do it with zero lines of code. My zero lines of code will remain perfectly safe.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    2. Re:Errors, Schmerrors by Anonymous Coward · · Score: 0

      That's nothing. The code I write is so bad it creates vulnerabilities even after I comment it out.
      *is extra cautious to click that "post anonymously" button this time*

    3. Re:Errors, Schmerrors by _merlin · · Score: 1

      Don't you mean a real Perl programmer? They can do anything in one line of code!

    4. Re:Errors, Schmerrors by DeadDecoy · · Score: 1

      I think that's what the IOCCC is for.

    5. Re:Errors, Schmerrors by linhares · · Score: 1

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

      For the last time, that shit wasn't my fault!

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

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

    7. Re:Errors, Schmerrors by Anonymous Coward · · Score: 0

      only in perl

    8. Re:Errors, Schmerrors by kenj0418 · · Score: 1

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

      Why don't I just make a copy of sh, setuid it to root, and configure it to be a CGI script for my website.
      Zero lines of code -- and I think that probably covered a good percent of the 25 :-)

    9. Re:Errors, Schmerrors by kaka.mala.vachva · · Score: 1

      As an added incentive, if he uses emacs, he can twist a joint as well.

    10. Re:Errors, Schmerrors by Anonymous Coward · · Score: 0

      exit(0);

    11. Re:Errors, Schmerrors by jlintern · · Score: 1

      A Real Programmer can do all 25 with one emacs command.

  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

    2. Re:Alanis ? by sorak · · Score: 1

      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.

      It would only be the Alanis ironic if the report were in PDF when you really wanted HTML.

  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.

    1. Re:I bookmarked this immediately by IICV · · Score: 1

      Umm? SQL injection is relevant to you? What sort of retarded library are you using that doesn't let you parametrize your SQL input?

    2. Re:I bookmarked this immediately by Stormie · · Score: 1

      What sort of retarded library are you using that doesn't let you parametrize your SQL input?

      Try re-reading the second paragraph of his comment, about "inherited code". Just because you can paramaterize your SQL input doesn't mean that there isn't one feature buried deep in the web app where some foolish/lazy/whatever developer heedlessly pasted together a few GET parameters to hack up a quick and dirty SQL SELECT.

    3. Re:I bookmarked this immediately by caywen · · Score: 1

      It isn't the library that doesn't let you parameterize that's retarded. It's the one that does parameterize, but incorrectly.

    4. Re:I bookmarked this immediately by clone53421 · · Score: 1

      For a real-world example, go here.

      http://mcckc.edu/searchResults.asp?cx=015941728899689753552%3Amvkfqavgtf4&ie=UTF-8&cof=FORID%3A11&q=%3E%3C%2Ftitle%3E%3Cscript%3Ealert%28document.cookie%29%3B%3C%2Fscript%3E%3C!&sa.x=0&sa.y=0#242

      Basically, if I stole the session ID of a logged in user, I could pretend to be them... and it would be trivially easy to steal it instead of just alerting it with that code.

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
  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 Ethanol-fueled · · Score: 1
      Article:

      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...

      You:

      TFA seems like it's just looking for somebody to blame when the axe falls.

      "Contractor" for Russian Business Network"

      Hooray! It's not my fault anymore!

    2. 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
    3. 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?)

    4. Re:Bad Idea by uncqual · · Score: 1

      Indeed.

      I find too many development organizations don't understand that an organization can't test quality into a product, it must be designed and implemented into a product.

      Also, too many QA organizations evaluate, to some extent, testers (by that, I mean those who develop tests) by the number of bugs they find. What QA testers should be evaluated on to a great extent is how many "severity adjusted" bugs the customer finds in the tested feature as a ratio of how many bugs the tests found during QA (crappy code, even with a good QA cycle, will still be crappy in the field as not every case can be tested and software "learns" to pass tests).

      Of course the developer is most responsible, and should be held so (this is one reason I believe strongly in code ownership). However, the code reviewer should also be held nearly as equally responsible for bugs as the coder.

      --
      Why is there an "insightful" mod and why isn't it "-1"? If I wanted insight, I wouldn't be reading /.
    5. Re:Bad Idea by bluej100 · · Score: 1

      The number one risk, cross-site scripting, can automatically be almost eliminated through the use of a templating system that automatically escapes HTML in variables, as does Django.

    6. Re:Bad Idea by Herkum01 · · Score: 1

      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.

      Haven't you heard, this is the age of marketing(got that from Business School). Why spend money building something when you can just market your way to the top...

      This is what happens when we let business school grads run everything.

    7. Re:Bad Idea by GigaplexNZ · · Score: 1

      A successful test does not prove the absence of bugs, it just fails to prove the presence of any bugs.

      I like to think that a test that finds a bug is a successful test. It means it did its job.

    8. Re:Bad Idea by Lord+Ender · · Score: 1

      Prove? No. But reducing the risk by 99.9% is practically the same, though.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    9. Re:Bad Idea by drfreak · · Score: 1

      I don't think the article really speaks to the human psyche nor does it recommend firings. I may be daft and new to programming, but found many of the suggestions informative and helpful.

    10. 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

    11. Re:Bad Idea by Anonymous Coward · · Score: 0

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

      But an accompanying blowjob will certainly do wonders.

    12. Re:Bad Idea by serviscope_minor · · Score: 1

      You're still just blaming the engineer.

      The reason people don't do it is because it is time consuming and therefore expensive. The customers are not willing to pay.

      --
      SJW n. One who posts facts.
    13. Re:Bad Idea by MenThal · · Score: 1

      That was a cracker, not a hacker, and the latter is not paid enough to afford hookers. :(

    14. Re:Bad Idea by Anonymous Coward · · Score: 0

      Whoa! Slow down there.
      Those solutions cost money and time, It should just work first time. I mean, all you're doing is typing!

    15. Re:Bad Idea by P-Nuts · · Score: 1

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

      You need to hold a gun to his head and have a girl suck him off to get the best results.

    16. Re:Bad Idea by evanbd · · Score: 1

      You're still just blaming the engineer.

      The reason people don't do it is because it is time consuming and therefore expensive. The customers are not willing to pay.

      In general, the engineer is the one with the knowledge that this is a big problem. I suspect most customers don't want insecure software. They just don't realize in advance how much insecure software costs them, and how to ask for secure software. What's more, frequently the people hurt by the security problems aren't the ones paying for the software.

      To use the (awful, overused) civil engineering analogy, we don't let customers contract for an unsafe building design. As the expert, it's the civil engineer's job to be aware of the safety requirements implied by a contract. Similarly, it's the software engineer's job to be aware of the security implications.

      So yeah, there's plenty of blame to go around. To the customers, and the developers, and the lack of regulation of the sort other engineering disciplines have when they put uninvolved people at risk. Security flaws in software don't usually put uninvolved parties at physical risk, but financial risk is certainly common enough, and physical risk isn't completely unheard of. Witness Windows viruses in medical equipment, for example. Of course, given the level of understanding of the issues government regulators are likely to have, regulation might be a cure worse than the disease.

    17. Re:Bad Idea by evanbd · · Score: 1

      True. Certainly software engineers (in particular, the companies they work for) need to start discussing things like security early in the negotiation process. The civil engineering analogy is overused, but still applicable in many ways.

      On the other hand, some things like static code analysis when using unsafe languages don't really cost much time. Would it really take that much longer to complete the project if you had a static code analysis as a commit hook? Certainly some projects do this, but it's far from universal. I can't see anything to blame it on other than laziness or ignorance. (In most cases. I suppose there might be exceptions, but I'm having trouble thinking of one.)

    18. Re:Bad Idea by Bengie · · Score: 1

      If your requirements keep changing, the project manager/program analyst should be fired.

    19. Re:Bad Idea by cbsmth · · Score: 1

      All too often, company management simply lacks the insight to understand the importance of factors like security. They want the product, and they want it as soon as possible. Things that "probably won't happen" (as an earlier poster quoted, "Why would anyone do that?") are overlooked for plain profit.

      --
      Truth isn't Black and White, it's HSLA.
    20. Re:Bad Idea by clone53421 · · Score: 1

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

      No, but it makes the average developer better... the bad ones don’t survive.

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    21. Re:Bad Idea by Anonymous Coward · · Score: 0

      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.

      Haven't you heard, this is the age of marketing(got that from Business School). Why spend money building something when you can just market your way to the top...

      This is what happens when we let business school grads run everything.

      Well this the most pathetic thing I've read all week, especially because it's probably a fair assessment of reality for many businesses.

    22. Re:Bad Idea by Canberra+Bob · · Score: 1

      If your requirements keep changing, the project manager/program analyst should be fired.

      I could not agree more - however there would be a lot of out of work PMs if that really happened. A big part of that is the PM has no authority to say no to the board - if the order comes from above to move go-live forward generally the only authority they have is downwards to re-arrange resources to best make it happen. To be honest however I am yet to come across a single larger scale project where no requirements changed as the project progressed (I have never worked on medical / defence / real-time systems which I am *hoping* do not have the same issues!). After all - was that not why as an industry we moved away from the waterfall and towards a spiral / agile / whatever buzzword type methodology? The whole problem with waterfall was that it fell apart if the requirements changed after they had been signed off and these newer methodologies were brought in to deal with those issues. I personally feel waterfall has a lot to offer and as an industry we need to start moving back in that direction if we want to compare ourselves to the true engineering disciplines. How can we possibly consider ourselves professionals when we are willing to change fundamental design decisions only a short time before go-live and consider that a positive (ie. it is supposed to show how flexible we are)?

  7. and yet they do not mention COBOL by cavehobbit · · Score: 1

    Or did they retire that category?

  8. The obvious follow-up question... by damn_registrars · · Score: 1

    ... how many of these errors have been committed by slashdot?

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
  9. So in other words by lul_wat · · Score: 0

    They got each organisation to submit one error, ranked them, then dropped the last 5 (or maybe there were 5 double-ups)

    --
    Divide a cake by zero. Is it still a cake?
  10. The actual article by Anonymous Coward · · Score: 0

    The Register is just talking about another article detailing the list.

    The actual article: http://cwe.mitre.org/top25/

  11. Background checks are awful and stupid by Anonymous Coward · · Score: 1, Informative

    I am a competent and trustworthy programmer in his late 30s who will fail a background check because I was convicted of something in my mid 30s, something I did when I was a teenager (and still a minor).

    I have, over the years, been given many responsibilities and opportunity to abuse the authority required to discharge those responsibilities. I never once have abused that authority. If you ask previous co-workers if they consider me honest and trustworthy they will unanimously tell you that I'm one of the most trustworthy people they know.

    I strongly resent the growing prevalence of background checks. I wasn't convicted of any sort of fraud or theft, but I am rejected anyway. The sad part is half the time I end up having to tell someone exactly what I was convicted of and why, and they wring their hands over their policy being so stupid but follow it anyway.

    Background checks lead to stupid behavior. The criminal justice system is only a mediocre to poor arbiter of who is and isn't trustworthy. Like lie detector tests, you can never pass, only fail.

    1. Re:Background checks are awful and stupid by HornWumpus · · Score: 1

      Greater then 15 years statute of limitations.

      Less then 5 years sentence for conviction.

      I get an empty set for possible crimes and call BS.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    2. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      It had a minimum 7 year sentence that was suspended and I was given 10 years probation. And you would likely be quite surprised at what the crime was and how the statute of limitations stuff played out.

    3. Re:Background checks are awful and stupid by HornWumpus · · Score: 1

      You're anon.

      What's stopping you?

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    4. Re:Background checks are awful and stupid by Mister+Whirly · · Score: 1

      So, you are posting anonymously. Why don't you just tell us what the crime is, so we don't have to wonder?

      --
      "But this one goes to 11!"
    5. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      For a few different reasons. It's ugly and personal and I don't like talking about it. It's unusual enough that giving details might be enough to identify me. If you did identify me and knew details other innocent people could be hurt.

    6. Re:Background checks are awful and stupid by Mister+Whirly · · Score: 1

      So, it was a crime so rare that it has only been committed by a few people? I seriously doubt that naming the statute you violated could be enough to identify you. Considering the only other detail I know about you as that you may occasionally read Slashdot, it would be very hard for myself or anyone else to string together enough data to make a positive ID. I am starting to smell a rat on this one.

      Unless - OMG are you that guy from my junior high who got caught skull-fucking that dead sheep wearing a prom dress???

      --
      "But this one goes to 11!"
    7. Re:Background checks are awful and stupid by Antique+Geekmeister · · Score: 1

      No, stupid behavior leads to failing background checks. Keep cause and effect in the correct order.

      In most cases, even a felony for something foolish in your teens will not override years of professional experience. And many crimes do not necessarily lead to a repeat of the crime: some crackers, for example, have gone on to productive careers in software development or security.

      But if you are a convicted child molester, I _do not want_ you anywhere unsupervised with children. The recidivism rate is too high. And if you have pulled the sort of stunts that, say Brian Thomas Mettenbrink, a member of the cracker group "Anonymous", was convicted of, I don't want you anywhere near my systems. You'd have proven you were too self-righteous and vindictive to be trusted with my equipment.

    8. Re:Background checks are awful and stupid by walshy007 · · Score: 1

      If you think "anonymous" is a cracker group, you really have no idea.

      He used his personal computer in a stupid way to protest against an organisation he considered evil. Not the smartest thing to do but it's a far cry from that to "you have proven you were too self-righteous and vindictive to be trusted with my equipment." especially decades on when the activism of peoples youth fades.

    9. 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.

    10. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      Why don't you just tell us what the crime is, so we don't have to wonder?

      I'm responsible for posting all of the pictures of Cowboy Neal.

    11. 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.

    12. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 1, Insightful

      It's probably not the particular statute, but rather the particular way that made the statute of limitations do weird things. When you multiply small chances, you get small numbers really quickly. And it might have been a local law he violated.
      (P.S. If you're thinking "same person", just ask an admin to verify that my IP address is different.)

    13. 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.

    14. Re:Background checks are awful and stupid by shentino · · Score: 1

      Make the sentence proportional to the difference in age and you've got something.

    15. Re:Background checks are awful and stupid by rve · · Score: 1

      "Anonymous" stood for: anyone who posts on 4chan without logging in. It's not a group any more than "Anonymous Coward" is.

    16. 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).

    17. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      I agree with what you say - but 30-year-olds aren't "children" (not legally, anyway; though I could tell you some stories..). Child molestation laws simply wouldn't apply to even 19 year olds, even if their relationship was with someone who was 110. But if that 110 year old started dating a 17 year old, s/he'd be in for a world of trouble - which is also where the law falls apart; realistically, the 110-year-old is much less threatening than, say, a 40-year-old. Perhaps if there were an upper limit - anything over, say, 15 years' difference, and you get the "maximum" punishment.

    18. 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.

    19. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      In most cases, even a felony for something foolish in your teens will not override years of professional experience. And many crimes do not necessarily lead to a repeat of the crime: some crackers, for example, have gone on to productive careers in software development or security.

      No, what matters for the various policies involving background checks is how recently you were convicted, not how recently the crime happened. The few places I've interviewed that did anything but refuse to talk to me after the background check came back told me as much.

      I got the distinct sense that there was no human judgment at all involved. It was simply a machine-like adherence to specific rules that denied me the jobs.

      I've largely been forced into working at places small enough to not do background checks. And, I can't say as I'm entirely unhappy with that. The once or twice I've worked for larger places I've generally not enjoyed it.

    20. Re:Background checks are awful and stupid by Antique+Geekmeister · · Score: 1

      I'd agree with you conceptually, but despite episodes of "Boston Legal", it would take surprising cleverness to be convicted of child molestation for an 18 year old guy to be convicted in a sexual event with a 16 year old girl. Even if it's actually forcible rape, the ease of "pleading out" and getting a lesser sentence is so large that I'd be surprised if anyone here can name even a single such case.

    21. Re:Background checks are awful and stupid by Antique+Geekmeister · · Score: 1

      Have you looked at any of the "Anonymous" videos? I stand by the claim that that idiot was "too self-righteous and foolish to be trusted with my equipment". I also stand by the claim that he, and his peers, were a "cracker group". It's certainly "cracking" that Brian got convicted of. (http://www.wired.com/threatlevel/2010/01/guilty-plea-in-scientology-ddos-attack/). And he certainly didn't act alone. So yes, at the time, they were a "cracker group".

      The "Anonymous" group seems to have cleaned up its act, or its membership has changed, and now they're focusing on legal protests against Scientology abuse. Good for them, whoever the rest of them are. But Brian is still an idiot that I wouldn't want to hire: his conviction is demonstration of his foolishness, and that's unlikely to go away. If you want to support someone who's been convicted, by Scientology, of more justified action against them, try Cynthia Kisser (former director of Cult Awareness Network, an effective cult fighting group destroyed by Scientology lawsuits and whose website is now owned by the cult).

    22. Re:Background checks are awful and stupid by gatkinso · · Score: 1

      It is so bad that others could be hurt after all this time.... and you wonder why you failed the check.

      --
      I am very small, utmostly microscopic.
    23. Re:Background checks are awful and stupid by walshy007 · · Score: 1

      The point remains, you would judge someone decades on from something they did that was silly as a teenager. Even though I have no convictions or even charges and hold some hard to get clearances I would not work for an employer such as yourself out of principle.

      Effectively you are punishing someone for misdirected pashion.

    24. Re:Background checks are awful and stupid by StikyPad · · Score: 1

      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.

      Or maybe your co-worker was just shoulder surfing and thought it would be funny to freak you out.

    25. Re:Background checks are awful and stupid by Grishnakh · · Score: 1

      While that would be possible in this crappy bull-pen I currently work in, at the time this happened, I had a private cubicle and never posted to Slashdot while there was anyone else in the cubicle.

    26. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      not quite but pretty close:
      http://www.newson6.com/global/story.asp?s=9314835

    27. Re:Background checks are awful and stupid by Antique+Geekmeister · · Score: 1

      "Misdirected pashion[sic]" is exactly what gets people convicted of child molestation, which has an amazing rate of repeat offenders. So is pyromania, abusing animals, and flying 747's into skyscrapers. Having "misdirected passion" as a youth does not make one safe as an adult: it's a reasonable hint that you might pull that sort of stunt again, especially if you did something so foolish as to actually get convicted of a felony and were unable to "plead out".

      There are felonies that would not concern me so much: being caught a few times in college of dealing marijuana wouldn't bother me near so much as the "Anonymous" vandalism. And a civil disobedience arrest for peacefully blocking the road at a Vietnam War protest, or publishing photos of the NSA agents at Defcon? I'd probably offer to buy you lunch in the interview process. The key is the nature of the crime, and whether it's something I could live with as an employer or co-worker.

    28. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      16 is legal in Sweden.

    29. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      I'd say a huge part of the problem is that "child" in this context often applies equivalently to a 15 year old and a 7 year old. One of them is clearly a child, the other not so much. A 40 year old screwing a 15 year old is an entirely different problem than a 40 year old screwing (raping, really) a 7 year old. At least some prosecutors seem to be incapable of recognizing any distinction, perhaps willfully so in election years. And that is echoed in mass media, leading to a general public which thinks it understands the definition of pedophilia, yet has never heard of ephebophilia and hebephilia.

      - T

    30. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 0

      I was convicted because a sincere desire to be honest and helpful to people who weren't police resulted in there being enough evidence, even years after the fact. I wanted to fix things and instead ended up with some major inconveniences, extreme stress and loss of freedom instead.

    31. Re:Background checks are awful and stupid by walshy007 · · Score: 1

      being caught a few times in college of dealing marijuana wouldn't bother me near so much as the "Anonymous" vandalism.

      I find it interesting that you would place smoking/dealing pot as less worthy of your suspicion than political activism, because substance abuse is never a sign people are unstable is it?

      You still speak of anonymous as if you had no idea about them before or after the scientology business, it has always been just a bunch of random people that jump on bandwagons they consider worth the cause. Originating at 4chan, they pretty much just post pictures and have discussions on topics, but every now and then something big comes up where enough people don't like the actions of a group or person to do something about it.

      There was no vandalism as such, the site was not compromised, it was just a bunch of people furiously reloading their pages to create a demand they weren't expecting.

      You're making a mountain out of a molehill, more or less.

    32. Re:Background checks are awful and stupid by Anonymous Coward · · Score: 1, Informative

      Fact: child molesters have the lowest recidivism rate of all convicts. I don't know how you define "too high", though. Perhaps it's any rate > 0%? I also enjoy punishing the majority for the mistakes of the minority. It's kind of "my thing".

      - Despot

  12. The actual link . . . by HazyRigby · · Score: 1

    . . . to the list, instead of an article discussing the list: Link

    1. Re:The actual link . . . by HazyRigby · · Score: 1

      Or I could be a moron you can all safely ignore.

  13. Oh, you mean VENDORs, not DEVELOPERs by Jason+Pollock · · Score: 1

    When you say "developer", I think individual employee. However, the individual employee isn't around long enough, the project validation will more than likely happen after the majority of them have finished, taken their final pay and left.

    As for the actual contract? It reads like lawyer bait.

        Consistent with the provisions of this Contract, the Vendor shall use the highest applicable industry standards for sound secure software development practices to resolve critical
        security issues as quickly as possible. The "highest applicable industry standards" shall be defined as the degree of care, skill, efficiency, and diligence that a prudent person
        possessing technical expertise in the subject area and acting in a like capacity would exercise in similar circumstances.

    And finally, background checks? Seriously? Only if you want it to take 6+ months for me to hire someone.

  14. They missed one by sayfawa · · Score: 1

    I didn't see this one in there... I once typed it into some code by accident. It's more common than you'd expect.

    --
    Free the Quark 3 from asymptotic confinement! Bring your charm! Don't get down! All colours and flavours welcome!
  15. 25 is a nice round number. by Anonymous Coward · · Score: 0

    But I think they probably could have shortened it to about 6 or 7. "Sanitize every input", "pay attention to trusted vs untrusted input methods", "bounds checking - do it", "make sure the encryption you use is strong enough", "watch multi-threading carefully", and the interesting one: "while error messages should be helpful and detailed, remember that you're not the only one reading them."

    1. Re:25 is a nice round number. by istartedi · · Score: 1

      Maybe just one. "Love the Code with all thy heart".

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  16. Misplaced Burden by Anonymous Coward · · Score: 1, Interesting

    The way to prevent most of these types of errors is to fix the programming language. A modern high-level language simply should not allow most of these things to happen. Any such language which does needs to be either fixed or discarded.

    Yes, for low-level work you need languages without such safeguards. But for the rest of development work, the compiler/interpreter/runtime environment should prevent even the most careless of programming from making most of there errors.

    1. 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.

  17. Micromanagement by russotto · · Score: 1

    The model contract smacks of the customer attempting to micromanage the vendor's development process. You might get away with that if you're IBM or the Federal Government, but most smaller customers aren't going to have that kind of clout.

    And of course, the "security training" section is pure self-promotion for SANS itself.

  18. 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 epp_b · · Score: 1

      Y'know, that whole list of 25 is really just a few items expanded into verbosity. You could basically narrow it down to unsanitized user input, unencrypted sensitive data, improper or no data length control, improper or no condition control, improper data storage, improper or no linearity control.

      That's a six-item list that should really be common sense for any decent programmer.

      The other points of this discussion are determining what potential vulnerabilities are even applicable, the likelihood of an attack occuring and how much the client is actually willing to pay if that likelihood is low.

    2. Re:Just Show Me the List!! by QuantumG · · Score: 1

      Y'know, that whole list of 25 is really just a few items expanded into verbosity. You could basically narrow it down to unsanitized user input, unencrypted sensitive data, improper or no data length control, improper or no condition control, improper data storage, improper or no linearity control.

      Or you could just narrow it down to: user/programmer doesn't care about security.

      Sheesh.

      --
      How we know is more important than what we know.
    3. Re:Just Show Me the List!! by nprz · · Score: 1

      Looking at http://cwe.mitre.org/data/definitions/22.html#Related_Attack_Patterns, I wonder who generated their examples:

      The program would generate a profile pathname like this: /users/cwe/profiles/../../../etc/passwd

      When the file is opened, the operating system resolves the "../" during path canonicalization and actually accesses this file: /etc/passwd

      As a result, the attacker could read the entire text of the password file.

      Big fucking deal of the attacker reading the passwd file. On my machine, it is 644 and I'm pretty sure it needs to be readable to function.
      Maybe if they wrote shadow file, I'd give them more credit.

    4. 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.
    5. 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...

    6. Re:Just Show Me the List!! by jekewa · · Score: 1

      Regarding #2, I'm inclined to blame PHP...

      It took me longer to type "php avoid sql injection" into a Google search than it took for Google to return the number one result from Wikipedia (http://en.wikibooks.org/wiki/PHP_Programming/SQL_Injection) or the number three result from the PHP website (http://php.net/manual/en/security.database.sql-injection.php). It's the lazy PHP programmer (or other straight SQL writing programmer) that doesn't safely format (e.g., simply SQL-escape) the input before sticking the value straight into the generated string. Your (probably cheeky) 24-second rule still applies to learning how to do it correctly.

      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.

      More to the point, it shows how much software is being written by inexperienced or lazy programmers in those languages. In many cases (like when receiving an input value in a CGI request), it's easy to check for the size of incoming data before using it, or to iterate through the incoming data in appropriately sized chunks to work within your available buffer, or to reallocate your buffer to accommodate the additional incoming data when it's larger than was perhaps expected. Especially if your old-style code is using the likes of strcpy, you can do a quick strlen first.

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

      I wonder how many of these were done by people who have been writing software for fewer than five or even ten years? It isn't that we've overcome these obstacles as an industry, but that we overcome them individually. Lazy has strong staying-power, so there will be some long-standing lazy developers out there. Experience combats most of these, and I hope that anyone writing software for a few years has fallen away from the naive view of the world that so many fresh developers have that perhaps make them think they don't need to bother with writing protection.

      It's probably the case that so many of these bugs exist because so many fresh developers are working on so many projects. I suspect that many of these fresh developers are working for lower wages than the older, more cynical developers; the developers with the experience to avoid these. It isn't the case that us old codgers are slow as we develop the software, it's that we're taking the time to put these protections in place, and it's that experience that makes our larger wages worth paying.

      --
      End the FUD
    7. Re:Just Show Me the List!! by mvdwege · · Score: 1

      I think you have just proven the point. When confronted with a statement that PHP encourages bad practices, your answer is to use escaping before creating a query out of an input string. That's the wrong way to go about it. The right solution is to use parametrized queries; they're safer, and more efficient because the database server can optimise them once and re-use them, instead of parsing them over and over again.

      So yeah. The solution you propose is sadly typical for PHP 'programmers', making GP's attack fully justified.

      Mart

      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    8. Re:Just Show Me the List!! by jekewa · · Score: 1

      Yes, I'm trying to suggest that the selection of a language isn't encouraging bad practice. The problem allowing the bad practice that sneaks into development.

      The solution I propose is to defend your software from attack through completing the software you're trying to write.

      If you are compelled or desire to use an environment, language, or solution where you can only submit SQL strings (and especially when you don't have an option to use parameterized input), the right thing to do is escape the input to avoid injection.

      This simple style correction changes the built query using $sql = "select * from sensitive_data where key_id='" + $input + "'" when the evildoer gives you the input ' and 'a'='a from the bad query select * from sensitive_data where key_id='' and 'a'='a' into the safer query select * from sensitive_data where user_id=''' and ''a''=''a' which is no longer a contrived true statement, but is a probably wrong or particular unique ID. This is achieved by the simple addition of escaping around the input akin to SQL = "select * from sensitive_data where key_id='" + mysql_real_escape_string($input)+"'" (none of which, I want to be sure to point out, is either my style or guaranteed to be syntactically correct as it is intended for discussion not use).

      This is, after all, essentially what happens when your parameters a re evaluated by the SQL engine anyway. If the system isn't doing it for you, you have to do it. No matter what language.

      It's a trivial thing to do, and just like checking that you're not running into buffer size issues adds only a little bit of easy syntax to your code.

      So, it's the lazy or inexperienced developer, not the language in which they're developing.

      --
      End the FUD
  19. Just outsource. by nicknamenotavailable · · Score: 1

    Outsource security and programming to those countries responsible for the attacks.

    Right away the system will have fewer vulnerabilities and there will be fewer attacks.

  20. I am divided on this one by wisnoskij · · Score: 1

    While it makes sense for the developer of any product to be held responsible for its quality, it does not make sense for some huge multinational company to sue a $20/hr programmer for billions in damages.

    --
    Troll is not a replacement for I disagree.
  21. 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

  22. Good Luck by epp_b · · Score: 1

    Good luck actually finding a programmer that will give you code you want at the price you're paying.

    Oh, and protection against SQL injection attacks? That shouldn't be part of a contract; that should be implied.

    1. Re:Good Luck by DragonWriter · · Score: 1

      Oh, and protection against SQL injection attacks? That shouldn't be part of a contract; that should be implied.

      "Implied" in a contract means "I hope the judge will decide this is part of the contract even though we didn't write it in." (And, often more importantly, "I hope the person I contracted with will act as if this was part of the contract, even though there is a significant chance that they would not be held to it.")

      If you want someone you have a contract with to both be legally accountable to an obligation and to be certain to be cognizant of that obligation so that you don't have to take them to court, you make sure it is explicit in the contract.

  23. Programmers are only a part of the problem by Anonymous Coward · · Score: 0

    Yes, there are many bad programmers out there. Probably over 50% of them wouldn't understand the bugs (security or otherwise) if you sat down and tried to explain it to them. Probably most people who work as programmers should be in another field. This isn't, however, really the issue.

    With commercial software, the real problems are well known. Product and project managers for the most part do not understand software. What they do understand is their deadline and making their bosses happy. Quality is always sacrificed in order to make those deadlines. Companies put far less emphasis on testing than they should, and even when companies have great programmers and go to great effort to test, things will slip through anyway. Fees, contracts, etc. are really just a replacement for training that comes too late, after the problem has already occurred.

  24. 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 pclminion · · Score: 1

      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:

      Excellent point which should be raised more often. "Sanitization" is a cry of helplessness. It says "I don't have control over my execution environment -- it does mysterious, inexplicable things, and I need to process my data to avoid causing strange things to happen." The problem is not the data, the problem is the environment.

      A shell-variable-expansion exploit due to a call to system() can be solved several ways. The INCORRECT solution is to attempt complex hacks to "sanitize" the input. The CORRECT solution is to not use system() in the first place.

      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. The fault is not with the programmer, who should have "sanitized his data" more extensively. The fault is the language itself, the API which forces us to combine the data with the commands themselves in a way that leaves holes open for exploitation. SQL should only ever have been used as a query language for humans. It should not have gained traction as a programmatic API. Now we have to suffer with SQL injection attacks. The problem is SQL itself.

    2. 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.

    3. Re:Sanitization is a worrying term to use. by Frater+219 · · Score: 1

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

      You could always use the technique the DBMS gives you for encapsulating complex query logic and passing parameters into it ...

      ... stored procedures!

      Cue screams of terror; cue fist-waving and incoherent irate noises. These will be heard from people who never cared to actually learn how their DBMS works, or who think of the DBMS as some foreign thing that their application throws data at once in a while.

      (Your application does not use a DBMS. Rather, a DBMS is one of your application's components. If your app contains a DBMS but you don't know what it's doing, you are in the same camp as "programmers" who do not know how their language's object model works, or who are a little rusty on whether a loop with a false loop condition executes zero times or once. That is: you are not a programmer; you are a burger-flipper who sometimes farts out bad code.)

      Stored procedures are not the chapter of your DBMS manual that was put in there to pad it out so it qualified for the better binding at the publisher. Nor were they put in there just to entertain your DBA. Stored procedures let you simplify the interface between your DBMS and the rest of your application, and this can radically improve your overall security.

    4. Re:Sanitization is a worrying term to use. by GravityStar · · Score: 1

      No way to use a prepared statement for an "IN" clause? What? Sure there is. Dynamically though.

      Just generate the prepared statements on demand depending on the length of the in clause.

      For extra credit:
      only generate "in" clauses in multiples of 10;
      cache the prepared statements that are generated;
      error out at a nonsensically large amount of elements in the "in" clause.

    5. Re:Sanitization is a worrying term to use. by TheThiefMaster · · Score: 1

      Or use a temporary table, stick the input into there and then select against it joined to your real data.

    6. Re:Sanitization is a worrying term to use. by swilver · · Score: 1

      Stored procedures... yes, please, let's have our business logic in not just one place but in two places!
      Let's be dependent on one database vendor for the rest of our lives!
      Let's program software in a language that is bolted ontop of SQL, poorly!

      Sorry, didn't want to disappoint you :)

    7. Re:Sanitization is a worrying term to use. by Purist · · Score: 0

      You'll get some level of protection from SQL Injection attacks, but prepared statements don't protect you from cross site scripting attacks unless you validate the input...

      --
      I used to fear clowns...but I'm discovering that chimps are far, far, worse.
    8. Re:Sanitization is a worrying term to use. by argent · · Score: 1

      Cross site scripting attacks can also be prevented by encapsulation and encoding. Do not allow HTML to be inserted into forms and fields: completely encode the text (using &amp; etc...) and if you want to allow people to mark up the content use a markup language you control.

      Yes, Slashdot, I'm talking to you. It's a bear entering text into Slashdot if you want to refer to markup (I had to use &amp;amp; up there). If Slashdot used something like [i]bbcode[/i] where sloppy whitelisting wouldn't do anything but leave extra bracketed commands around to look funny, and encapsulated HTML <tags> on input, it would be much easier to use.

    9. Re:Sanitization is a worrying term to use. by Anonymous Coward · · Score: 0

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

      What's wrong with preparing "select * from foo where bar in (?,?,?,?,?,?,?,?,?)"

      Add lots of ? and then just repeat the last value. The db will normally optimize out the redundant values.

    10. Re:Sanitization is a worrying term to use. by Anonymous Coward · · Score: 0

      No way to use a prepared statement for an "IN" clause, for instance.

      Not entirely true.

      SELECT a,b,c,d FROM e WHERE f IN (SELECT g FROM h WHERE i = ?)

      This will work as a prepared statement as long as your database supports subselecting, which they all should by now.

      You just can even filter at the application layer and provide a list to the prepared statement, if you're building the query on the fly...

      SELECT a,b,c,d FROM e WHERE f IN (

      Now loop through your values, add them to the parameter list and append a ?, to the query string, trim the last , off (or only add the comma if you're not at the last element), and append the last ).

      There is NO excuse to not use prepared statements, except to say that you're using stored procedures instead.

    11. Re:Sanitization is a worrying term to use. by mvdwege · · Score: 1

      Don't be silly.

      Business logic will always partially reside in the database. Even something as basic as your schema design is constrained by business logic. Further, with multitier architectures like MVC, the database is an ideal place to store business logic; in the example given, it would be the Model.

      The minute you use a database, it will hold (part of the) business logic, so why not use all the features available?

      Mart

      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    12. Re:Sanitization is a worrying term to use. by Tablizer · · Score: 1

      But stored procedures (SP's) create at least two problems. First, if you need to add or remove a column, you have to visit 2 places instead of one: the app code and the SP editor. It results in more cost to make a given change.

      Second, things like Query-by-Example are almost impossible to do effectively in SP's because one does not know all possible relevant parameters ahead of time (unless you make a combinatorial mess).

  25. Therac-25 by SemperUbi · · Score: 1

    Bad programming for a radiation therapy machine caused it to emit 100 times the radiation dose after certain keystrokes, burning patients badly and killing some of them. Wikipedia has the root cause analysis.

    1. Re:Therac-25 by vcgodinich · · Score: 1
      The machine threw errors to the operator btw, and patients complained of severe burns.

      Bad documentation and overworked / insensitive nurses also caused the deaths

    2. 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.
    3. Re:Therac-25 by Anonymous Coward · · Score: 0

      I'm glad that you mentioned this. Very famous case where a bug caused actual *deaths*. Every software engineer should read about this story.

      - Dominic Michael Salemno

    4. Re:Therac-25 by Anonymous Coward · · Score: 0

      I really hope you are not in the computer field vcgodinich. A machine should never allow such a large dose to be emitted. If the machine gives a nurse this capability, then this obviously is a big *EPIC FAIL* on an engineering point-of-view. Hence, documentation and staff should not even be considered in this situation. Most definitely an engineering disaster.

      Nurses are trained in medicine, not computers. Hence when they see something unexpected, they are merely trained to hit next or hit 'enter'. This is in any field where computers are used. I definitely would not blame a nurse.

      The hospital physicists should've been on this as well.

  26. blaming programmers.....DUMB by Anonymous Coward · · Score: 0

    what is a programmer to do when managers demand short coding time, nothing but leave features out. Each feature costs time and given less time companies have to be happy with more bugs

  27. 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...

  28. Post a link to the actual list by Anonymous Coward · · Score: 0

    Instead of articles *about* the list, go to http://cwe.mitre.org/top25/.

  29. "those O-rings will be fine.. its not that cold" by decora · · Score: 1, Insightful

    some jackass circa january 1986

  30. 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.

    1. Re:You get what you pay for... by MikeFM · · Score: 1

      You don't think $7/hr is enough to write good code? Oh and you want it fast? Sure. Good, cheap, quick. Pick one.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    2. Re:You get what you pay for... by Hognoxious · · Score: 1

      Good, cheap, quick. Pick one.

      I thought it was "pick a maximum of one".

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    3. Re:You get what you pay for... by MikeFM · · Score: 1

      They can pick it. Didn't say they'd get it. But sometimes clients/employers like to feel they've set a goal.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  31. Re:zero risk by Anonymous Coward · · Score: 0

    Wow, that dude sounds almost as scary as that guy named Sue.

  32. I always do that... by Anonymous Coward · · Score: 0

    I must have put a decimal point in the wrong place or something. Shit. I always do that. I always mess up some mundane detail.

  33. 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.

    --
  34. 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.
    1. Re:Blame HTML and the browser for XSS. by clone53421 · · Score: 1

      Oh? Really?

      Your solution, no script in the body, wouldn’t avoid this XSS proof-of-concept attack. (It alerts document.cookie... but if I was more nefarious, I could send the session cookie to a logging site via Ajax.)

      Besides, there are plenty of cases where you need scripting in the body: onclick, etc. You really think I’m going to set up an onload event, find all the elements that need onclick events by their IDs, and dynamically assign the onclick events? Hell no, I’ll put an onclick event in their tag like any other sane person would.

      The problem isn’t HTML.

      The problem isn’t the browser.

      The problem is some moron not escaping HTML entity symbols, in this particular case. And yes, if somebody writes software that is vulnerable to this trivial of an exploit, he or she is a moron.

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    2. Re:Blame HTML and the browser for XSS. by MikeFM · · Score: 1

      Thanks for that trip back to 1997. It was funny.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  35. Show me by hoytak · · Score: 1

    a programmer who doesn't get bitten by race conditions on occasion, and I'll show you one who doesn't program more than basic multithreaded code.

    A good programmer is a good debugger...

    --
    Does having a witty signature really indicate normality?
  36. Re:zero risk by Dahamma · · Score: 1

    Whoosh!

  37. So what does this do to open source? by Anonymous Coward · · Score: 0

    What if you obtain your software through means other than a written, detailed negotiated contract?

    What if you provide software you have written to the world under terms no more detailed than, say, the GPL?

    Is this really a serious effort at security, or is it a corporate push to get entities away from libre software?

    Any word on who is really behind this?

  38. 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 macintard · · Score: 0, Interesting

      When your avionics systems interact with end users with malicious intent, let us know. For now, just keep your pilots alive.

    2. Re:Lol @ Dangerous by shutdown+-p+now · · Score: 1

      A classic buffer overflow is definitely not a "website programming bug", especially considering that most web applications are written in managed languages, in which buffer overflows are non-exploitable (all you get is an error/exception).

    3. 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.

    4. Re:Lol @ Dangerous by Anonymous Coward · · Score: 0

      I hear you on this one. I work in the process control industry, writing software that runs powerful and dangerous machinery, so none of these are really all that applicable to that work.

      In fact, one might argue that the majority of software that is written in any given year is embedded software in electronics devices which have nothing to do with SQL or website work.

      Maybe the world of "web programming" is full of reprobates, but in the software that runs cars, aircraft, microwaves, industrial facilities, assembly robots, stuff where it actually matters, this level of inattention is either unheard of or quickly remedied through the HR department.

    5. Re:Lol @ Dangerous by Verity_Crux · · Score: 1

      My roommate is a pilot. They wouldn't let him carry on his fingernail clippers last week. It must be common temptation for pilots to cut their fingernails mid-flight. (I agree that those of us writing transportation control software have a lot more at stake. If I wanted to manipulate the website on purpose I suppose I could forward myself some credit cards and passwords. That's still a level below accidentally accelerating when we intended to decelerate.)

  39. Nice suggestion to... by zullnero · · Score: 1

    Hold devs responsible for bugs that creep into code. Because, after all, we all know that developers always get to work on unlimited time constraints and NEVER have any pressure to cut corners and get something out fast...right?

    If they do that, there has to be a means to defend oneself in that situation, or they're suggesting that unlike any other production industry, the workers would be held accountable for a company's systematic failure to provide an operating environment and schedule that could produce success. Work a developer 24 hours without paid overtime? No problem. After all, if they get delirious and check in some code they were using for testing and were too out of it to remove it and it gets into the final version...and poof...there's a bug, you can sue them for whatever they were paid during 8 hours of that shift. Or a lot more. Then, you end up with the legal problem of defining what a proper environment and schedule would be. After the dust settles, all you'll have is a pile of bureaucracy and a legal mess that will just end up in shafting the developer, and not the management ultimately responsible for the release, in the end...after way too much money and time is spent trying to wade through that mess each time a bug is found in production code. Ridiculous.

    1. Re:Nice suggestion to... by Tyren · · Score: 1

      The biggest issue I see is that there is not a single party to blame for many bugs. Who is most to blame? The developer who made the mistake in the first place? The person who wrote the test plan that didn't cover the scenario in which the bug appears? The person who signed off functional testing? The person who signed off on the code review?

      Quality processes are put in place to protect the company from the inevitable mistakes of a single developer. If the company has a proper process in place, it becomes extremely difficult to point the blame at any single person. And if the company can't be bothered to put a proper quality process in place, management is just as much to blame for errors in the end product as the developers themselves.

  40. Did any of these kill?? Re:Just Show Me the List!! by davidwr · · Score: 1

    Any bugs that resulted in a human death move to the front of the line.

    Defective automobile braking and accelerator systems perhaps? Medical equipment that delivered too much radiation due to a software error (vs. machine-operator error)?

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  41. 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."

  42. 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.

    1. Re:What it's like to do software like that by Anonymous Coward · · Score: 0

      EAL-6 is not a high security standard, it's a high assurance standard. All assurance means is that we have confidence in what something is. With the right protection profile, I could get my ball point pen certified to EAL7, but that doesn't make it more "secure" than anything else; it just means that whoever performed the evaluation has a lot of confidence that the properties claimed in the PP are met.

    2. Re:What it's like to do software like that by Anonymous Coward · · Score: 0

      Few buyers can afford the money or patience that developing software according to the aerospace model requires. The cost and time multiple can be as large as 15X.

    3. Re:What it's like to do software like that by dbIII · · Score: 1

      The one where, one day, you're sent to an unmarked office in an anonymous building for a lie detector test.

      They were conned into buying an expensive bit of snake oil by the writer of Wonder Woman (I'm not joking, look it up) and you expect real security?
      Outside of the USA people would just look at the machine and laugh, or get very annoyed that their employment prospects depend upon such voodoo.

    4. Re:What it's like to do software like that by Hythlodaeus · · Score: 1

      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 true, and the reason I'm working with data structures that have 9 bit floats and 48 bit booleans.

      --
      For great justice.
  43. Only if they submit to the same background check by tomhudson · · Score: 1

    such as verifying that all team members successfully clear a background investigation

    I have as much of a right to verify their background. After all, you don't want to deal with convicts.

  44. If this was Wikipedia... by scdeimos · · Score: 1

    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. [citation needed]

  45. another party at fault by Walt+Sellers · · Score: 1

    "He who pays the piper is calling for a low-quality tune" - Tom DiMarco and Timothy Lister in their book PeopleWare: Productive Projects and Team

  46. Software developer malpractice insurance by ub3r+n3u7r4l1st · · Score: 1

    yay! another way for the insurance people to make money!

  47. Because only a moron would sign this clause ... by tomhudson · · Score: 1

    The Vendor shall identify in writing the person who will be responsible for overall security of the application development, management, and update process throughout the Contract period. The person identified shall be a single senior technical security specialist, to be known as the project Security Lead. The Security Lead shall certify in writing the security of each deliverable.

    You now become personally liable for any problems. No lawyer would have their client sign this. Which means we can ignore everything else they recommend, because it's tainted by the stupidity of this "requirement."

    There are less painful ways to earn your Darwin than by the death of 1,000 legal cuts.

  48. Non-programmer by Lord_of_the_nerf · · Score: 1

    Programming machines with capacity to love?

  49. Only One Solution by rebelscience · · Score: 0, Flamebait

    The solution to the software reliability crisis is to abandon the Turing Computing Model and adopt a deterministic, non-algorithmic, implicitly parallel, synchronous and reactive software model. This model is based on the notion that almost all unforeseen (and unpreventable by syntactic debuggers) bugs are due to erroneous temporal expectations within computer programs. Timing is the critical element of computing that is missing from the Turing Computing Model. And it's not a matter of providing clock objects for use in certain time-dependent applications. Timing is critical at the instruction level because it allows us to determine the invariant temporal signature of a program and sound an alarm whenever a deviation is detected. Software should be such that it should be possible to determine whether any two events (operations) within a program are either concurrent or sequential under various conditions. This sort of temporal determinism will enhance security and reliability by many orders of magnitude if not cure the problem once and for all. If you're serious about finding a solution to the parallel programming crisis that is also a solution to the reliability problem, check out the links below. It's free info. Take it or leave it.

    How to Solve the Parallel Programming Crisis
    Parallel Computing: The End of the Turing Madness
    Why Software Is Bad and What We Can Do to Fix It

    The jest of it is that we must reinvent the computer. We are using essentially the same model that Babbage invented more than 150 years ago, the thread concept. It's time to change.

    1. 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.
  50. It blew up my whole city by Anonymous Coward · · Score: 0

    I divided by zero once.

  51. 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.

  52. 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!
  53. Re:zero risk by Anonymous Coward · · Score: 0

    "Well I'll tell 'ya that I've fought tougher girls, but I can't really remember when,
      she kicked like a mule and bit like a crocodile"
        -- With apologies to Johnny Cash

  54. Re:zero risk by Anonymous Coward · · Score: 0

    To be fair, I used to agree with this 100%. Now that I'm in a position where I'm the one accountable for any errors, not so much....

  55. 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 Anonymous Coward · · Score: 0

      Luckily the audit trail will show that the alert_code was indeed red at the time you launched those missiles! :-)

    2. Re:The most dangerous C programming error by Anonymous Coward · · Score: 0

      enum color {
              red,
              green,
              blue
      };

      Today is your lucky day. :-)

    3. Re:The most dangerous C programming error by omuls+are+tasty · · Score: 1

      Here's a bulletproof way of fixing that:

      typedef enum {red, yellow, green} color;

    4. 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 ();
      }

    5. Re:The most dangerous C programming error by geminidomino · · Score: 1

      Yes, I am aware that "sleep 500" should be "sleep(500)". *sigh*

      Need coffee...

    6. Re:The most dangerous C programming error by Quirkz · · Score: 1

      In PHP, my most dangerous error tends to be using = instead of == in IF statements. I suddenly make everything true all the time. It's perhaps comforting as a philosophy, but it's pretty bad for functionality.

    7. Re:The most dangerous C programming error by cain · · Score: 1

      if (alert_code = red)
            launch_missles ();

      Yes it's dangerous, but only because launch_missles is actually a #define:

      #define launch_missles() \
              fprintf(stdout, "I'm launching the missles now!\n"); \
              really_launch_missles ();

      Heh.

    8. Re:The most dangerous C programming error by Anonymous Coward · · Score: 0

      Flip the comparison. "if (red = alert_code)" will cause a compiler error, assuming red is a value.
      IE:
      if ( 1 = i )
      will cause the compiler to catch your mistakes.

  56. Re:zero risk by hitmark · · Score: 1

    is it me or is americans in love with absolutes?

    --
    comment first, facts later. http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
  57. Bad "it's not the programmer's fault" comments... by Anonymous Coward · · Score: 1, Insightful

    Really bad.

    The problem is that 99% of us fellow programmers are full of sh*te and know next to nothing. How many programmers do know what a rainbow table is? How many know what use a salt is for? How many know that in most PKCS the public/private key pair is typically used to exchange a symmetric key and why is it so? The birthday paradox? How many know how a timing attack works?

    If you think that's bad, I've got much more worrysome: most programmers simply do not understand at all how public/private crypto keys work. I remember scratching my head on this, last century, when I read about it. I simply couldn't understand it at first. "Why would it be slower without the private key?". I went on to write my own algo to crack weak keys. Just to "master" the topic. Who takes that pain?

    Another monstrously huge problem is that you can't really be a good programmer unless you've also at least some sysadmin skills. Do you eat stateful firewall rules for breakfast? Or may you know jack shit about networking and you're writing your applications so that it becomes a pain for sysadmins to install/monitor and they've got to pierce holes everywhere for your swiss cheese app to run correctly?

    Face it, there are so many security issues because most programmers are completely clueless when it comes to security.

    You want to see how lame it is? Go look at the retarded answers voted +30 on stackoverflow.com on some subjects: I saw one accepted answer with 32 votes where the dude explaining what a salt was completely missing the point. Then there was a deluge of comments telling him he and all the people who voted this crap answer up where on heavy crack, yet the comment defending the bogus and stupid answer themselves kept being modded up too. Then of course if you get a bit too vocal in your own answer (who still gets some +votes because they're not all complete retards) because you're pissed off to read such misinformation you've got retards with lots of rep like Shog9 who're going to play the revisionists with your posts and for lots of these high reps are completely clueless too, they actually change the meaning of what you wrote, making it wrong (not on purpose, it's incompetence, not malice). And that "tragedy of commons" website of crap is where the "real programmers" hang out. Sad.

    This is how bad the situation is: most programmers really have no fraking clue about security. Most programmer don't even know what a stateful firewall is.

    Worst of them all: because XSS and SQL-injection are not hard to understand, they *think* they know it all about security when they know what these attacks are. Yet they are actually completely clueless for about 20 others issues of these 25 listed.

    The bullshit answers "but the bad buy are attacking us" are no excuse for our incompetence and lack of knowledge.

  58. Heh, got em! by Anonymous Coward · · Score: 0

    I'm in the process of building a web site. Based on past experience, I wanted to make sure that I could knock out SQL injection. I also made sure that covered buffer overflows and cross site scripting. Then along comes this Slashdot article and BANG! I realise I've covered the top 3. Now all I need to worry about are 4-49, and I'm good to go.

    1. Re:Heh, got em! by Anonymous Coward · · Score: 0

      Now all I need to worry about are 4-49

      Bounds error: Illegal array index 26+++^%sd&( &ds#( _^f* (*(_f)

      NO CARRIER

  59. Number One Error? by pipingguy · · Score: 1

    Believing in output when input is garbage is the worst computer-related sin.

    I think most of us here understand why this is true.

  60. Prove me wrong by Anonymous Coward · · Score: 0

    Why don't you build your "Universal Behaving Machine"? It doesn't have to be even remotely powerful, it just has to prove universal capability. Hell, if you don't fancy fiddling with breadboards, you could even do it in software/on existing UTMs, though I doubt you will, given your distaste for software/UTMs (HINT: atomise "time" in your virtual machine, make all operations as discreet representations of their actual indiscreet nature, then show frames/snapshots and compare simulated UTM runtime to simulated UBM runtime, obviously choosing operations with heavy b/locking issues for UTMs to demonstrate UBM superiority). Of course, a virtual machine wouldn't have the performance advantage you're talking about, but again - all you need is proof-of-concept. Such a proof of concept could fund your "science" for the rest of your life (both financially and in terms of credibility), so it's not as if there's no incentive.

    Though for the record, I think you're as balmy as a bag of bedbugs. I find it inherently contradictory to speak of an operation/process that can produce valid output when its input changes during operation - for example, if you had an operation that returns $(input+5) with 5 (atomic) loops of incrementing by 1, and at an arbitrary point during operation the input changes, then obviously timing always enters into it . And don't tell me that mathematics or algorithmic logic is UTM-speak, because then your "U"BM is not a "universal" machine (humans can do mathematics, and we're "universal" machines). But prove me wrong, and I'll praise your name.

  61. Re:"those O-rings will be fine.. its not that cold by Anonymous Coward · · Score: 0

    The loss of 7 people was tragic, but not an unjustifiable risk for such a grand endeavor as human spaceflight.

  62. Re:zero risk by Noughmad · · Score: 2, Informative

    Only a Sith deals in absolutes.

    --
    PlusFive Slashdot reader for Android. Can post comments.
  63. Re:zero risk by HateBreeder · · Score: 1

    Of course, she's a woman so she doesn't have the 'the balls'...

    Does that mean she insists on absolute safety and was trying to say that in a humoristic way?

    --
    Sigs are for the weak.
  64. 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.

  65. Wrong way of putting it! by Der+PC · · Score: 1

    I wish the original poster (and everyone else using these terms) would stop doing so.
    There are no such thing as "bugs". There are programming errors and programmer mistakes.
    And "bugs" (aka. programming errors) do absolutely not "creep into the code"!
    This terminology has made for a bunch of apologetic imbecile programmers that blame their errors on the position of the stars or the foulness of their neighbours farts. They do by no means convey the reality of the situation.
    I am a computer scientist, and I stand by every programming mistake I make.

    --
    This signature is DRM protected. By the DMCA, you are not allowed to counteract or oppose to it.
  66. When I were a lad... by Mattskimo · · Score: 1

    At school we would write programs (mostly silly adventure game style things) in QBasic and share them with the whole school on an unsecured hard drive attatched to the main server. I once added a few lines of code that went something like 150 PRINT My name is Adam and I like willy 160 GOTO 150 to a friend's game. Happy times.

    1. Re:When I were a lad... by clone53421 · · Score: 1

      It must have been a really long time ago... you seem to have forgotten that you have to quote strings in Basic. That would print the value of the variable named MY and then give a syntax error on NAME. (Since Basic does not require you to declare your variables, if MY does not exist it would print 0.)

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    2. Re:When I were a lad... by Anonymous Coward · · Score: 0

      Well we're talking circa 1994 so yes, long enough for me to forget. That doesn't seem to be the way I remember it having been but last time I used it I would have been about 12 and much information has gone in and out of my head since then so you're probably right.

  67. 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?

  68. Re:Bad "it's not the programmer's fault" comments. by HonIsCool · · Score: 1

    Well... NASA has never lost any space probes due to software bugs, right?

    And OpenBSD has only had two remote holes ("Only" two?) in the default install (with nearly all services turned off).

    Avionics industry is doing better, but check out the requirements on them ( http://en.wikipedia.org/wiki/DO-178B )
    If this is to be followed for all software, well, something is certain: costs and development time will go up.
    In my limited experience, the wish is rather for these to go down even further, with more impossible deadlines ever coming up...

    --
    "Give me six lines of C++ code written by the most competent programmer, and I will find enough in there to hang him."
  69. Utter Bullshit by Anonymous Coward · · Score: 0

    Whatever is made on human being's hands, is prone to have errors, simply put. It's no use to try this ridiculous contract, that'd only make the work-hour more expensive and still, the human factor denies the assurance of an error-free software.

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

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

  71. 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)
  72. Except that still misses the point by Moraelin · · Score: 1

    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.

    I'll be the unpopular one and say that except even then,

    1. IRL you'd have a good chance to catch the terrorist. Someone would see them trying to attach the bomb, there'd be traces, etc. I've yet to see many programmers think of implementing the equivalent as logging and monitoring.

    Probably the worst offender I've seen in this aspect was a site where deleting your user also cascaded through all foreign keys and erased any trace that you ever existed, or done anything. Contracts, debts, messages, everything would just disappear in a black hole. We're talking about a B2B site where contracts started at millions of dollars. But you could just delete your user and any trace that you ever accepted that contract would simply disappear.

    Sorry, but that's beyond "I'm not a civil engineer" and into the realm of being a clueless fucktard.

    2. Most of these exploits are known to already happen every day, and are really just maliciously triggering a bug that is already there. If you want a more apt comparison with civil engineering, it's not terrorists with bombs, but someone driving a car into a bridge pillar. Sure, it can also happen maliciously, but it is a fault you're supposed to prevent either way.

    3. Even terrorist attacks are often taken into account in civil engineering. See the WTC which was actually supposed to withstand an airplane impact from a smaller airplane than those actually used. Or I was talking to someone who actually does simulations for an airport so they can improve their layout and lessen the damage in case someone does detonate a bomb there. Etc.

    So basically, yes, RL civil engineers actually have to think of such scenarios too. Unlike the average retrained burger-flipper programmer type who just finds excuses for why he doesn't.

    4. The real reason why the most extreme terrorist attacks aren't taken into account in RL civil engineering projects is a calculate risk. If probability of an attack times damage done is less than what it costs to reinforce the bridge more, the decision can be taken to not reinforce more. But it's an actual calculate risk, not a stupid excuse to do a crap job.

    And more importantly software doesn't have the same "the probability is too small" factor to justify such a decision. An XSS exploit or SQL injection being actually exploited isn't as rare as a terrorist attack. In fact, it's almost certainty. The same excuse simply doesn't apply.

    4. In the end all this is missing the point: you're there to deliver what the paying customer wants. If he's ok that his site will resist everything except every single script-kiddie who wants to pwn it, sure, you don't have to do that. If he actually expects security, you're there to deliver security, not lame excuses.

    5. And I doubt that the hourly rate is the problem either. I've seen a site done by ridiculously overpaid consultants from a major corporation, where they only checked your rights when they generated the links to other pages, but not when you actually access those pages. Trivial exploit: choose to change your user's password, edit the user ID in the URL of that page to user 0 (it was the admin), change the password. Now log in as the admin of that site and do whatever the f-word you wish. Seriously, stuff like that makes me actually wish there _was_ liability in some contracts.

    --
    A polar bear is a cartesian bear after a coordinate transform.
  73. Re:Secure software: not about imagining every atta by Splab · · Score: 1

    I think you are confusing argumenting correctness and proving correctness.

    It is impossible to prove that your escape sequence for PHP will proper escape any given input for a given field, just look at how many tries the developers behind PHP had at escaping a simple query string for MySQL - and still failed - why? Because they failed to imagine the myriads of ways you can make quoutes in UTF-8 and failed to take into account the forgiveness of MySQL. Very few languages allows you to prove correctness, add an intelligent file pointer like MySQL and you can't prove anything.

  74. PEBKAC by deebug497 · · Score: 0

    A Monday morning quite a few years ago:
    UPDATE Customer SET NotifiedByMail = 'false'
    *click*
    Err, I mean WHERE Id = 140487
    *click*
    Sudden realisation.
    Oh crap...

    Let's say I committed a very, very bad thing and I rolled back under my desk...

  75. 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

  76. Examples contain bugs... by kleuske · · Score: 1

    The fun thing is that i've found at least three bugs in their example code other than the ones MITRE intended to illustrate. The most glaring of which would prevent the code from even getting compiled. http://cwe.mitre.org/data/definitions/805.html void host_lookup(char *user_supplied_addr){
    struct hostent *hp;
    in_addr_t *addr;
    char hostname[64];
    in_addr_t inet_addr(const char *cp);
    /*routine that ensures user_supplied_addr is in
    the right format for conversion */
    validate_addr_form(user_supplied_addr);
    addr = inet_addr(user_supplied_addr);
    hp = gethostbyaddr( addr, sizeof(struct in_addr), AF_INET);
    strcpy(&hostname, hp->h_name);
    }
    The final strcpy will not work, since the first parameter is a pointer-to-pointer-to-char, instead of pointer-to-char.

    --
    Timeo hominem unius libri
  77. And yet most agencies + armed forces use Windows by Viol8 · · Score: 1

    The navy even has Windows running ships. How does that square with all the stuff you mentioned? I'm guessing theres some conflicting interests in government.

  78. 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

  79. 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.

  80. i can see your error by circletimessquare · · Score: 1

    you wrote

    launch_missles ();

    you meant

    launch_missiles ();

    mutually assured destruction saved!

    --
    intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
  81. 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!
  82. THE most dangerous error.... by precaheed · · Score: 0

    Not commenting code adequately, especially ad hoc debugging fixes, leaving it near-unmaintainable....

    I'm going through this right now..... Bugger. Why not document, please?

    Hit: http://jamals-massive.blogspot.com/

    --
    Hit: http://jamals-massive.blogspot.com/
  83. Re:zero risk by TempeTerra · · Score: 1

    Presumably she's implying that she has more balls than the people insisting on absolute safety. /explaining the joke

    --
    .evom ton seod gis eht
  84. 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.

  85. You raise it high enough .... by Anonymous Coward · · Score: 0

    ... until only specialized people wit criminal intent can unpick the locks.

    Continuing with the car analogy (what a suprise) most modern cars's locks can't be picked up open.

    At the end you need an arbeiter of what is the minimum acceptable (insurance companies, trade bodies, professional associations) This will come, sooner or later, we are living in an era of blissful innocence, it will amaze people in the future that software companies had the gall to say ther were not liable for the software they were selling.

    1. Re:You raise it high enough .... by nagnamer · · Score: 1

      Continuing with the car analogy (what a suprise) most modern cars's locks can't be picked up open.

      Criminals nowadays don't even try to pick it open. They just pick it up. :) Seriously, there are other methods to steal a car. Can you really make a car that nobody can possibly steal in any way? A 200-ton monster with full metal armor that deploys as soon as you hit the switch on the key ring, extending 5 feet long nails that bite into the ground below, runs high-voltage electric charge through the armor, and activates motion sensors connected to anti-missile, anti-infantry, and anti-tank weapons system. Try stealing that. Who buys such cars is a totally different question. As is how much you pay for engineering such a vehicle.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
    2. Re:You raise it high enough .... by nagnamer · · Score: 1

      Oh, and I forgot the invisibility cloak.

      --
      Every harsh word you utter has the right address. It only sounds harsh because the one on the envelope is the wrong one.
  86. Re:Secure software: not about imagining every atta by jonaskoelker · · Score: 1

    It is impossible to prove that your escape sequence for PHP will proper escape any given input for a given field

    Do you have a proof of this?

    If finite state (or pushdown) transducers are anything like their counterpart automatons, it should be perfectly possible to prove theorems about them.

    In particular, it might be possible to prove that a particular transducer always outputs strings which satisfy a certain property (i.e. valid SQL where all characters besides literals are identical for all inputs).

    just look at how many tries the developers behind PHP had at escaping a simple query string for MySQL - and still failed - why?

    Because they're incompetent. Or because they were drunk. Or because they didn't have a big enough budget. Or [...].

    Pointing to previous failures isn't a proof of the failure of all potential future attempts: the failures might have been for the wrong reasons, those not having to do with whether the task is possible.

    I think you are confusing argumenting correctness and proving correctness.

    That doesn't surprise me, given how well you appear to grasp the difference.

  87. And how much does a bridge cost? by mdwh2 · · Score: 1

    Unlike a software bug, you can't put out a patch to fix a collapsed bridge, or release a service pack for a unbalanced rotor shaft that destroys a generator.

    So wait, it is acceptable to patch it afterwards?

    When you hear people moaning about buggy software, or claiming the developers be personally liable, the implication is usually that patching afterwards isn't acceptable. If I can patch it afterwards, and maybe charge them for it too, sure I'll gladly accept the comparison to engineering.

    We're talking about functions that you could expect the completed product to perform, not fucking miracles.

    When we're talking about security holes, it's a fair comparison.

    For other things, all that would happen in a world of personal libaility is that the number of functions you could expect the completely product to perform would be vastly diminished. You'd get software that was only certified to be used for a small number of finite inputs (which is no different to the way most engineered products work), and anymore would be a higher cost.

    My bridge doesn't fall down because a bus drives over it instead of a car.?

    Nonsense, things like bridges and tunnels do have limits, and yes there is a risk if you exceed things like weight or height limits.

    Your software still breaks. That's why everyone's pissed at you.

    The ultimate problem is that you want it on the cheap. How much did your browser or operating system cost? Now how much does a bridge cost? And which of these two systems is more complex?

    If you really want to compare to bridges, then perhaps you should start paying those kinds of prices. The fact is that bug free software does exist, you just have to pay for it - and most people are too cheap.

    Your'e paid to produce software that performs a given function, not software that might work under some circumstances.

    I'll gladly be like a bridge builder, who gets paid to write software that works with only one limited set of inputs, and does a specific thing. E.g., a web browser that will decode one specific web page (which is surely no more simple than a single bridge that allows a car to travel from one specific place to another specific place). Most people want things that are vastly more complex, however.

  88. "...since software cannot fail, ever..." by gatkinso · · Score: 1

    You have a bright future in management.

    --
    I am very small, utmostly microscopic.
  89. Bangledesh by WED+Fan · · Score: 1

    I've got a squad of Bangledeshis that will sign the contract, underbid you by going under the original price, and turn it out in half the time. So...shut and take what we give you. Unless you are coming up with something completely innovative and earth shattering, you are doing pee pee caca work and you'll get paid like it. You are a programmer, and like MBA's and English majors, the world is full of your type.

    On another note: Guess who just got promoted and instead of running a programming team, is now managing TEAMS. Hey, and that management seminar has already paid off.

    --
    Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.
  90. Re:Did any of these kill?? Re:Just Show Me the Lis by jekewa · · Score: 1

    How about the one where someone stole someone else's identity from a poorly written application leaving the victim unable to pay for/acquire/use vital services?

    Perhaps there's not a direct bug-to-death relationship, but the trivial-to-defeat bugs that top the list can lead to things going awry, like your Toyota incorrectly controlling the brakes or accelerator (not saying that's what caused the Toyota problem, just saying that can happen with some of these simple errors).

    It is more likely this will result in an inconvenience, possibly severe, than a death, but sometimes if you're not the only YOU in the computer world, it's like death.

    --
    End the FUD
  91. Re:Secure software: not about imagining every atta by TheSunborn · · Score: 1

    That's not true. The implementation of mysql_escape_string does exactly what the developers who wrote it wanted it to do. That is: Escape a string of 8859-1 encoded bytes.

    The fact that this was not what the users wanted and expected it to do, is the reason they also made the mysql_real_escape_string method.

    But this is a design mistake, not an implementation mistake. The mistake they made was that they were having a query* method that accept multiple different string encodings, and an escape method that could only escape iso-8859-1 and other single byte encodings. This was stupid but not a bug as such.

    * Well the real mistake was to have a mysql_query method at all. They should have had prepared statement support only, would have made all php software much more safe.

  92. Re:And yet most agencies + armed forces use Window by jekewa · · Score: 1

    The navy even has Windows running ships.

    I'm sure you mean to to say "the Navy even has Windows running ON ships" instead of the implied opposite "ships critical systems are controlled by software run ON Windows."

    When I was in the USAF, we used openly available software on our desktop systems for our administrative duties like e-mail and word processing, but on the satellite control systems the software was rigorously controlled. It was not anywhere close to running ON Windows (or Mac or BSD or Linux or Solaris...).

    --
    End the FUD
  93. Re:zero risk by Ricochet · · Score: 1

    Never!

  94. 25 errors - just good enough by Anonymous Coward · · Score: 0

    This goes against the business practice
    of "just good enough". If you want the bugs fixed,
    the contract value would have to go up 5X or more.

    I'm sure businesses would appreciate that !

  95. Re:And yet most agencies + armed forces use Window by Viol8 · · Score: 1

    Perhaps the Navy isn't quite as smart as the USAF:

    http://www.slothmud.org/~hayward/mic_humor/nt_navy.html

    I'm hoping they've since given up using Windows for that sort of thing but I wouldn't lay money on it.

  96. Re:And yet most agencies + armed forces use Window by jekewa · · Score: 1

    Perhaps the Navy isn't quite as smart as the USAF

    Heh...we always thought that. In good fun, to be sure.

    --
    End the FUD
  97. Liability exists if it doesn't perform to specs by sjbe · · Score: 1

    This would be like holding a civil engineer responsible when a terrorist blows up a bridge

    If the bridge failed to live up to its designed specifications then the engineer would be liable regardless of the means used to bring it down. Major structures ARE designed knowing that attack is possible and the engineers try to mitigate reasonably foreseeable and preventable problems. While a structure is never designed to withstand all possible attacks you can be sure the contract will outline performance requirements which the engineer is expected to meet. If the bridge met its designed performance specs AND those specs are deemed reasonable given the state of the art (no excuse for shoddy specs) then the engineer has met his professional obligations. Software engineering should be no different in this regard. Just because some software is badly designed and implemented doesn't mean all software engineers should be excused from standard of care in exercising their professional duties.

    Bear in mind, only a fool would sign a contract with unlimited liability. Just make the contract one that clearly specifies the performance levels required and the resources (including time) needed to meet that level of performance. Then get liability insurance like doctors, lawyers, accountants, and other skilled professionals do for when things do go wrong since nobody is perfect. Software engineering is not and should not be an exception.

  98. 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.

    1. Re:Duty of care NOT perfect code by bky1701 · · Score: 1

      If the program were a control system for a jet fighter, or safety system for a subway line, I'd agree. The problem is that what you said could be easily applied to "oh no, there was a bluescreen of dearth, SUE!" because someone's word processor had one of millions of possible glitches that happened to get out of control. Electricians and civil engineers have a lot on their side: control of materials, evidence that they did due diligence (especially for engineers, in the form of plans), and most importantly, a say in what they are doing. Programmers rarely get any of those things. If you want to start criminalizing bugs, expect to see even more development moved overseas and less free and significantly less open source software. There are already enough reasons for competent people to not want to be programmers; making them liable if they made a mistake is only going to make them go into other fields, to be replaced by less competent people who simply don't care. That situation is going to be a net negative for software quality and developers, but it's what you're advocating.

      Good luck with that.

  99. Re:zero risk by nurd68 · · Score: 1

    absolutely.

  100. grammatical errors by Chirs · · Score: 1

    "But then don't be surprised of the opinion customers and your peers hold for you."

    There were some extraneous commas, but the main errors are that the last sentence should read, "But then don't be surprised at the opinion your customers and your peers hold of you."

    1. Re:grammatical errors by starfishsystems · · Score: 1

      Thank you. That certainly rates as one error.

      --
      Parity: What to do when the weekend comes.
  101. it's very hard to include everything in the spec by Chirs · · Score: 1

    It's nearly impossible to actually write a well-formed specification that covers the full operation of the code once a certain level of complexity is reached.

    NASA does it for the code in the shuttle. It costs a fortune.

    The POSIX standard is 17MB of text files written over multiple decades, and people still argue about the interpretation of various corner cases.

  102. Re:zero risk by Kyont · · Score: 1

    I agree with that 110%!

    --
    You shall see a cow on the roof of a cotton house.
  103. 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.

  104. Re:zero risk by Anonymous Coward · · Score: 0

    Is that the crony put in place by the Bush administration? :p

  105. Sure, I'll take liability by geminidomino · · Score: 1

    I'll take liability, when the industry changes enough that I can say "No, you can't have that" when the client asks for something stupid, and the end result is not me moving to a fulfilling career as a wal-mart greeter.

  106. Foreseeable and preventable harm by sjbe · · Score: 1

    If the program were a control system for a jet fighter, or safety system for a subway line, I'd agree.

    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. It doesn't have to cost lives to cause real harm. If you as a programmer can't be bothered to follow reasonable industry standards to prevent foreseeable and preventable harm to your users then you, my friend, are negligent under current law.

    However whether I'm entitled to anything depends on whether you as the programmer A) fulfilled the design specifications of the software and B) satisfied your professional duty of care in the creation of your software. If you can't be bothered to program your software to reasonable industry standards for security then you ARE and SHOULD BE liable.

    Let's be clear - you ALREADY are potentially liable as a programmer for harm caused by your actions. The only things protecting you are the fact that serious harm is relatively rare and hard to trace to you personally. 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.

    The problem is that what you said could be easily applied to "oh no, there was a bluescreen of dearth, SUE!"

    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. A blue screen probably didn't cause my company an appreciable amount of harm. An insecure accounting system that gets hacked would cause a lot of harm. Which situation do you think I'm going to generate a lawsuit over? Which one do you think would get laughed out of court?

    If you want to start criminalizing bugs, expect to see even more development moved overseas and less free and significantly less open source software.

    The benefits of open source are no excuse for software that will cause significant harm to my person or my business. Furthermore, you can limit liability in many ways. Open source software also provides some protection because the user has the opportunity to review the code for risks themselves. If the user can't be bothered to check the quality of software they use when they have the source code you as a programmer have a pretty darn good defense.

    I also doubt you'll see code going overseas more either if the companies doing so intend to sell the product here. Just because something is made in China does not exempt it form consumer protection laws here in the US. Sure there is a cost to any engineering but we certainly aren't demanding enough of our programmers most of the time.

    1. 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

  107. 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
  108. Re:zero risk by Grant_Watson · · Score: 1

    On the script writers deal in absolutes!

  109. Sue the Moon by Tablizer · · Score: 1

    by drafting contracts that hold developers responsible

    Good luck taking Biytu in Timbuktu to court.
         

  110. Ah. Need to sell more training... by jamie(really) · · Score: 1

    "The Vendor shall be responsible for verifying that all members of the developer team have been successfully trained in secure programming techniques.

    Pre-contract award, the Vendor shall document the process including training courses that their application developers have taken prior to developing applications.

    Pre-contract award, the Vendor shall certify to the Purchaser that only application developers who have received appropriate level of formal training on secure application development and passed a competency test on application security shall be involved in the Contract."

    Translation:

    We, the security consultants, are going out of business and need to sell more training courses.
    We, the managers of big companies, are going out of business and need someone to blame. You know that we will still accept the lowest bid, and we know that you're qualifications will be faked, but at least when the shit hits the fan we can point at you and say it wasnt our fault.

  111. The icing on the cake... by jamie(really) · · Score: 1

    In drafting their contract to encourage Customers to demand of the Developers that the code is bug free, they chose to provide this at the top:

    "DISCLAIMER

    THIS DOCUMENT SHOULD BE CONSIDERED GUIDANCE ONLY. IT IS STRONGLY RECOMMENDED THAT YOU CONSULT A QUALIFIED ATTORNEY TO HELP YOU NEGOTIATE A SOFTWARE CONTRACT.

    Please be advised that there is no warranty, expressed or implied, and no assumption of any legal liability or responsibility for any third party's use, or the results of such use of this Document."

    I guess code can be made 100% accurate, but not legal contracts, huh?

  112. don't sign that contract by Anonymous Coward · · Score: 0

    I was once offered a contract for a software position with a paragraph claiming that I was responsible for making sure my code did not infringe on other companies IP or patents.

    I told them I was not an expert on the matter and the responsibility was that of the company managers/lawyers. I returned the contract with a line through that paragraph and my initials. They did not hire me... maybe because of the contract changes. But who really cares? I wouldn't work for a company who offloads their legal liability onto their employees.

    side tip: you can rewrite any contract handed to you... even bank account contracts (I have)... and usually they will accept it and file it away. If they don't then you have the option to walk away or suck it up. In that case: walk away!

  113. 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.

  114. Re:zero risk by Anonymous Coward · · Score: 0

    You are absolutely wrong, you are 0% right and you are a fucking communist.

  115. Off by one errors by bar-agent · · Score: 1

    These ones look like they could be off-by-one errors.

    3. Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
    12. Buffer Access with Incorrect Length Value
    14. Improper Validation of Array Index
    17. Integer Overflow or Wraparound
    18. Incorrect Calculation of Buffer Size

    Only 5 out of 25? Has the dreaded "off-by-one" error lost its teeth?

    --
    i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
  116. Re:zero risk by sorak · · Score: 1

    is it me or is americans in love with absolutes?

    Except when it comes to grammar.

  117. Re:"those O-rings will be fine.. its not that cold by NotBornYesterday · · Score: 1

    Tragic, yes. And entirely preventable if the people in charge had listened to the engineers and scrubbed the launch. Actually dovetails nicely with timmarhy's comment.

    --
    I prefer rogues to imbeciles because they sometimes take a rest.
  118. I guess... by tyoup · · Score: 1

    ... I have to find a new job

    --
    tyoup.