Slashdot Mirror


Blame Bad Security on Sloppy Programming

CowboyRobot writes "ACM Queue has an article that blames security flaws on poor programming, rather than any inherent problems with particular languages. From the article: 'Remember Ada? ... we tried getting everyone to switch to a 'sandboxed' environment with Java in the late 1990s... Java worked so well, Microsoft responded with ActiveX, which bypasses security entirely by making it easy to blame the user for authorizing bad code to execute.'"

135 of 592 comments (clear)

  1. Uhh.. by cbrocious · · Score: 5, Insightful

    Does anyone feel that this is just publicizing what every GOOD developer has been saying for the last 10-15 years?

    --
    Disconnect and self-destruct, one bullet at a time.
    1. Re:Uhh.. by strictnein · · Score: 5, Insightful

      Yeah, no shit... This is news? Bad programming = security issues. Wow... we learn something new every day on slashdot.

      Here's a tip editor boys: if group A says statement A and you post it as a news item, great. But when group B, C, D, E, F, G, and H all say the same statement A, it's not news. It's redundant (remember that modifier you put in? -1 Redundant? That's what it is).

    2. Re:Uhh.. by Short+Circuit · · Score: 5, Insightful

      Unfortunately, unless someone as big as Microsoft (ha!) or IBM gets behind the message, you're not going to see much come of it.

      It's too cheap to quickly pump out code, then run it by QA. You don't even need a shoddy programmer to do it...just pile too many high-priority near-deadline tasks on a good programmer. (Which is all too likely...if you build a reputation for getting things done, you'll get landed with a workload that would put a tech-support guy in a funny farm.)

    3. Re:Uhh.. by doinky · · Score: 2, Insightful

      If Microsoft hadn't killed OS competiton, IBM _would_ be doing this today. OS/2 had a far more secure infrastructure than did Windows (at the time, of course, the main concern was the ability of a bad app to screw with the system; but one could easily imagine today's OS/2 doing a better job against things like internet exploits).

    4. Re:Uhh.. by Cruciform · · Score: 3, Insightful

      Redundant it may be, but how many people were going to read the article or those like it before it got put on Slashdot.

      Now that it's up there, reporters cruising for an easy story for one of the big news providers will take that story, turn it into something at a 5th grade reading level (that's the bar for tabloid news, I shit you not) and turn it into something that the average consumer may read and understand (albeit poorly, because the meaning will get twisted along the way).

      But if it gets more uninformed consumers to say "Hey, why are we paying for poorly designed crap?" then it's done its job, and you're out nothing but the time it took to reply to the parent.

    5. Re:Uhh.. by kfg · · Score: 5, Insightful

      Don't play with matches. Dont' run with scissors. If you push it hard enough it will fall over.

      Some things you just have to keep saying over and over. People are dense, and by the time one group gets it there's a whole new litter coming up from behind.

      You, for instance, who thinks we've only been saying that for 10-15 years, wheras, in reality, 10-15 years ago you heard that from someone who'd already been saying it for 10-15 years.

      Now it's your turn to smack your forhead and say "Oy".

      KFG

    6. Re:Uhh.. by aardvarkjoe · · Score: 4, Funny
      Redundant it may be, but how many people were going to read the article or those like it before it got put on Slashdot.
      Are you implying that anyone's going to read it now that it's been posted on Slashdot?
      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
    7. Re:Uhh.. by C.Batt · · Score: 5, Insightful

      As one of those "good" programmers with a reputation for getting things done, I must concur with your statement. In fact I've observed that the first thing cut from most project budgets, if it's even included in the first place, seems to be adequate technical QA. There's lots of emphasis on meeting business requirements/application feature goals, but very little on engineering quality under the hood.

      Part of the problem is that enforcing best practices and doing techincal QA is both time consuming, and expensive, not to mention boring as all heck. So there isn't much motivation to do it. Bad, bad attitude and we're paying the price.

      --
      -- All views expressed in this post are mine and do not
      -- reflect those of my employer or their clients
    8. Re:Uhh.. by ackthpt · · Score: 5, Insightful
      Yeah, no shit... This is news? Bad programming = security issues. Wow... we learn something new every day on slashdot.

      Here's a tip editor boys: if group A says statement A and you post it as a news item, great. But when group B, C, D, E, F, G, and H all say the same statement A, it's not news. It's redundant (remember that modifier you put in? -1 Redundant? That's what it is).

      Here's a clue: Not everyone started programming at the same time, back in the enlightened age of limited resources and cautious programming. When I saw some jerk writing login spoofs on a PDP 11, back in the early 80's I worked out a few ways to spot these running and suspend them. (Also pass information on to Campus Police to have the perpetrator evicted from the grounds.) People are still learning to program and it's not uncommon for them to take idiot-proofing for granted, unless one of two things took place: 1) They had a good instructor who warned them of the consequences untrapped errors 2) There's a directive where they work which they must follow. I expect even Microsoft must be able to backtrack to the person who wrote leaky code. Problem also is two or more departments whose products must interface, but pass the buck on who is responsible for trapping errors, etc. That role should be filled by a management group responsible for the work between groups.

      Microsoft responded with ActiveX, which bypasses security entirely by making it easy to blame the user for authorizing bad code to execute.'"

      When's the tenth anniversary of the Win95 bug which allowed people to hack Quicken?

      --

      A feeling of having made the same mistake before: Deja Foobar
    9. Re:Uhh.. by Unnngh! · · Score: 4, Insightful
      Yep. In my experience, the good developers get way more work and their quality goes to sh*t b/c they're under pressure and generally unhappy with their jobs at that point. The poor develpers get lower-priortity tasks to work on.

      Being in QA, however, I can honestly say that all the testing you can do on a poorly developed product results only in a poorly developed product with fewer bugs. There is just no way to catch all the bugs in a really POS piece of software when the entire framework is jacked. Not that you can ever catch *all* the bugs, but there's a point at which everyone pretty much agrees that something is good to ship...this usually never happens with crap; crap just ships.

    10. Re:Uhh.. by bay43270 · · Score: 4, Insightful

      First of all, if it weren't worth talking about, there wouldn't be so many comments here.

      Although I can't read the article (/.ed already), I won't let that stop me from disagreeing with the premise. While ignorant developers may have directly caused more individual security problems, the long-term solution isn't to blame the programmers and consider the issue solved. It's a lot more realistic and efficient to fix the programming tools than the programmers (even if the tools can already be used securely).

      Saying that security issues will go away by educating developers is like saying America's obesity problems will be solved by telling all fat people to work out. Its just not practical or constructive on a large scale. (On a small scale, of course, a developer can educate himself just as an obese person can loose weight - with hard work and dedication).

      So rather than criticizing our co-workers (who probably don't care what we think anyway), why don't we identify ways to isolate these people from situations where they could cause harm?

    11. Re:Uhh.. by e2d2 · · Score: 3, Insightful

      Of course you should try to learn how to write the most secure code possible but the developer is only a link in the chain of quality and security. It comes from the top by management demanding higher quality AND at the same time giving the developers and testers the proper time and tools to succeed in that mission. The market told them that mediocre was acceptable and this lesson has been hard to unlearn. Only when the market demands it will it change. Until then we will continue to see bugs and it's inherit bad security.

    12. Re:Uhh.. by mattyrobinson69 · · Score: 2, Informative

      no.

      IBM and Microsoft were working on an operating system together- they had a lovers tiff and Microsoft took their code from the project and made Windows NT, IBM took their code and make OS/2

    13. Re:Uhh.. by __aagmrb7289 · · Score: 2, Funny

      Fact is, if it's an operating system written by anyone but Microsoft, it's more secure than Microsoft's. If you are bored, we can make up some reasons as to why this is so. (sarcasm implied, but hell, I know ya'all will miss it)

    14. Re:Uhh.. by doinky · · Score: 2, Informative

      I worked on OS/2 at the time, son. Microsoft was an impediment to security and stability - and none of the WNT code (except for a few chunks here and there) came from OS/2; their code was inspired by VMS if anything.

    15. Re:Uhh.. by Baby+Duck · · Score: 2, Insightful

      I agree whole-heartedly.

      However, I find it even more astonishing that the paying customer will find the Crap perfectly acceptable!

      If customers started rejecting the crappy deliverables, the bad behavior of the software managers would never be rewarded. Adapt or die.

      Customers rather have Crap sooner, than Quality later. Often, they have to have the software in place to meet some external requirement placed on them. Like doing the exact minimum amount of effort possible to comply with some law like HIPAA.

      For example, if a business has the most Craptastic online presence ever conceived, well then, technically, they still do HAVE an online presence. So the PR department can start pumping out those brochures proudly proclaiming "Hey! You can do business with us online!" It doesn't matter if it's bug-ridden or virtually unusuable. The point is it's there and the brochure literature is legally sound.

      The customer doesn't care. So the software provider doesn't care. And the deadlines given to the Good Programmer makes him unable to produce Quality, even if he DOES care!

      --

      "Love heals scars love left." -- Henry Rollins

    16. Re:Uhh.. by jc42 · · Score: 4, Insightful

      Of course you should try to learn how to write the most secure code possible ...

      This sounds nice, but there's a serious problem: There is a widespread attitude in the security community that the details of security holes should be kept secret from programmers. They're worried about those evil hackers exploiting the holes, and there is reason to worry. But when they keep such things secret, the major effect is to keep programmers ignorant of how they might be making mistakes.

      If you combine this "keep the programmers ignorant of the details" practice with the widespread "don't bother the readers with nerdy stuff that'll be over their heads", the result is the security disaster we now have in some parts of the industry.

      As a programmer, I'd like to learn how to write the most secure code possible. But when I try to read about it, I usually find myself reading text that is frustratingly vague on exactly how something might go wrong. If I could learn the details, I could usually write (meta-)code that would check my own code for those problems. But I can't do that if all I have is a vague "don't do things wrong" sort of statement.

      So, yes, sloppy programming is part of the problem. But keeping your programmers ignorant is also a major part of the problem. Don't feed us vague, feel-good commands to write secure code. Tell us exactly how things have been screwed up in the past. Then maybe we can figure out how not to do it again in the future.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    17. Re:Uhh.. by fatphil · · Score: 5, Funny

      I'm sure I'm not the only one who's learnt that:

      Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

      is indicative of bad programming. Thanks ACM Queue for an enlightening 2-line article!

      FP.

      --
      Also FatPhil on SoylentNews, id 863
    18. Re:Uhh.. by llefler · · Score: 3, Insightful

      This sounds nice, but there's a serious problem: There is a widespread attitude in the security community that the details of security holes should be kept secret from programmers. They're worried about those evil hackers exploiting the holes, and there is reason to worry. But when they keep such things secret, the major effect is to keep programmers ignorant of how they might be making mistakes.

      You shouldn't need the security community to tell you about the issues addressed in this article. Basically all he is saying is have the compiler give warning messages for all unsafe practices. (learn to keep your arrays safe, there are no exploits for the security community to find) And there is no such thing as an OK warning. Just look at his gets/fgets example.

      Personally I'd like to see people keep writing these kinds of articles until everyone gets it; because a lot of programmers don't.

      BTW, I read the summary and was all ready to disagree with the premise that it's lazy programmers and not a language issue. Then he explained that programmers are lazy because we haven't fixed the compilers so that we don't have to worry about these problems. But I'm still leaning towards 'C is evil'.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    19. Re:Uhh.. by jc42 · · Score: 2, Insightful

      Oh, c'mon; I haven't written a call of gets() in years. That doesn't mean my code doesn't have security holes. If gets() were the only security issue, even Microsoft would have solved the problem a decade back.

      Attributing all security problems to things like buffer overflows shows an incredibly shallow understanding of the issue. Most of the potential security holes can't be caught by a compiler (or linker) at all.

      For example, most of the unix part of the industry has abandoned telnet and ftp in favor of ssh and scp. The problems with telnet and ftp have nothing to do with simple coding errors like buffer overflows. They are caused by sending information (such as passwords) across the Net in the clear. No compiler is going to correctly diagnose this sort of problem. And solving them isn't trivial; it requires an in-depth knowledge of the nuts and bolts of encryption.

      We really need good information that goes a lot deeper than the current discussion. Unfortunately, most of the security advice for public consumption really is this shallow.

      No wonder we have such problems.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  2. ActiveX a response to Java? by SilentChris · · Score: 5, Insightful

    "Microsoft responded with ActiveX, which bypasses security entirely by making it easy to blame the user for authorizing bad code to execute"

    Uh, not quite. ActiveX was more a response to JavaScript/Flash/et al. Anything that created a lightweight web app. .NET is their response to Java (and, for all intents and purposes, .NET is miles ahead of anything MS has ever created in terms of security).

    1. Re:ActiveX a response to Java? by tcopeland · · Score: 5, Insightful

      > ActiveX was more a response
      > to JavaScript/Flash/et al.

      Right on... I thought the "ActiveX was a response to Java" was a bit of a stretch too. Also, the author says

      > "everyone complained about wanting to
      > bypass the "sandbox" to get file-level
      > access to the local host.".

      I'm not sure that was why applets were not a big hit... I'd blame the slow JVM startup time for that one.

    2. Re:ActiveX a response to Java? by StephenLegge · · Score: 5, Interesting

      I think the writer meant ActiveX was Microsoft's response to Java *Applets*.

      Java Applets had a well-defined and flexible security API that provided fine-grained set of privaleges for what an Applet could do on the user's system.

      To combat Applets, Microsoft implemented ActiveX with brain-dead all-or-nothing approach that is still used today ("Do you want to trust whoever wrote this to do anything they want to your system? Yes / No"). Then Microsoft forced Java Applets to work the same brain-dead all-or-nothing way in IE.

      SLL

    3. Re:ActiveX a response to Java? by jeffy124 · · Score: 3, Interesting

      .NET is miles ahead of anything MS has ever created in terms of security

      I'm a little hesitant at that. About a year ago plus (when I was still in college), a MS guy came to campus to give a demo on .NET, and that included a survey of the security features. A classic MS fallicy has happened here too: The Feature Creep. It is so overloaded with features I felt it made the thing unusable and difficult to understand.

      My suspicions were confirmed when the guy couldn't get a Demo to work correctly. His demo program, written in C# and provided to him by MS, was supposed to deny him access in scenario #1, and it worked correctly. But he couldn't retool the program to get scenario #2 right, where access was to be granted. No matter what the guy did, he kept getting denied access. Makes me wonder whether scenario #1 was actually correct or provided the expected denial for a different reason than intended. Oddly enough, the same guy had it working at a conference of local ACM chapters a week earlier.

      My take on something like this: Yeah, you could get the configuration right when setting up your security model. But if it's this easy to get it wrong such that the program is unusable, then it's just as easy to get it wrong while still being usable.

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    4. Re:ActiveX a response to Java? by Tassach · · Score: 3, Informative
      Almost, but not quite

      ActiveX was MS's answer to Java Applets. Flash is another applet alternative.
      .Net is MS's answer to J2EE.

      J2EE and Java Applets, despite being written in the same langage, have very little to do with one another.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    5. Re:ActiveX a response to Java? by Decaff · · Score: 4, Informative

      Uh, not quite. ActiveX was more a response to JavaScript/Flash/et al. Anything that created a lightweight web app.

      Uh, yes quite! ActiveX was exactly and precisely a response to Java - Java Applets that is. The idea was to run embedded binaries in a web browser. ActiveX components would run only on Windows, so they could use the Windows APIs, and so not require a plug-in or pre-installed VM, like Java Applet. ActiveX 'security' was by digital authentication, as against Java's sandbox. ActiveX is not related at all to client-side scripting, as with JavaScript. Microsoft's response to JavaScript was - to support JavaScript. .NET is their response to Java (and, for all intents and purposes, .NET is miles ahead of anything MS has ever created in terms of security). .Net is what MS developed when they decided not to support Java client-side. Its pretty good in terms of security, but still has weaknesses when compared to Java.

    6. Re:ActiveX a response to Java? by Decaff · · Score: 3, Insightful

      Such as? Curious to hear this. Most people I've talked to say the two are about neck and neck.

      For example, you are allowed an 'unsafe context' in .Net, so you are back to using raw pointers as in C - same security and crash problems.

      Secondly, you can use the Win32 API directly - same crash possibilities.

      You can do unsafe stuff in Java, but only if you write a C library and access it using JNI. By default, there is no 'unsafe' equivalent in Java, which allows things like different apps to share the same VM safely.

  3. The human factor by SIGALRM · · Score: 5, Insightful

    Anything we do to improve software security must work without the programmer having to switch languages

    I agree; it's not so much the language--or the tools--each developer on a project must be personally aware of vulnerabilities and exploits. Using "managed code" does not "secure" your projects. These days, a C programmer ignoring the dangers of gets(), for example, is incompetent and should not be trusted. It's not, as the article reads, "sloppy"... it's ignorance pure and simple.

    Also, relying on tools like an updated gcc, gprof, or splint--helpful as they are--without experience and education in writing secure code... is asking for trouble also.

    --
    Sigs cause cancer.
    1. Re:The human factor by Short+Circuit · · Score: 5, Insightful

      ...it's ignorance pure and simple.

      No, it's not. You try being a programmer with a six-digit salary, a mortage, and a workload Hercules couldn't metaphorically shoulder.

      Fast, good, cheap. Companies have chosen to drop "good" in favor of fitting more products through the pipeline.

    2. Re:The human factor by surreal-maitland · · Score: 3, Insightful
      absolutely.

      i think a major part of the problem is that security is not an idea which is ingrained in young programmers from the start. i believe this is because teachers don't want to overwhelm students who are learning a whole new set of ideas already, but it's critical that security be something that is kept in mind at all times when programming. i mean, nobody ever *means* to introduce security bugs. there are a few simple techniques which take only a little more time and can save you a lot of heartache later on. for example, *checking* for buffer overflow. most of the time you won't need to, but if it's a part of your style, you'll never have to worry about it.

      --
      -ninjaneer
    3. Re:The human factor by surreal-maitland · · Score: 3, Insightful
      you could argue, though, that 'good' saves you time in the long run because you don't have to patch and patch and patch and eventually scrap it and redesign.

      ignorance isn't always the fault of the programmer, but if he doesn't have the knowledge, ignorance is still the problem.

      --
      -ninjaneer
    4. Re:The human factor by leerpm · · Score: 5, Insightful

      you could argue, though, that 'good' saves you time in the long run because you don't have to patch and patch and patch and eventually scrap it and redesign.

      Try arguing that to the CEO, who is seeing his marketshare drop by 25% to his competitors, because his development team needs 2 extra months to ensure the security is top-notch. The reality is until the market and customer start demanding that security be a priority, there isn't going to much of a change from the status quo.

      That is part of the reason why Microsoft is so successful, they listen to what the customers want. Up until now their customers wanted features, features, and more features. Now their customers have started to realize that security can have a significant impact on their bottom line. So they are wising up to the situation and demanding that software vendors (not just Microsoft) start making security a priority too.

    5. Re:The human factor by Paladine97 · · Score: 2, Funny

      I think I see your problem. You should become Atlas instead of Hercules! I hear he can bear more on his shoulders...

    6. Re:The human factor by stevey · · Score: 2, Insightful

      Secure Programming for Linux and Unix HOWTO is one attempt to correct this.

      I agree though, most books are filled with examples and have merely a warning in the introduction "To reduce the size of code listings all error checking has been removed from our examples".

      I wish more people read documents like that I linked to above, but people can get suprisingly far into their careers before this becomes obvious to them.

    7. Re:The human factor by Tassach · · Score: 2, Insightful
      Using "managed code" does not "secure" your projects.
      No, and it's not supposed to. What it does do is make it EASIER to write secure code by eliminating a very common source of security bugs. This allows you to concentrate on the big picture rather than having to waste time micromanaging the code.
      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  4. "Why fix broken code... by tcopeland · · Score: 4, Funny

    > ...if you can just shoot the message?"

    So true. Thus the logo for PMD, a Java static analysis tool - "don't shoot the messenger".

  5. personally... by Anonymous Coward · · Score: 3, Funny

    I blame bad security on the Speak'n'Spell keyboards we have to use in this office.

  6. The bad ol' days... by mratitude · · Score: 5, Insightful

    I remember the bad ol' days when security was a matter of what you did or didn't do rather than what you didn't know was occurring without your knowledge!

    Abstracting the user from programmatic events wasn't supposed to make your use of the computer a crap-shoot.

    --


    Mod me troll, if you must, I can't help it.
  7. It is time by roman_mir · · Score: 4, Interesting

    It is time to create an official Engineering Certification for software designers/developers, the certified Engineer will have to be financially responsible (insurance etc.) for their creations.

    I would like to see that happen, anyone else?

    1. Re:It is time by stinkyfingers · · Score: 2, Funny

      More methods to make lawyers rich? I'm torn.

    2. Re:It is time by gront · · Score: 3, Informative
      They already have that, its the whole FE/EIT/PE type deal.


      Not real popular with EEs, unless you are in power systems. I've never heard of a software engineer with a PE stamp, but the system is in place.



      http://www.ncees.org/licensure/licensure_for_eng in eers/

    3. Re:It is time by enjo13 · · Score: 2, Insightful

      Yes, that would be great. Open source would cease to exist overnight for one.

      We could all be just like doctors, and spend half of our salaries paying for malpratice insurance. That's AWESOME.

      --
      Turn s60 photos into awesome videos with mScrapbook for all S60 3rd edition phones!
    4. Re:It is time by alex_tibbles · · Score: 2, Insightful

      here in the UK the BCS in conjunction with the Engineering Council do accreditation for Chartered Engineer (CEng) status, and the new Chartered IT Professional (CITP) too.

  8. Well duh/ by grub · · Score: 5, Insightful


    That's why OpenBSD's continuous code auditing makes for good security. Everything but the kitchen sink != better.
    That all said, a sandbox environment allows the developer to make sloppy mistakes, not program better.

    --
    Trolling is a art,
    1. Re:Well duh/ by hchaos · · Score: 3, Insightful
      That all said, a sandbox environment allows the developer to make sloppy mistakes, not program better.
      The point isn't to allow anyone to program better, but to protect the user from the sloppy mistakes that already happen regardless of the programming environment.
  9. Especially True in PHP by Dozix007 · · Score: 5, Informative

    The same is especially true in PHP. The short learning curve for getting started in the language allows for a great deal of insecure coding on the internet. I run a site that promotes secure programming, and is running a security challenge for writing scripts as well. The URL is http://www.uberhacker.com

    1. Re:Especially True in PHP by tekiegreg · · Score: 2, Informative

      I'd have to agree and throw a language into the mix, ColdFusion is traditionally regarded as a language where newbies start their web programming (usually Macromedia Flash people who need a little more power from the server, so we have artists learning how to program). Consequentially ColdFusion has a bad reputation as being an insecure language. While IMHO (I'm Macromedia Certified in ColdFusion so I know my stuff) it is as secure as any other programming language, it's the programmers, not the language people...

      --
      ...in bed
  10. Well, duh! by dacarr · · Score: 2, Insightful

    Figure this - code is only as good as the coder.

    --
    This sig no verb.
  11. No. by Tarantolato · · Score: 4, Insightful

    Okay, it's the happy-fun Slashdot thing to talk about how retraded 'lusers' are. Almost as hi-larious as jokes about Clippy and rebooting Windoze machines.

    But you know what?

    Most developers are retraded too.

    This probably includes you, my friend, as you read it in your grease-stained Manga t-shirt. This is not a problem that will be solved by yelling at people about bad code - they're going to produce it anyways, and in droves. The solution to dumb users is good UI design and a sensible permissions architecture. Similarly, the only workable solution to this problem is architectural.

  12. It Rolls Downhill? by stinkyfingers · · Score: 4, Interesting
    There's the old maxim that "shit rolls down hill". Let's change it to "shit stays at the lowest part of the valley".

    When will we see "ACM Queue has an article that blames security flaws on HR departments and middle management?"

  13. Developing for a prototype by prostoalex · · Score: 5, Insightful
    A lot of the production code that gets written nowadays is created by college graduates who have learned to develop in a quick-and-dirty way to roll out the prototype for their home assignment as soon as possible.

    When you're in college, the graders are not trying to break into your application, they're just evaluating the source code and give you points for correct stack and linked list implementation. Thus giving a false assurance that the real-world development is pretty much the same - friendly and non-threatening environment, no need to check and validate input, no need to resort to minimum security permissions and so on.

    I think Caustictech said it better than I can:

    PrototypeProductionMan come to the ObjectFools team after successful stints at the Unemployment Office and the basement in his parents home. PrototypeProductionMan's talent is making sure that barely functional prototype mockups get rolled out into production. Exception management, security, separation of concerns between business logic and UI code, thread safety, resource management...these are all things you could say good-bye to with PrototypeProductionMan on site! With a mentality like that, it's no surprise that every production deployment ObjectFools has been involved with has turned into a completely fucking unmitigated disaster! At the end of the day, our clients should really thank PrototypeProductionMan as the reason we need to charge them a fucking arm and leg for post-rollout support and maintenance.
  14. As the saying goes... by fiannaFailMan · · Score: 5, Insightful

    a bad workman always blames his tools.

    --
    Drill baby drill - on Mars
    1. Re:As the saying goes... by DunbarTheInept · · Score: 4, Insightful

      People who repeat that phrase are typically trying to imply the converse, that anyone blaming his tools must be doing so because he is a bad workman. This is only true in the case where the workman got to pick his tools himself. The whole point of the expression, when it was originally coined, was that picking good tools to use is still part of the responsibility of the good workman, so he's got no right to complain about having bad tools - even if he has bad tools it's still his fault anyway. The problem is that ignoramuses keep trying to use this expression to refer to the software industry while ignoring the fact that in the software industry, the "workman" that they are referring to rarely gets to pick his own tools, and so the analogy completely fails on that point.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  15. C / C++ by Brandon+Glass · · Score: 3, Interesting

    A lot of problems result from the C and C-like languages' inherent faultiness. The language is a great way of writing "portable assembly language", but makes for sloppy code a lot of the time, even from relatively experienced programmers. It's mainly due to the "New Jersey" approach to development.

    C++ and C are very popular and widely used, and will probably never fade completely as they are too entrenched, however, there are a lot of languages these days with compilers which can produce code as tight and fast as C/C++, but without the mess. This is one example, there are many others.

    1. Re:C / C++ by jedidiah · · Score: 4, Insightful

      C++ should not be so casually lumped together with C. While C provides virtually zero (if any) facilities to automate better practices, C++ does. The two are NOT equivalent.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    2. Re:C / C++ by DunbarTheInept · · Score: 2, Insightful

      But the problem is that since C++ programs can also make calls to the C library, programmers often end up doing that instead of using the C++ features, *especially* with regards to string manipulations. While this might seem like the fault of bad programmers, keep in mind that the string manipulation abilities of C, while insecure, are very, very powerful. Also, for the longest time, the output formatting abilities of C++ were horrible. Even today, while they can do everything that the stdio libraries can do, they still take five times as much verbiage to do it. There's something to be said for: printf( "%12.2lf", balance );

      If the makers of C++ had wanted to get rid of the unsafe use of null-terminated strings, they should have included a FULLY FEATURED string manipulation and string output facility that was just as easy if not easier to use than the one that you could use in old-fashioned C. Because they didn't (at first), they created a dis-incentive for dropping c-style strings.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  16. Fuck no. by Mongoose+Disciple · · Score: 5, Insightful

    Are you crazy?

    Anyone who's worked on a software project of any size (especially in terms of number of people on the project) can tell you that the person who takes the official blame for a development flaw is almost never the person actually responsible for it.

    Maybe if we had a programmers union and I could strike if I was ever asked to implement bad design or put out someone else's fire... maybe. But as things stand? You'd drive a lot of good developers out of the field because they're not skilled enough at office politicking to avoid being made scapegoats for the messes of others, and can't afford to bear the direct financial burden of it.

  17. about time by Deadbolt · · Score: 4, Insightful

    I'm glad someone other than me (who can get published on a site slashdot will link to) said it:

    Compilers shouldn't generate warnings, they should generate errors.

    It's time to stop holding the programmer's hand. If I write a C program that makes 5 malloc() and 4 free(), the compiler should notice that and say, "Gee, you have a memory leak here" and refuse to compile. It should NOT say, "Well, what you're doing is provably unsafe and probably not what you want, but yes sir Mr. Developer, I'll happily crash the system for you!" It is NEVER correct to write unsafe code.

    I understand that there is a certain laxness built into C to make it easy to port to multiple platforms, etc., but these were compromises made in the early 70s, ffs. How long must we live with choices made under circumstances that became outdated 20 years ago?

    --
    "Honey, it's not working out; I think we should make our relationship open-source."
    1. Re:about time by tcopeland · · Score: 2, Insightful

      > If I write a C program that makes 5 malloc()
      > and 4 free(), the compiler should notice
      > that and say, "Gee, you have a
      > memory leak here"

      That's a tricky tradeoff, though... the more stuff the compiler checks, the longer a compile takes.

      Some things couldn't be caught at compile-time, too. I mean, the compiler would have to actually run the program to ensure it correctly allocated and deallocated memory. That's what stuff like Valgrind is for...

    2. Re:about time by Anonymous Coward · · Score: 4, Insightful

      I know you are trying to be helpful but static analysis of code like you are suggesting is usually pretty worthless. Consider:

      int somefunc()
      {
      if (somecondition)
      z = malloc(100);
      else
      z = malloc(200);

      [... some operation on z ...]

      free(z);
      return 0;
      }

      You could argue that the contrived example code is poorly written (which it is) but I merely wanted to demonstrate how easily it is to produce code which breaks your suggestion of counting mallocs/frees.

    3. Re:about time by caerwyn · · Score: 2, Insightful

      Say this again when you can create a compiler that can, at compile time, actually determine if memory will be leaked in all cases in a modern application. If all you're doing is allocating memory and then promptly free()'ing it at the end of a function, great. But in a multithreaded environment with the tossing of objects all over the place to exchange data, the compiler simply isn't going to be able to do that sort of job, at least not anytime soon.

      The problem with your "solution" is that as soon as one of these edge cases- where the programmer *is* correct and the compiler is not- occurs, the programmer will find the way to turn off all of these warnings/errors, thereby removing any gain that might have happened.

      --
      The ringing of the division bell has begun... -PF
    4. Re:about time by Xiver · · Score: 2, Insightful

      Yes, because under no circumstances would a programmer ever want to allocate memory and pass it out of a program's scope.

      </sarcasm>

      Oh and by the way warnings as errors is an option for most compilers AND it is almost NEVER correct to use the word NEVER.

      </rant>

      --
      10: PRINT "Everything old is new again."
      20: GOTO 10
    5. Re:about time by Silvertre · · Score: 2, Funny

      ...and while you're at it, why not solve the halting problem as well.

    6. Re:about time by DunbarTheInept · · Score: 3, Insightful
      Your sentiment is correct, but that's a poor example, that doesn't really demonstrate the problem. A compiler could still follow your if/else ladder and detect that no matter what the condition is, exactly one instance of the malloc call will be made, and thus the one free call is correct. Consider - this is kind of what happens when a compiler complains that a line can be reached while a variable is uninitialized.

      A better example is this. Consider the following code:
      int x;
      int i;
      char **strings;

      x = 5;
      strings = calloc( x, sizeof(char*) );
      // Make some 100-character strings:
      for( i = 0 ; i < x ; i++ )
      { strings[i] = calloc( 100, sizeof(char) ) );
      }

      // do some stuff with the strings (not shown)

      // commented-out line:
      // x = x - 1;

      // Free the strings:
      for( i = 0 ; i < x ; i++ )
      { free( strings[i] );
      }
      free( strings );
      That code works without orphaning memory.

      But now, consider modifying the above example so that the 'x = x - 1' line is uncommented. Then what would happen. Then there'd be 5 allocations, but only 4 frees.

      Trying to write a compiler that can detect the difference between those two cases, with regard to counting the allocs and frees, is essentially a restatement of the halting problem, and cannot be done. The only way to detect that the change to the x variable is important to the orphaning of memory, is for the compiler to go through and examine every statemnt of the code and think "hypothetically, what would happen if I ran this statement?", and at that point the compiler ceases to be a compiler and becomes an interpreter, and thus has the same memory orphaning problem that the code itself has.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  18. Mozilla by IntlHarvester · · Score: 4, Informative

    While it's easy to rip on the idea behind ActiveX, Mozilla.org thought it was a good enough idea to copy it as XPI*.

    The basic idea is that plugins and toolbars should be easy to install, and due to the nature of these things, they often can not be "sandboxed" or run in a Java VM. One of the big complaints about Mozilla is that people find it difficult to install the Flash/Java/Real plug-ins. If vendors supported XPI, this would be mostly resolved.

    The real security problems with IE are not directly related to ActiveX, but instead the holey and flawed "zone" system. There's also some operational annoyances with ActiveX (like throwing up dialogs even though ActiveX is disabled and the lack of an easy way to whitelist), but it sounds like XP SP2 is going to try to fix some of those things.

    * ? Apologies if I'm confused about the moz alphabet soup.

    --
    Business. Numbers. Money. People. Computer World.
    1. Re:Mozilla by 1010011010 · · Score: 4, Insightful


      It's not just that. They integrated web browsing into the file manager -- which is different than merely integrating html viewing. They designed the entire Windows UI Shell to be, basically, remotely exploitable.

      There's no good reason to confound the local file manager with a networked program.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    2. Re:Mozilla by molarmass192 · · Score: 2, Informative

      XPI is not exactly the same as ActiveX. It's only used to install packages for the browser, it's not a format for web applications like Applets, Flash, etc. That said, you're right, you can install malicious code via XPI just like you can via ActiveX. However, *most* browser extensions are written using XUL and JavaScript in Mozilla which is sandboxed ... and cross platform too!

      --

      Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws-Plato
  19. Give Developers Actual Time by Cryect · · Score: 2, Insightful
    Currently a big issue with developing code leading to security issues is rushed schedules. Microsoft has pioneered this and showed its the way to beat your competitors by ensuring you have a new product out right after the fiscal year has turned and IT departments are looking for new software. They might have always been more buggy but they always had a new program out to beat WordPerfect(or WordStar).

    I doubt outsourcing all of our coding to India is really going to help make more secure programs either.

  20. Warnings by dekashizl · · Score: 5, Insightful
    The final and main point the author makes in the article is to suggest that compilers start getting smarter and generate warnings for security problems (such as the "gets()" warnings put in many compilers not too long ago. But:
    These tools have existed for years but are not popular. Why? Because they generate a lot of warnings, and, as countless software engineers have pointed out, it's time-consuming to sift through the spurious warnings looking for the ones that really matter. I've got news for them: there is no such thing as a warning that doesn't matter. That's why it warns you.
    I can't agree more. Almost every large project I've worked on with multiple programmers has tons of warnings throughout development. I mean BOTH compiler warnings AND runtime warnings in the log files. Sometimes you can track one down and find out "I forgot to tell you that you need to change XXX in your config file", but most of the time you don't even see the new warnings amid a sea of "acceptable" ones, and the rest of the time, it's more of a "I don't know why that's happening, but it seems to work anyway" type of response.

    If you see a warning, get rid of it right away! Once you slack off a bit, it becomes like dirty dishes piling up in the kitchen sink. Nobody wants to touch them, and everybody feels like most of them are the other roommate's anyway.

    1. Re:Warnings by cbowland · · Score: 2, Informative
      Check out the Pragmatic Programmers for their 'broken window' theory, which they use as an analogy for software development.

      In inner cities, some buildings are beautiful and clean, while others are rotting hulks. Why? Researchers in the field of crime and urban decay discovered a fascinating trigger mechanism, one that very quickly turns a clean, intact, inhabited building into a smashed and abandoned derelict .

      A broken window.

      One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment---a sense that the powers that be don't care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner's desire to fix it, and the sense of abandonment becomes reality.

      You can follow the link above to see how they connect crime to poor coding.

      --

      Give a man a fish and he will eat for a day.
      Teach him to eat and he will fish forever.

    2. Re:Warnings by DunbarTheInept · · Score: 2, Interesting

      What about the situation where you build under multiple compilers and they can't agree on things? Sometimes it's literally impossible to get rid of all the warnings.

      Besides, the habit of ignoring warnings often dates back to the days when the compiler was dumber than it is today and would complain about things that were 100% correct, like thinking you need to cast when
      comparing a typed pointer to a void pointer in C (they whole fscking reason void pointers were invented was precisely for situations in which you *don't* have to care what the type is. That's what they're FOR. Then dumb compilers kept yelling at you for not casting void pointers, leading to such uglifications as this:
      if( a_string != (char*)NULL ) ...

      Or, when a function is declared to take a void pointer, like:
      free( void *m );
      and the compiler would sometimes complain and bitch about not casting pointers when calling it.

      This led to a practice that was even WORSE than leaving the warnings in place: Programmers being in the habit of casting *everywhere*, unthinkingly, to get the compiler to shut up. I even worked one place where this was the mandatory standard. I tried pointing out how bad a practice this is, because then the compiler will never tell you about actual ERRORS in mismatched types either - every time you use the wrong type of pointer, the compiler will assume you know about it and are doing it on purpose, because that's what you're trying to tell it by casting the pointer, so it won't raise an error.

      This might sound like ancient history, like it doesn't matter, but often it's the case that this kind of thing is the reason many warnings are still there in old code, and new projects still use an awful lot of old code in them.

      Sometimes the only response to a warning that works is to say, "Yes, I know what you're trying to tell me mister compiler, but in this case, you're wrong. No, that variable isn't uninitialized, it's just getting initialized somewhere you aren't noticing it. Yes, I know that variable is unused, but that's only because there's a section that only compiles when DEBUG is ifdef'ed on, and that's the section that still uses it.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  21. Ada's strengths, Ada's problems by Anonymous Coward · · Score: 5, Interesting
    Ada as a language roughly equivalent to C++ in form and expressiveness. Ada goes beyond C++ in that it allows one to more tightly specify constraints on data and to have these constraints automatically checked and enforced. That is the basic strength of Ada.

    The weakness of Ada is its woefully outdated standard libraries which are more oriented to a 1960s mainframe view of the world. There are no containers, no STL, no general algorithms. That is the weakness of Ada.

    If Ada had the powerful standard libraries which C++ has, that combined the safety of Ada would make it a first choice for many programming tasks. Ada can still deliver on bug free programming. But it lacks the scaffolding needed for 21st century projects.

    1. Re: Ada's strengths, Ada's problems by Black+Parrot · · Score: 2, Informative


      > Languages that don't have variable length strings make me choke.

      Ada does support variable-length strings, as well as fixed-length and bounded-length strings.

      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re: Ada's strengths, Ada's problems by Black+Parrot · · Score: 3, Insightful


      > But I hate 'BEGIN' 'END' where { and } will do.

      And some hate {} where indentation will do...

      When people have holy wars over whether { should go on the same line or at the start of a new one, that should be a hint that the character really isn't all that important to program semantics.

      At any rate, minimizing the number of keystrokes required to write a program should be fairly low on your list of what makes a good programming language, unless you're a hunt-and-peck typist. In general, readability is more important than writeability, if the program is going to have to be maintained.

      --
      Sheesh, evil *and* a jerk. -- Jade
    3. Re:Ada's strengths, Ada's problems by Col+Bat+Guano · · Score: 2, Informative
      I still program in Ada, and like the if/elsif/else/end if (what? - you have to type "else" in C++!!!), loop/end loop syntax. Having a loop with loop/end loop and an "exit when boolcondition;" is pretty neat.

      I've seen lots of people who do...

      while (..) {
      ...
      ..
      } //while
      which to me seems not much different to "end loop".
      The single character {, } certainly makes it easier to see where control structures end at a glance so that's a Good Thing (tm).

      I find that my fingers can type begin/end quicker than {} (no shift key), but I suspect it's just a matter of habit. When I switch from Java to Ada, or Ada to Java, I often get the comment symbols wrong (-- vs //). Most of the typing issues are pretty much irrelavent once you've done a small amount of programming in a language (IMHO).

  22. Blame the Specs and Time. by jellomizer · · Score: 4, Insightful

    Most security issues are a combination of Bad Specs and Limited Time (where Time==Money) That truely make a program insecure.
    Companies are afraid to make the Specs simple they want the program integrated, customizable and expandable. And all that other good stuff so programmers are forced to make their application very dynamic which makes the program more complex and open for security issues. But combined with these specs they are not willing to pay the programmer for all the time is needed and they get very annoyed when the programer is over budget. So the programmer in order to keep his job will find short cuts to make the programming time faster (Hoping the product will be used in a well protected network. But of course once the program is completed they decide to use it outside the normal specs and put it on a hostile network.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:Blame the Specs and Time. by Anonymous Coward · · Score: 3, Insightful

      Specs? They gave you specs? Man, where I work, they give you vague instructions, then you go through several successive iterations of "you're getting warmer... now your getting colder" until they finally run out time and ship whatever you last checked in...

    2. Re:Blame the Specs and Time. by Cecil · · Score: 3, Funny

      Oh look! A co-worker! How's it going?

  23. Not News by bubba_ry · · Score: 2, Insightful

    I hardly find this news on Slashdot.

    Many of us ./ers program in some capacity and have varying experience. However, it should be understood that a language is not inherently secure (neither is an OS!). It may have features that make is appear more security conscious, but it does not make the code impregnable.

    A car has seat belts and air bags, but that won't prevent an accident or serious bodily injury. It definitely won't prevent someone else from slamming into you.

    Good programming starts in the design. Careful attention to the UI is a must as well (think Driver's Ed!).

    Oh! And check those buffers!!!

  24. .NET Security? by TubeSteak · · Score: 2, Insightful

    Not that i really know anything about .NET, but i recall reading articles which mention that .NET allows you to call on undocumented API's. They might not create direct threats, but we've seen hacks that utilize two or three exploits at the same time. I could be wrong, so feel free to follow up with why.

    --
    [Fuck Beta]
    o0t!
  25. ACM Queue web server has mod_murphy's_law... by MadRocketScientist · · Score: 4, Funny

    Didn't even finish reading the article before:
    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

  26. Boost is working on a replacement for C strings by Animats · · Score: 5, Interesting
    Over in the Boost sandbox, some of us are working on C++ classes to replace C strings in existing code. The usual C string operations (sprintf, strcat) work, but they're all protected against overflow. The idea is that you replace just the declarations, and the code either becomes safe or won't compile. So
    • char s1[80];
      ...
      void foo(char* out, char* in)
      { sprintf(s,"In = %s\n",in); }
    which has a risk of buffer overflow, becomes
    • char_string<80> s1;
      ...
      void foo(char_string_base& s)
      { sprintf(s,"In = %s\n",in); }
    which will truncate the string at the specified length. Note that the "sprintf" line hasn't changed. So you don't have to rewrite complex formatting code. Changing the declarations does the job.

    The new "sprintf" is actually an overload on fixed_string.

    1. Re:Boost is working on a replacement for C strings by happyfrogcow · · Score: 2, Informative

      Why not simply use a less retarded language?

      Troll-like as you are, i'll respond. First of all, what you said is what they are doing. Replacing C with C++ (let the flames begin)

      Second, if you can reduce security flaws in legacy C code by simply replacing the variable definition and recompiling with a C++ compiler, that is a good thing. it can probably be automated so you don't have to sift through millions of lines of code looking for C style string declarations.

  27. It's a little of both by Tassach · · Score: 4, Insightful
    Good security requires that you understand the principles of what makes a program secure as well as knowing the exploitable weaknesses of the language in which you are developing the software. Using a "more secure" language will not improve your security if your system architure is not built with security in mind. A securely implemented system is rendered insecure if it isn't administred intelligently.

    The security advantage of some langages is that it makes it EASIER to write secure code, not that they make it impossible to write insecure code. There's a difference between protecting you from accidentially shooting yourself in the foot and preventing you from intentionally aiming at your foot and pulling the trigger.

    It is possible to write secure code in C or C++ -- but it takes a whole lot more effort and talent to get it right than it would to do so in a language which does automatic bounds checking and runs in a sandbox. Unfortunately, history has shown us that it's extremely difficult to write secure C/C++ code -- only a handful of programmers are able to consistently get it right, and even the best of the best still make basic mistakes.

    --
    Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  28. Re:ActiveX? by agclark · · Score: 2, Informative

    There are ActiveX applets all over the place---and not just those with a spyware payload. Think Macromedia Flash/Shockwave, Apple QuickTime, Real Network's player, Microsoft Windows Media Player, etc. You find these apps embedded on countless websites, particularly Flash.

  29. Engineering standards by Raul654 · · Score: 4, Interesting

    Speaking as a computer engineer who passed the FE (on my first try) - the FE is most definitely biased in favor of civil and mechanical engineers, and against electrical and chemical. That being said, there's really very little incentive for EEs to take it. The only things you need it for are government work or testifying in court.

    However, it really gets under my skin when people call themselves "engineers" and they have *no clue* about engineering in general. In texas, they had a school collapse and kill 100 children because the guy who designed it wasn't a real engineer. As a result, they passed the toughest engineering-standards legislation in the country - if you call yourself an engineer and you are not certified (that is, you have not passed the PE) then you go to jail.

    --


    To make laws that man cannot, and will not obey, serves to bring all law into contempt.
    --E.C. Stanton
  30. Great article by sql*kitten · · Score: 4, Funny
    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88
    Seems some folk ought to practice what they preach, eh?
  31. Actually if you'd read the fucking article by BoomerSooner · · Score: 3, Informative

    Which is now /.'ed you would know the author was arguing the point against the hardware people putting buffer overflow checks in hardware for essentially a software design problem.

    He was saying that warnings, etc. need to require the programmer to fix errored code (ie, gets() vs fgets()). Like code optimization, security needs to be a low level function of a runtime/compiler.

    It is a different take on an old problem. If you don't like it simply don't read it. However, since you waste time posting redundant posts about redundant articles I figured it was right up your alley.

    1. Re:Actually if you'd read the fucking article by dasmegabyte · · Score: 3, Insightful

      And it's a great idea, too! Let's extrapolate it, and have gun manufacturers asking gun owners to get safeties for their fingers. After all, it's not the gun's problem if you've got shaky hands! It's not the car's problem if the road is icy and people don't know how to pump the brakes...let's get rid of ABS!

      Seriously...if after soo many years and soo many exploits programmers still haven't got it, they probably never will -- they'll just ignore the warning or throw in lip service methods (the way some Java developers perform exception handling by declaring all methods throws Exception). I've even heard people use the automatic bounds checking in C# or Java as an argument against them. Never mind that bounds checking is optimized to be predictive by the JIT, so it is rarely the cause of a bottleneck. When developers are so stupid that they consider essential security a bottleneck -- and the feature is trivial to add in hardware without slowing down I/O -- add the failsafe and be done with it. At worst, the bounds get checked twice, and that's not a bad thing.

      --
      Hey freaks: now you're ju
    2. Re:Actually if you'd read the fucking article by bee-yotch · · Score: 3, Interesting

      Let's extrapolate it, and have gun manufacturers asking gun owners to get safeties for their fingers.

      Actually, it would be more like gun manufacturers telling bullet manufacturers not to make defective bullets that will blow up in the gun so that the gun manufacturers don't have to add safety against defective bullets.

      they'll just ignore the warning or throw in lip service methods

      At least they'll get a warning.

  32. Re:Java worked well? by cynic10508 · · Score: 3, Insightful

    If Java worked well, it wouldn't be one of the languages that a ton of people hate to work with because of how annoying it is... granted, that is due to the poor VM rather then the problems within the language itself...

    Your argument is attempting to prove that Java does not, in fact, work well. What you're saying goes something like this:

    1. Java doesn't work well.
    2. Therefore Java is annoying.
    3. Therefore a ton of people hate to work with it.

    You can't assume that point #1 is correct because you can never assume that which you are trying to prove. The only proof (albeit subjective proof) you offer is that "tons of people hate to work with it." But if we grant that to you then you're affirming the consequent. Again, something you can not do. This argument doesn't work.

  33. Not Black and White by Doesn't_Comment_Code · · Score: 4, Funny

    Depending on how skeptical you are today, you might think:

    Really bad/inexperienced users write insecure code.

    Good programmers write good,secure code.

    Excellent programmers that work for companies that make a lot of money from support and updates write insecure code that is easy to fix.

    --

    Slashdot Syndrome: the sudden, extreme urge to correct someone in order to validate one's self.
  34. Re:J++ a response to Java by AKAImBatman · · Score: 2, Insightful

    The original poster was correct. Java's main use back in the 1.0 and 1.1 days was webpage Applets. Microsoft took a two pronged approach to this threat:

    1. Microsoft released J++ as a "better" Java. (It actually was at the time. Took me quite a while before I switched back to Sun's JVM.)

    2. Microsoft came up with a new type of embeddable COM object known as "ActiveX". Microsoft was trying to outdo Java by offering the full power of the Windows platform inside webpages. Somehow we were all supposed to be happy that we could write these object in C/C++, and that they could take over your system at a whim.

    It wasn't until after a judge told Microsoft that they couldn't ship Java, that Microsoft started their "COOL" project. The "COOL" project was widely considered a Bad Idea (TM) (much like digital watches) and was widely derided as a adolescent move by Microsoft. Sadly, Microsoft foisted its COOL platform on the world anyway, and now we have .NET.

  35. I Disagree by RAMMS+EIN · · Score: 4, Insightful

    I don't agree. Yes, if programmers wrote perfect code, there would not be vulnerabilities. But programmers are people, and people make mistakes. This is a given.

    For the solution, I think we must look not to the programmers, not to the languages per se, but to their standard libraries. C's pointer arithmetic and unchecked array bounds allow for a variety of mistakes, but also for great efficiency. It's the standard functions like gets, scanf, sprintf, even printf that make C unsafe. Sure, the programmer can be blamed for writing unsafe code, but if these functions were removed and replaced by safer ones, there would be that many fewer mistakes to make.

    Pointer arithmetic is mostly evil and should be avoided. As for bounds checking, I would think that with all the constant propagation modern optimizing compilers do, it would be easy enough to determine which accesses are guaranteed to not go out of bounds, and do bounds checking for the rest. Exceptions help, too. If something goes wrong that the programmer didn't account for, the program stops. In the best case, that means no harm done. In the worst case, the system is DoSed, a situation which is so undesirable from a productivity point of view that it's going to be fixed, whether or not the parties involved care about security.

    Comparing a language that follows all the guidelines set out here to one that doesn't (e.g. Java to C) will quickly reveal the truth: there are far fewer vulnerabilities in safer languages than in unsafer languages.

    Of course, mentality plays a role, too. With the industry having mainly focused on features and quantity, I am not surprised that software is so insecure, and I think businesses depending on this model are getting what they asked for.

    --
    Please correct me if I got my facts wrong.
  36. The author simply doesn't get it by javajedi · · Score: 5, Interesting

    "We need to be realistic in recognizing that we're stuck with a set of languages and environments that are not susceptible to a massive change."
    This is a huge cop-out. Buffer overflows simply can not happen in Java. The same goes for almost all of the security problems that are turned into exploits these days. Instead of applying patches to compilers and yelling at ignorant developers, how about just switching to a development language and runtime environment (e.g. Java and its Virtual Machine) that simply doesn't allow these kinds of mistakes to be made?

    1. Re:The author simply doesn't get it by groomed · · Score: 2, Insightful

      Arguably the two biggest problems today are spam and trojans. Both of these stem from what is essentially a security failure, namely the abuse of authority. In the case of spam, the spammer is erroneously granted the authority to send out millions of emails. In the case of trojans, a piece of code fools the user into granting it the authority to run.

      Neither of these problems is solved by using managed code environments.

      Yes, Java solves a number of annoying problems. But it does so at significant expense, and the problems it solves are exactly those problems that are trivial to fix when found. It does not, and can not, fix the much more prevalent and potentially much more disruptive problems that occur at the human level.

      Only unrelenting vigilance and diligence during development and deployment can ever hope to solve those problems.

  37. They have by bonch · · Score: 3, Informative

    Unfortunately, unless someone as big as Microsoft (ha!) or IBM gets behind the message, you're not going to see much come of it.

    They have--see C# and .NET. Longhorn will be entirely .NET-based.

    1. Re:They have by rgmoore · · Score: 3, Insightful
      They have--see C# and .NET. Longhorn will be entirely .NET-based.

      Which doesn't really address the underlying issue. Yes, managed languages like C# and .NET are essentially immune to some classes of exploits that cause problems in C and C++. That doesn't mean that they're completely secure, though; there are still plenty of classes of security holes that apply to managed languages. You can bet that bad programmers will find plenty of them.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    2. Re:They have by GCP · · Score: 3, Insightful

      Yes, it DOES address the underlying issue. Just because part of the problem remains doesn't mean that the problem hasn't been addressed at all.

      If you stop using C/C++ by default and use safer languages such as Java or C#, your code will become more secure. The fact that it still isn't 100% secure doesn't mean you've made no progress. And with fewer vulnerabilities, you can pay more attention to the types of vulnerabilities that remain.

      --
      "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
    3. Re:They have by johnnyb · · Score: 5, Informative

      Actually, you can continue to use C/C++ and just use a garbage collector with them. I don't know why more people don't do this. You don't even need to change your code, as Boehm's garbage collector translates malloc() to it's own allocation routine, and free() does nothing.

      In fact, even better, if you have Boehm GC installed anywhere on your system you can do this for already compiled programs using LD_PRELOAD.

      Just do:

      export LD_PRELOAD=/path/to/libgc.so
      /path/to/program

      and I'm automagically using a garbage-collected runtime for the program, even if it was compiled to use the standard malloc()/free() calls.

  38. Java Applets Fiasco by RAMMS+EIN · · Score: 2, Insightful

    ``I'm not sure that was why applets were not a big hit... I'd blame the slow JVM startup time for that one.''

    There is that, and there are the various incompatibilities. Microsoft's VM is not going to run your code, unless you specifically write it to work on it. For other code, you'll typically need a fairly recent VM, which means a hefty download if yours is not up to date. Many users are not willing to invest so much time just to see your sucky applet - and most of them are sucky, compared to real native applications.

    --
    Please correct me if I got my facts wrong.
  39. Where in the world is my ActiveX? by hummassa · · Score: 5, Funny

    Ummm gosh, the only ActiveX applets I ever saw was right after it was released. Heh, I often say Java is dead on the web (though I know it isn't completely) but now ActiveX is entirely dead except for like the applet on Windows Update :-P

    You are a Holy Person, sir/madam.

    Go find some pr0n and you'll see a lot of activeX thingies trying to install. Lucky me I use Moz.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  40. Or... by bonch · · Score: 2, Insightful

    Maybe he's not trying to "prove" anything but merely state his opinion that Java is annoying and that people hate it.

    Not everything has to be a thesis here, y'know. I don't get why people only ever demand proof for an opinion when it's an opinion that goes against the majority.

  41. Define secure. by bs_02_06_02 · · Score: 4, Interesting

    Define secure.

    I can guarantee that a developer and a customer will have two different definitions of secure. And, the cost will be more than the customer will want to pay.

    How many customers can write a scope of work, send it off to a developer, and get a proper quote for a project that includes adequate security? How many customers actually remember to ask for security? Or if they do, do they put enough priority on security?

    I bet the answer is very few. I know from past experience that most customers take the cheapest bid. The cheapest bid is usually the one that is skipping something, and the easiest thing to skip is security. If the customer didn't ask for it, is the developer responsible? Is Micro$haft reponsible? Nope. Security is not in their project. They want speed. So, there's always a niche for ActiveX. Microsoft knows they can undercut someone's cost because security isn't an issue.

    And everyone complains about Microsoft's future security ideas. Well, what do people really want? Security? Or no security?

    --
    -- No sig for you!
  42. The bad, good, great and expert by 192939495969798999 · · Score: 2, Insightful

    1. the bad programmer can't fix it, but says they can, tries anyways and makes it worse.

    2. the good programmer can't design it, but says they can, tries anyways and makes it ok.

    3. the great programmer invents something like the blinking cursor, which makes life better.

    3. the expert is on an island living off of the revenue generated by their two great ideas, one was to hire the good and the bad programmer for peanuts, since the economy sucks, and two was score clients using the great programmer's invention of the blinking cursor.

    --
    stuff |
  43. Brings up a good point... by gillbates · · Score: 3, Insightful

    Good security is more a matter of developer foresight than anything else. Almost all of the security flaws known to date hinge on two factors:

    1. The developer failed to foresee the manner in which his code could be used for malicious purposes.
    2. The developer failed to build a security implementation that was practical for his intended users.

    The first point applies to a lot of Microsoft software; the second, to a lot of software across the board. The fact that a sysadmin blames compromises on easily-guessed passwords is no solution at all - yes, the user is at fault, but the user wouldn't have chosen a bad password if the system of username/password wasn't broken in the first place. It seems that sysadmins and developers alike forget that ordinary people have to remember things far more important than the dozen or so username/password combinations that it takes to live in today's society...

    --
    The society for a thought-free internet welcomes you.
  44. Make it hard to fail by mcrbids · · Score: 4, Informative

    Bugs should not result in security issues.

    I repeat: Bugs should not result in security issues!

    A properly designed application will have multiple layers of error detection and security checking. As you write your software, abstract things like security checks and database access into an API, and then do insane amounts of input validation behind that API!

    In my home turf language, PHP, one of the biggest common problems in applications is the dreaded SQL-Insertion bug.

    The pat, standard answer is to validate-validate-validate!

    But, I'm human. I *WILL* make mistakes. It's only a question of when, not if.

    Ask yourself: How can I structure my application so that mistakes in this regard do not result in an immediate, full compromise?

    I bury database access behind an API that forces me to identify the data being passed to the database, and then trap errors from the database so it doesn't show anything to the web client.

    Example:

    <?
    $sql="INSERT INTO logindata (login, password) VALUES ('[login]', '[password]')";

    $todb=array('login'=>$login, 'password'=>$password);

    if (!$DB->SafeQuery($sql, $todb))
    Error($DB->Error());

    ?>

    What happened here? The SQL statement does not contain any data - instead I'm passing a template for the query, and the data array to parse into the query. The function SafeQuery() does a pattern match to get the names of the fields (in the square brackets) and then does the requisite addslashes(), as well as checking the number of fields to ensure that everything matches up, before actually dumping this statement over to the database.

    Errors get trapped within the object, and are accessed through function Error(). This prevents any sensitive information being sent to the browser, and the global Error() function simply displays an "Sorry but an error occured" webpage while logging the text of the error message, and quits.

    Now, none of this negates the need to do input validation - but this makes a very bad threat for PHP application all but disappear!

    As you develop your applications, structure them as much as possible such that bugs and errors do not result in security breaches.

    Use constraints and triggers in your databases to kick out data that can't be demonstrated as good. Use APIs and functions to interface with areas (such as the shell/CGI interface) so that common security mistakes (such as not escaping a shell argument) simply can't happen.

    Repeat after me: Bugs should not result in security issues!

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:Make it hard to fail by mcrbids · · Score: 2, Informative

      The problem with this approach is that the PHP programmer still has to ensure that "SafeQuery()" is correct. (I've seen some really braindead input checking from PHP guys)

      The point of this function is that no input validation is needed whatsoever to prevent an sql-injection error.

      I'm not trying to say that you don't need to do input validation - there are still plenty of logic errors and the like that are not prevented from using this tool.

      But given the severity of sql-injection vulnerabilities, wouldn't it be smart to stop them dead in their tracks?

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
  45. Well no Sh!* ! by mysterious_mark · · Score: 4, Insightful

    This is exactly what those of us in the trenches coding have been saying for many years. The current abysmal state of poor software performance seems directly correlated to the race to the bottom in 'cutting' develoment cost. The solution to producing secure reliable code is to hire experienced competent programmers who understand security issues, and have a vested and sincere interest in producing reliable secure code. This generally means a long term relationship and with and understanding of the clients's needs and business perspectives, as well as the technical competence and willingness to put forth the efffort required to produce quality code. This is necessarily the oppossite of the current trend towards going with the lowest bidder, outsourcing, H1-B's, and throwing large numbers of low skilled developers at a project rather than using a small group of highly skilled developers. Fortunatley for me however my current client regognizes this and only retains a couple of long term highly skilled developers, they do have a number of very nice, secure and relaible applications to show for this, absent the usual bloated development team. This however may be the exception in the industry. Hopefully the corporate types will eventually figure out that throwing large numbers of low skilled developers at a project will not produce relaible secure code. This issue been well documented obstensibly in works such as 'Mythical Man Month" and "The Pragmatic Programmer" however it seems most corporate manager types have yet to acquire this wisdom. Mark

    1. Re:Well no Sh!* ! by doinky · · Score: 4, Interesting
      The "lesson" most CEOs learn from an unsuccessful software project which failed due to one or more of the reasons you cite is:

      "software people are worthless".

      except he'd insert "shit" for "worthless". In this country (USA), the people responsible for the failures of these types of projects are never held accountable in a way that makes it possible to the next executive to learn from their mistakes.

      Some days working in this industry feels like the story of Sisyphus

  46. BINGO! by sterno · · Score: 3, Insightful

    The problem is that QA and development of good specifications prior to a project have a huge impact on the quality of the product that results. Having said that, QA and specifications are never seen directly by the outside world.

    Most programmers I know WANT to write good code but have the odds stacked against them. They aren't given the time and resources to do the job well. When it's crunch time, security and quality are the first things to go because they are less likely to get canned over a bug than over a completely missing feature.

    --
    This sig has been temporarily disconnected or is no longer in service
    1. Re:BINGO! by GCP · · Score: 4, Insightful

      That's where I think the author completely failed to make his case for changing programming languages not being a solution.

      People who program in C/C++ are vulnerable to all of the security risks Java and C# programmers are vulnerable to, plus quite a few more that Java and C# programmers are NOT vulnerable to.

      So, if you have a program that could reasonably be written in either Java or C++, and you choose C++, you've just increased the number of security vulnerabilities you'll have to check for. Given the same development deadlines, but with more areas to check, you're going to be handicapped from a security perspective if you choose C++.

      Then add to that the fact that almost everybody with equivalent experience is more productive at implementing a feature in Java or C# vs. in C++, with the same deadline pressures you have even less time available for security checking on top of more things to check if you work in C++.

      Of course there are some tasks for which C or C++ are the still best choice for other reasons, so I still use both frequently and applaud any attempt at adding better security scanning to the compiler.

      I can't help thinking, though, that even in those cases a language with the granularity of C but with built-in strings (UTF-8), arrays that are checked by default but with an override, with fixed built in data types (e.g., a 'byte' type that isn't signed in some places and unsigned in others), and yet without all of the massive baggage of C++, would go a long way to improving C's bug proneness without removing its power.

      Unfortunately, most developers value such things as security, globalization and, frankly, reliability so little, resist change so much, and are so arrogant about their l33t ski11z that would only be impeded by "guard rails", that a language that offered only these improvements on top of C would never put a dent in C's popularity.

      And to that extent only I agree with his thesis that bad programmers are the root of the problem.

      --
      "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
  47. "Sloppy" needs clarification by Junks+Jerzey · · Score: 4, Informative

    The first image conjured up by "sloppy" is someone using sprintf in production code (much buffer overrun potential), raw pointers unnecessarily, ad-hoc string manipulation code, and so on. But it's much deeper than that.

    Consider something as simple as BMP file format decoder. Writing a decoder is easy. It takes about 30 minutes tops to write one for a subset of the format. But writing a safe version is much more difficult. First, you have to validate all fields. Easy enough. Then you have to handle attempts to crash an application by passing in really huge values, like 10,000,000 pixels in each dimension. That's a bit trickier, because you have to figure out what you should allow and what you shouldn't. Then you have to deal with intentionally malformed images, where the RLE information doesn't add up to the total image size. Depending on how the code is written, this can cause you to chew through memory past the end of the image. To fix this, you have to put some checks into your inner decoding loop. The temptation to avoid doing this is strong, especially among "performance" oriented coders.

    So, yes, you can blame this on poorly written code. But had this been written in a checked language, like Lisp or Python or any similarly safe language, then some of the problems go away immediately. Not all of them but some.

    1. Re:"Sloppy" needs clarification by TheSunborn · · Score: 2, Informative

      Here is a better solution. Write the decoder in c++ using Vector insted of arrays, and use at(pos) insted of []. That way the worst thing that can happend is an exception which is not a security risk.

      (This solution still have the problem that there might be input which causes it to block forever, thus allowing a dos attack, so if you really want security you need to validate the header anyway).

      Martin

  48. Re:ActiveX? by TheRaven64 · · Score: 2, Interesting

    I wonder if you've heard of a site called Slashdot? They have a facility for contacting members by ICQ. It uses ActiveX.

    --
    I am TheRaven on Soylent News
  49. I will almost completely agree with you. by khasim · · Score: 3, Insightful

    It isn't the coders.

    I believe it is management's fault for insisting on designs that are unsecure (like ActiveX).

    You can have coders who KNOW the correct way.

    You can give them tools that help them secure their code.

    But those only work if management focuses on secure code instead of "user friendly" features.

    And management will only focus on security when the buyers focus on security.

    I think we're seeing that now. More people are accepting that Linux is more secure than Windows, so Microsoft has to start focusing on security in an attempt to narrow that perception.

  50. Re:Where do you live? by ThosLives · · Score: 2, Insightful
    Sounds to me like the supply and demand thing is broken; if people don't like paying $0.7 M for houses then they shouldn't make offers for that much...

    Sure, part of it is spatial inflation, but much of it is people not willing to stand pat and say, "woah now, that's just too much for product X". I know it's difficult when it's something like a house, but you can always choose to live in an area with a much lower cost of living. There are places other than Silicon Valley (increasingly in the Midwest and Southeast) with good "IT jobs" where you can make "a pittance" and live like a monarch - you'd be surprised how much house $120k will buy you in the Southeast!

    Rather than whining that 6 digits isn't enough due to cost of living, be the smart shopper and say, "I'm gonna stop supporting this crap and move." If, however, the cost of moving (including non-monetary things like family strife or whatever) is more than what you save by moving, then you have no right to complain, because you're complaining about your own choices.

    It's not like anyone's forcing you to stay in a place where your income to expenses ratio, regardless of what the actual numerical value happens to be, is not what you want. And if they *are* forcing you, well, that's another issue entirely...

    --
    "There are a dozen opinions on a matter until you know the truth. Then there is only one." - CS Lewis (paraprhase)
  51. Too much to do by Sun+Nori · · Score: 2, Informative

    I'm a VB 6, ASP, and VB .NET developer and to put it from my viewpoint. I really don't think has anything to do with the language, compiler, or development environment; but more to do with everything else.

    On an average day I deal with patching of our IIS web servers, Administrate 2 MS-SQL servers. In addition to the ENTIRE software development life cycle: from Analysis to maintenance. All the while dealing with 4 to 5 major projects.

    If I release bad code it's because someone didn't give me ample time to verify/think about what I'm writing. The people who tend to cause these errors also tend to cause this other problems:

    • No comments
    • Poor structure
    • Do not declare variables

    So, do I believe that different languages are inherently better for security? No, but I do believe that some programmers are inherently better for security.

    --
    "640 K ought to be enough for anybody." -- Bill Gates, 1981
  52. I only read the first page... by zogger · · Score: 5, Insightful

    ..and there he said it was (paraphrasing here) common for programmers to sorta ignore error flags and just code out the warnings about memory leaks and arcane whatnot like that, like that made the problem "fixed". No warnings-no problems! On to the next project.....

    probably more stuff too, that's all I read though.....

    Not a coder here, so I have *no* idea if this is common or not, or true or not, but I *have* noticed on slashdot NO ONE writes bad code,or has written bad code, or thought about bad code, and *everyone* has personally corrected every other coder they ever met on their code, and no one has ever had a boss who knew what he was doing or could read so much as a grocery list without speaking the big words out loud, and only the *other guys* someplace else write bad code, and they always use the wrong language and editor to boot, like on bizarro dotslash forum or something. It's ALL "their" fault that there's ANY of this alleged "bad code" that causes buffer overflows and like acne and flat tires and girls who say no.. Them dang guys "over there", buncha no-good slackers....let's hang 'em!

    1. Re:I only read the first page... by clamatius · · Score: 4, Funny

      Ok, it's time for me to own up. I'm the one creating all the bugs you're talking about.

      Acne? Bug in face.cpp.
      Flat tires? You guessed it, tire.cpp, line 5572.
      Girls who say no? That's not a bug, it's a feature.

    2. Re:I only read the first page... by I8TheWorm · · Score: 4, Interesting

      Being a coder, I'll own up to having written bad code in the past. I even tried justifying it at times with "but I had a deadline" or "I tried to plead my case but management wouldn't listen" or other drabble.

      These days, I simply won't take work from people who demand I write code their way, or impose unreasonable deadlines. Even in the programming decline since 2001 (it's bounced back well this year) I refuse to compromise my work because of someone elses ideas/deadlines/etc... because the end result is a reflection on me.

      I like to think most programmers, early on at least, went through the same thing, but I could be wrong. It had nothing at all to do with having to build experience before I knew anything about the necessity of writing apps with security in mind. Rather, it had to do with needing work and compromising my own principles to gain employment.

      --
      Saying Android is a family of phones is akin to saying Linux is a family of PCs.
    3. Re:I only read the first page... by zogger · · Score: 2, Insightful

      me too, been in bad unions. UAW for one. You get a non working boss class that becomes hereditary,. corruption becomes just as bad as in management and in government. Not paying attention to reality and only fiocusing on pay raises. I remember back in the late 60's I would be saying 'waitaminnit guys, the japanese are gonna come in here and grab our work, look at the cars they are starting to build, fuel efficient, work well, inexpensive" I got laughed at. I wanted to have it that we always negotiated from a standpoint that we NEEDED the company to make quality products at reasonable prices over ANYTHING else. actually dictate some things to management. As in "pay your engineers more than a first year carlot salesman", and make sure they produced, etc.

      Any new union can NOT become aligned with any political party and it CAN'T have full time union only employees besides some accountants, etc to handle the drone paperwork. Every union officer has to be a production worker all the time. Along those lines. A couple of terms in office then they have to step down, term limits are a GOOD thing. It has to be established open, free, transparent, honest, non aligned, etc, upfront, or it won't work it'll just be yet another bogus attempt.

  53. There are benefits by Smeagel · · Score: 2, Insightful

    First of all, it's hard to argue that any other area in the country has more tech involvement than the bay area. Next it's hard to match the niceties of the location. Winter low of barely below 60 degrees is nice. Then you add in culture, and on top of that all within 30 points of a central point you have San Francisco, Berkeley, Oakland, and development employment area's (like pleasanton, etc).

    I'm not complaining about the costs, but I am saying that yes, you MUST make more here to make up for the more expensive living costs. Anybody who thinks that making 6 digits anywhere in the country guarantees an easy mortgage payment is a fool (as the AC displayed in his response about California being "shitty"). And it's not just California, check out Boston or NYC. There are tons of places in this country where the luxury and lifestyles of the location drive up costs.

    And by the way, supply and demand aren't broken, supply and demand are what is MAKING these houses cost so much. So many wealthy people want to live here it drives up the cost. Supply and demand is broken in places that have rent ceilings (which cause housing shortages).

    Everyone who lives in the midwest should be thankful of the expensive california area's. The fact that everyone here makes more, means that everyone here pays a greater ratio of federal taxes. Without California federal taxes in the entire nation would have to be significantly higher.

    And lastly before you assume that I'm an uneducated California dolt, I grew up 18 years in Ohio, have spent 3 years in Indiana going to school, and will return to Indiana from my summer internship this fall. I understand perfectly the economics of both California and the midwest. I'll take California's in a second. But on the same note, when somebody says that 6 digits is enough to pay any mortgage easily, it just shows their ignorance to our nation IMO.

  54. The problem with secure code: by earthforce_1 · · Score: 2, Insightful

    #1: Difficulty: It is harder to write, although having an inherently secure language such as Java or Ada helps. You not only have to think about your algorithm performing correctly, you have have a "hacker's eye" to make sure it cannot be used to compromise the O/S.

    #2: Performance: (This is a biggie) Checking parameters and disallowing certain programming techniques that could be misused to compromise the underlying system will have a performance impact. It also makes for fatter code, if you ever tried to decompile Ada. The performance loss may or may not be significant, depending on the algorithm. But for something like direct X that provides a thin software layer for high performance graphics, I suspect the performance hit would be unacceptable. This is probably true for other high performance apps as well. That is why 99.99% of all software comes with a "caveat emptor" EULA. (Imagine if they built airplanes, cars, and buildings like that?)

    Safety and life critical application will of course always be coded using "tinfoil hat" secure languages and operating systems. They also cost 100x as much to do the same job, and require more powerful hardware to do the job.

    #3: Complexity: The more complex a given system is, the harder it is to secure it. The more complex the system, the more places for flaws to hide.

    --
    My rights don't need management.
  55. From the "At least we know the bugs in C dept" by jrl · · Score: 2, Informative

    Here is my general view of the "secure programming" world. It goes out to all developers.

    Know your tools. Choose them wisely -
    Low level languages are not the problem; they are the most widely understood. Security is a process not a language. When your code inherits features and functionality that you did not intend, bad things can happen. Sure, we may not have buffer overflows, but if your RPC function allows me to execute any code that I want without overflowing buffers, who cares? Also, with these super portable "sand box" languages, I get to find one hole and exploit it everywhere. If you think Java is the answer, please tell me what language you think Java was written in? Also, please read "Reflections on Trusting Trust" by Ken Thompson.

    Seeing the big picture -
    Peer review is part of the security process; your attackers are becoming very skilled at finding exploitable software bugs using automated tools to help them. Everyone in the development process needs to know the type of application they are developing and the sensitivity levels of the information they are protecting.

    Rule of Simplicity -
    Design for simplicity; add complexity only where you must. Default to Deny, compartmentalization of code is good for more than just limiting security bugs.

    Sweat the small stuff -
    Just because certain attack vectors are obscure does not negate their effectiveness; writing good clean code is safer and more sane than allowing a program to "protect" bad coding practices at execution time. We have seen many examples of how this other type of protection fails.

    Don't use your customers as your Q/A staff -
    The Microsoft Software Release cycle is destroying security from the users and programmers perspective; it causes users to not want to upgrade, and it causes programmers to not want to fix security problems.

    Don't build a $100,000 fence for a $1,000 horse -
    All data is not created equal, don't treat it as such. Let the protection be commensurate with the asset.

    Audit trails -
    Trust with accountability. Every significant access, whether denied or permitted must maintain an audit trail.

  56. Author is fabulously uninformed by dr2chase · · Score: 3, Interesting
    As others have noted, there is Java. And (at minimum) Python. His I-wonder-if supposition about a malloc that is backed up by GC is old news; the Boehm-Demers-Weiser collector was used exactly like that 15 years ago (for example, in the first Modula-3 runtime system, and a friend at HP linked it into an X server). Ben Zorn used it in much the same way to take (now dated) measurements of the time and space costs of garbage collection (executive summary -- the cost is mostly a space cost).

    I worked, at CenterLine, on a follow-on for CodeCenter that used compiled-in checks to get similar checking at a higher speed than the intepreter. It was a wonderful accomplishment, but it was still vastly slower than a good Java or Modula-3 implementation. Use a safe language, end of stupid security bugs, and you can spend more time worrying about the subtle ones.

    One more thing to note, if you take the draconian view that warnings are for wimps: I found one real program, in all that I tried as tests, that did not generate a single warning during its execution, and that was gzip. One of the emacses was our error-filtering test case; running to the "dump" step, it generated over one million diagnostics, which we managed to automatically filter down to one thousand.

    I really have to wonder about the author's background. He claims to care about this, yet has apparently never used Java outside of a browser, nor played with the BDW-GC for as a leak backstop. I sure do wish the ACM editors were a little more clueful.

  57. Getting the wrongness wrong by tz · · Score: 3, Insightful

    Starting with the last - He praises M$ development environments. OK, what was the last major Bug that even made the Drudge Report. An IIS and IE combo - why are IIS sites defaced more since it is the minority and even CERT is saying to switch browsers (how do I load Firefox or Apache into Visual.net?).

    He complains about C malloc/free (ever heard of electric fence?). C++ (wasn't OOP the magic bullet?) gave us new and delete and some garbage collection and more memory leaks (but he says we shouldn't use Java which actually gets the conceptual model right). Oh, and every makefile I have has -Wall, and running them produces no warnings (at least when I'm through changing things algorithmically). And I'll have to look again for a good opensource lint. I used commercial products for a while.

    Since I'm often doing embedded, I have to be careful and have space and timing requirements (and in many cases NO debug facilities) few others have to deal with.

    The article is probably worth reading, but won't be very helpful. A lot of people don't understand the art of programming even if they make their living that way. The people doing the hiring either want the buzzword checklist, or don't care if the result is brittle (at least not when the project starts).

    His solution is more "magic bullets". Everyone I know (even many I would not let write a simple sort routine) was horrified by ActiveX (v.s. Java). How do you make that secure? You can't.

    A security shell inserter like pixie? Maybe it would be a source of exploits (basically it is a manual virus - if you can alter an EXE to add a security shell...). And an IDE can be a great tool (Emacs works for me) but also can make one lazy - I assume IE and IIS with all their holes are developed on the same praised IDEs.

    There is an art to programming and it often takes 5 years and is a way of thinking, not a "method". I do Java and C++, but I don't do them differently than I do C. But much education (and investment) seems to be toward finding a product or method to replace process.

    As often has been said: Security is a process not a product.

    My own saying: I don't write complex programs, I simplify and reduce complex tasks into simple programs.

    Good Cheap Quick, pick 2.

    1. Re:Getting the wrongness wrong by jschrod · · Score: 2, Informative
      Marcus Ranum's advice is never to believe for a magic bullet. He's too long in the business, longer than you by a probability of \approx 1.

      You don't seem to recognize the name of the person who wrote the world's first firewall (fwtk) and who is one of the most outspoken security gurus, do you?

      One might not agree with his opinion (I do not in many points), but to reduce his arguments (that most development tools give no support for security properties of software systems, but should) to some rambling about "M$" just shows your unprofessionality.

      --

      Joachim

      People don't write Manifestos any more -- what's going on in this world? [Frank Zappa]

  58. A correction to the article ... use "Cyclone" by pikine · · Score: 3, Informative

    On the topic where memory management related security issue is blamed on reluctance to switch away from C...

    Of course, most of our programming is still being done in C/C++--languages that force programmers to manually mate up a free() with each malloc(). I'm amazed that someone hasn't come up with the idea yet of making malloc() and free() stub-calls into a generic garbage-collected memory allocator and doing away with C memory management altogether.

    This is not true. Cyclone does exactly that, and more. Cyclone is a dialect of C. In fact, a lot of C code can be ported to Cyclone with little to no modification. It has garbage collection for stub malloc/free code, and optionally region memory management where you can dictate when some collection of objects are deallocated all at once.

    --
    I once had a signature.
  59. Re:Hardware vs. Software. by Fulcrum+of+Evil · · Score: 2, Insightful

    o? Take your USB port that shines from the front of the PC. Nice and inviting, provides a few W of power and a pair of data lines... now jam your finger in it. Can't do it, can you? What happens if you short out the power lines? There's a fuse on the motherboard. What happens if a device isn't wired up correctly? The OS doesn't even get a chance to see it.

    Now treat it like software: hang a space heater off of it and complain that it doesn't work. Allocate 3 weeks for design and implementation. Testing is for the weak. Add a SOAP interface (don't change the deadline). Oh, did we mention that motherboard X doesn't want to use our pinout? Make it work somehow.

    --
    "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  60. 1 point... by gillbates · · Score: 2, Informative
    checks into your inner decoding loop. The temptation to avoid doing this is strong, especially among "performance" oriented coders.

    A good "performance oriented" coder would know better than to choose an algorithm whose safety depended on doing a test in an inner loop. He's probably used a series of bitmasks, AND's, and shifts to ensure that even if the values were out of range that they didn't cause problems.

    As an assembly programmer, I've learned two very helpful techniques to avoid overwriting memory:

    1. There is never good justification for checking array indexes. It's simply idiocy - array indexes can be safeguarded by simply taking the modulus of the index and the array size. By doing this, it is mathematically impossible to generate an out-of-bounds index. Why bother checking for something that can be handled automatically by the processor?
    2. An even quicker method involves bitshifting or using the AND and negation operators. For example, if you know that you'll never render more than 1 Meg of memory, you can shift your index (32 bit) left 12 and right 12 and never ever write beyond the 1 MB boundary.

    Performance programming is not simply leaving out vital checks. Rather, it is designing algorithms in such a manner that the checks are unnecessary, or performed at a level where they are easily handled. Even a good C++ programmer wouldn't think of starting to render a BMP before having validated all of his fields.

    --
    The society for a thought-free internet welcomes you.
  61. Re:Java Smava by kaffiene · · Score: 2, Informative

    Here's one:

    http://www.tribaltrouble.com/

    Here's another:

    http://www.wurmonline.com/

    Troll elsewhere.

  62. Where do we go? HA by SnprBoB86 · · Score: 2, Interesting

    We have already GONE there. Java, .NET, fancy smancy libraries for C and C++ all exist and are all far far safer than the old stuff lieing around. Microsoft has taken notice of the security trends are and introducing many backwards compatability breaking changes into XP SP2. When Microsoft *knowingly* breaks backwards compatability, you know they mean business (see this article, even tho I agree with the "MSDN Camp": http://www.joelonsoftware.com/articles/APIWar.html ). Even tho everyone on /. hates them, you can't deny that when Microsoft starts a "bet the company" style trend, that the rest of the tech world doesn't play along.

    --
    http://brandonbloom.name
  63. Not quite a space heater... by Demon-Xanth · · Score: 2, Insightful

    How's a coffee cup warmer?
    http://www.sunbeamtech.com/new/products/a ccessory/ accessory%20series-USB%20Coffer%20Warmer.htm

    Motherboard didn't always have a standard USB pinout. (if they do now). Think hardware plans don't go through the same time restraints? If you do, lay off the crack. Consider that EVERY YEAR new videocard chipsets come out, and half way through usually get a revamp. Think you can design and test an all new design in a single year? Get that nice fat 14 layer board right the first time? Hardware has the advantage of they make STANDARDS for interfaces (Hear that MS? An agreed upon industry standard!). And transfer to production isn't just making disks, you have to setup numerous processes and accumulate the materials used. That stuff doesn't come at a short time frame.

    Hardware can do it, why can't software?

    --
    If you think education is expensive, you should try ignorance -- Derek Bok, president of Harvard
  64. NASA's Code Expectations by TastyWords · · Score: 3, Interesting

    This'll end up on the fourth screen of threads, but it's worth reading for those who find it. It's over seven years old, but essentially everything in it holds true today. (worth reading on various lists I don't have it bookmarked - I knew where it was.

    "They Write The Right Stuff". I'm not even going to provide a summary of everything which is listed in the article. There are a lot of good lessons in well organized, well thought out explanations as to why the software doesn't shut down but how few errors are found.
    There is a difference between a shuttle crew and standard users. 1) A shuttle crew is a smaller user body. 2) They're more likely to follow instructions ala "what happens if I hit this button?"

    I've never sent a note to the author, but I think it would be a book as important as Writing Solid Code (is that the right one? (I've been up a little too long without a syringe.)