Slashdot Mirror


The Security of Popular Programming Languages

An anonymous reader writes "Deciding which programming language to use is often based on considerations such as what the development team is most familiar with, what will generate code the fastest, or simply what will get the job done. How secure the language might be is simply an afterthought, which is usually too late. A new WhiteHat Security report approaches application security not from the standpoint of what risks exist on sites and applications once they have been pushed into production, but rather by examining how the languages themselves perform in the field. In doing so, we hope to elevate security considerations and deepen those conversations earlier in the decision process, which will ultimately lead to more secure websites and applications."

189 comments

  1. Wonder how Ada 2012 would fare... by mlts · · Score: 4, Interesting

    I wonder how Ada 2012 would do in this test, although I don't know of any websites that use this language for a backend.

    1. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      It would fare pretty well imo. But it's not really general purpose in this context is it ?

    2. Re:Wonder how Ada 2012 would fare... by TechyImmigrant · · Score: 1

      Why not?

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    3. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      No, but using Ada or another Wirth style language would be a good idea to write some of the critical security libraries in.

      Of course, we would have to make sure they are written in such a way to make them callable from C or other languages without too much hassle.

    4. Re:Wonder how Ada 2012 would fare... by jythie · · Score: 1

      I would wager that even if some sites do have it as a back end, they are too rare for this type of experiment or the back ends are not sufficiently exposed for it to matter. That being said, yeah, if I had to start from scratch in all regards and write a secure service as the primary priority, Ada would probably make make it to my short list of languages.

    5. Re:Wonder how Ada 2012 would fare... by DanielOom · · Score: 1

      Poorly, but not as badly as C, but as it turned out, COBOL was the most secure programming language after all.

    6. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      Well, for one thing, Ada compilers do not run on the same range of platforms C compilers do (I'm sorry to say).

    7. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 1, Funny

      That's because even legitimate programmers can't get COBOL to do anything.

    8. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      Wrong, gnat uses gcc as a backend and supports pretty much everything gcc does -- and this month Ada for android was released (although you have to pay for that one).

    9. Re:Wonder how Ada 2012 would fare... by luis_a_espinal · · Score: 1

      Well, for one thing, Ada compilers do not run on the same range of platforms C compilers do (I'm sorry to say).

      Uh, you are conflating "general purpose" with "platform availability". C runs in far more platforms than, say, Java, but, from professional experience as a C/C++ and Java programmer, I would not call C more of a general purpose language in the same way I would do so with Java.

    10. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      No, you are wrong. Look at the number of supported code generation targets for GNAT compared to C (and make sure you include all the embedded, bare metal and cross compiled targets Ada code will not currently run on).

    11. Re:Wonder how Ada 2012 would fare... by luis_a_espinal · · Score: 1

      No, but using Ada or another Wirth style language would be a good idea to write some of the critical security libraries in.

      Of course, we would have to make sure they are written in such a way to make them callable from C or other languages without too much hassle.

      Most modern Wirth-style languages posses syntax-level compiler directives to specify the calling convention. Heck, most modern languages either have such a capability, or an intermediary wrapper or stub generator to do that type of bridging. </itisasolvedproblem>

    12. Re:Wonder how Ada 2012 would fare... by gbjbaanb · · Score: 1

      rubbish. I can get it to do merging of sorted payroll data and, erm.. and.. and... yeah ok.

    13. Re:Wonder how Ada 2012 would fare... by luis_a_espinal · · Score: 1

      Well, for one thing, Ada compilers do not run on the same range of platforms C compilers do (I'm sorry to say).

      Uh, you are conflating "general purpose" with "platform availability". C runs in far more platforms than, say, Java, but, from professional experience as a C/C++ and Java programmer, I would not call C more of a general purpose language in the same way I would do so with Java.

      Replying to myself since we have no way to edit our previous posts - I would add that languages of the BASIC and XBase families (in particular VB and FoxPro) are/were more general purpose than either C/C++ or Java despite running in more restricted sets of hardware platforms.

    14. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 1

      Isn't the context of the article about running software on servers, not bare metal or embedded applications?

    15. Re:Wonder how Ada 2012 would fare... by HiThere · · Score: 1

      Perhaps you need to define what you mean by "more general purpose". I tend to consider C the most general purpose of languages, because it *isn't* specialized to some task. It's true that , e.g., FoxPro was better at interfacing to the FoxPro database, but that's NOT being general purpose, that's being special purpose.

      OTOH (to get back on thread) I don't consider C a very secure language BECAUSE it is lacking in specializations. This means you need to keep creating, e.g., hash tables from scratch, and every time you do it you are likely to introduce an error.

      Ada is in an in-between state. It's very secure against some types of errors. The facility for defining specific types is a particular instance. If one defines a meters type, then one cannot store an inches type into it...unless one uses a numeric literal, because one needs to allow instances to be created from numeric litrals. OTOH, this very security introduces verbosity, and verbosity is a common entry point for errors. (I used the meters/inches example because of the nortorious example of the space probe where that was misused. Ada did NOT save the day. And the reason that it didn't was because doing things properly would have been too verbose.)

      In principle, every "Turing complete" language is as general purpose as every other. Practical considerations are the distinction between them. If you're doing database programming, then you are less likely to make mistakes if you use a language that contains extensions specialized to make database use easier. (I barely count embedded SQL, because while SQL is reasonably great for manipulaitng databases, it's lousy at interfacing to programming languages. Everything either needs to be converted into a string, or a blob, and blobs are clumsy to handle.) But note that these "databse extensions" are specializations away from "general purpose".

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    16. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      The same libraries which run on those servers may very well be the same libraries which need to run in those embedded environments.

      And don't forget Heartbleed was about a library used in a large range of environments, not some restricted usage application.

      You need to able to code that library in a language which will run in that range of environments. I wish that language was Ada or something similar but it's unfortunately not viable to write OpenSSL in Ada because of the wide range of environments that library needs to run in.

    17. Re:Wonder how Ada 2012 would fare... by HiThere · · Score: 2

      It's hardly a solved problem. There are approaches that can be made to work, but that's not the same thing. The current approaches are all clumsy, and often that's a charitable description. It's usually doable. Saying anything beyond that is fulsom praise.

      OTOH, because different languages have different basic derived structures, it's often not clear exactly what the best approach would be, even when one is considering things carefully. For one purpose the best I've been able to come up with is marshalling everything into a byte array, and then separating it back out. Doable, but hardly what I'd call "a solved problem". Probably an insoluble problem because the different languages map the same concept differently internally. So you need to deal with it on a special case by special case basis.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    18. Re:Wonder how Ada 2012 would fare... by Hognoxious · · Score: 1

      For one purpose the best I've been able to come up with is marshalling everything into a byte array, and then separating it back out.

      Have you thought about XML?

      (If you're not sure whether I'm joking that makes two of us)

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    19. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      Now you are weasel-wording. "General purpose" has a specific meaning when it comes to computer languages, and it is completely distinct from "Turing complete."

    20. Re:Wonder how Ada 2012 would fare... by noh8rz10 · · Score: 1

      bahaha your back end is insufficiently exposed.

    21. Re:Wonder how Ada 2012 would fare... by gawdonblue · · Score: 2

      the best I've been able to come up with is marshalling everything into a byte array, and then separating it back out. Doable, but hardly what I'd call "a solved problem"

      COBOL: solving problems since 1959!

    22. Re:Wonder how Ada 2012 would fare... by aybiss · · Score: 2

      That's right, I need to run my webserver from my microwave.

      --
      It's OK Bender, there's no such thing as 2.
    23. Re:Wonder how Ada 2012 would fare... by Renegade88 · · Score: 1

      Actually, you do not have to pay for for an Ada android cross-compiler and one has been available for 3 years already. Here is the latest gcc 4.9-based free (in every sense) android/arm cross compiler with FreeBSD as host (DragonFly BSD is also an option)

      http://www.freshports.org/lang...

      And here are the testsuite results: http://www.dragonlace.net/gnat...

      The only test it fails are the stack-check tests, and that is because gcc doesn't support it yet (a patch was produced but it's not be accepted yet).

    24. Re:Wonder how Ada 2012 would fare... by Renegade88 · · Score: 1

      GNAT stacks up very well against the C targets, especially with embedded, bare metal, and cross-compilers. What types of environment do you think Ada is used in? (hint, those)

    25. Re:Wonder how Ada 2012 would fare... by Renegade88 · · Score: 1

      It is possible to create powerful sites generated in Ada. One popular option is the Ada Web Server ( http://www.adacore.com/aws ) ( http://www.freshports.org/www/... ), plus it's possible to create cgi and fast-cgi applications using various libraries.

    26. Re:Wonder how Ada 2012 would fare... by Renegade88 · · Score: 1

      Can you name two environments that openSSL runs on where Ada is not an option? Or even one? I am genuinely curious.

    27. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      Yes. OS/400 and eCos were the first couple of examples which came to mind. There's also the environments where GNAT only exists as a third party port such as QNX.

    28. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      I stand corrected about eCos - I see it's had GNAT support added. However the unknown quality of the various third party ports is still a issue.

      To answer your question in another posting about the general availability of Ada, what about bare metal support for 8 bit devices other than the AVR or the lack of anything usable for the bare metal PIC32 ?

    29. Re:Wonder how Ada 2012 would fare... by Renegade88 · · Score: 1

      You've stumped me on AS/400 -- I'm having a hard time find viable Ada options for even modern IBM mainframes. (iSeries)

      To be fair, the context was openssl. Is that going to be realistically run on 8-bit bare metal?

      It's generally not too hard get GNAT running on any platform that gcc runs on, but 8-bit would be pretty challenging I think.

    30. Re:Wonder how Ada 2012 would fare... by Anonymous Coward · · Score: 0

      Cobol: creating problems since 1959!

      Fixed that for you.

  2. On the Other Hand by Anonymous Coward · · Score: 1

    Who exactly is going to volunteer to implement a major system in a combination of Perl and ColdFusion?

    Captcha: jokers

    1. Re:On the Other Hand by preaction · · Score: 2

      I VOLUNTEER AS TRIBUTE ... but not for ColdFusion, ew.

    2. Re:On the Other Hand by Anonymous Coward · · Score: 0

      May the odds be ever in your favor!

  3. python?! by Anonymous Coward · · Score: 1

    where the hell is it on the list?!

    -db

    1. Re:python?! by NotDrWho · · Score: 5, Funny

      It's the hip and cool language. If you owned vinyl records and were a vegan, like me, you would know that. But then again, I don't even *OWN* a TV and I was into that band way before they became all commercial. So I can't expect the rest of you to understand.

      --
      SJW's don't eliminate discrimination. They just expropriate it for themselves.
    2. Re:python?! by Anonymous Coward · · Score: 0

      This is totally not fair. I'm fine if some asshat wants to tell me python sucks, but I have been using it for fifteen years now, and there's just no way it could possibly still be hip and cool.

      Continuously hip forever is an impossibility! (Isn't it?)

    3. Re:python?! by TeknoHog · · Score: 1

      Oh yeah? Well I was ranting about global warming before it was cool.

      --
      Escher was the first MC and Giger invented the HR department.
    4. Re:python?! by noh8rz10 · · Score: 1

      what about html? that fad will never die.

    5. Re:python?! by jrumney · · Score: 1

      Meh. I was into Python before it became hip and cool the first time, you know, back when it was still hip and cool before ruby displaced it as the hipster language.

    6. Re:python?! by nicholas.allevato · · Score: 1

      The lack of python has me stumped.

    7. Re:python?! by Anonymous Coward · · Score: 0

      Oh really? I remember when C++ was the hip new thing. That's right - I remember when C++ was:

      Hip!

      Cool!

      Styli'n!

      Funky fresh! ...I'm getting old.

    8. Re:python?! by IwantToKeepAnon · · Score: 1
      --
      "Happy families are all alike; every unhappy family is unhappy in its own way." -- Anna Karenina by Leo Tolstoy
    9. Re:python?! by ilsaloving · · Score: 1

      At least you weren't ranting about global cooling before it was warm!

  4. Subtle attack against C/C++ by Anonymous Coward · · Score: 0

    Here we go again with another subtle attack of C/C++ in wake of the recent HeartBleed.

    Let's just keep pushing the idea now despite every other language for the most part being implemented in C/C++.....

    C++11 is awesome and has brought it back to modern day relevancy. I'm pushing C++11 all over my projects and teams.

    1. Re:Subtle attack against C/C++ by jythie · · Score: 1

      Neither is on the list, so I am not sure this is much of an attack.

    2. Re:Subtle attack against C/C++ by jythie · · Score: 3, Insightful

      I do not think C++ would have helped here, all it would have done was made things a bit more obscured. It should also be noted that you can build custom allocators in C++ too (I worked on a couple projects that used them) so that part of the problem would be there too.

      C++ makes a lot of things easier, but under the hood it is still essentially C with an expanded library and fancy pre-processor (I know modern compliers do not actually preprocess C++ into C and then compile), thu all the same problems are still there and mostly are mitigated by using libraries that wrap things up in a safer way.

    3. Re:Subtle attack against C/C++ by NotDrWho · · Score: 5, Funny

      Hey, some of us find manual memory management sexually fulfilling, you insensitive clod!

      --
      SJW's don't eliminate discrimination. They just expropriate it for themselves.
    4. Re:Subtle attack against C/C++ by Anonymous Coward · · Score: 0

      hence subtle....

    5. Re:Subtle attack against C/C++ by Zero__Kelvin · · Score: 2

      "Luckily for us, the people responsible for maintaining the Linux Kernel understand the difference between C and C++ "

      Yes, it is indeed lucky for us that the competent OS developers know their stuff, and they don't listen to people like yourself who have no idea why C is better for the Linux kernel (or any kernel, really). I hate to break it to you, but you aren't smarter than the top Linux developers. You simply aren't. Stop confusing yourself into thinking you know more than they do. It is pathetic to watch.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    6. Re:Subtle attack against C/C++ by InvalidError · · Score: 2

      At the end of the day, all programming languages are about abstracting things. If you are testing the intrinsic security of a programming language, you are in essence testing how successful the language's built-in data types, built-in functions, APIs, standard libraries, etc. are at mitigating risk factors, which is all about abstraction.

      A language's intrinsic security is only as good as its abstractions.

    7. Re:Subtle attack against C/C++ by Anonymous Coward · · Score: 0

      That would make sense since this article would make your heartbleed...it is very c sharp...

    8. Re:Subtle attack against C/C++ by Anonymous Coward · · Score: 0

      Mmmm, manual memory management. Is it hot in here or is it just me?
      Pointer arithmetic, offsets, alignment...
      Grrrrr

    9. Re:Subtle attack against C/C++ by oldhack · · Score: 1

      Hey, enough jokes from you today. You're way over the quota. What, are you getting a big fat refund?

      --
      Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
    10. Re:Subtle attack against C/C++ by Qzukk · · Score: 1

      std::containers don't need to store their size as a separate variable

      C strings don't either. It's the protocol that said "hey, rather than null terminating strings, let's put a length byte like Turbo Pascal never went out of style!"

      The fun thing is that that design decision has lead to an entire CLASS of SSL bugs (in all stacks, not just openSSL) eg invalid certs validating because of a null byte in the Common Name. And heartbleed was just one more in that heap.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    11. Re:Subtle attack against C/C++ by HiThere · · Score: 1, Insightful

      C++ (and do a lesser extent C) lose support because of their extremely poor support for utf8. And the absurd part of it is that they could easily do a good job. Utf8 is just a byte array with various routines to interpret the code. Glibc does a reasonable job for a C library...not ideal, but reasonable.

      All the array needs is a way to address a chunk by character # rather than by byte #, a way to copy of a character or a slice of chars, and a way to determine the general character classification of any character. Also a few methods: first(), last(), hasnext(), hasprior(), next() and prior(). And these all "sort of" exist, except getting the general character classification. (Do note that these functions need to operate on utf-8 characters rather than on bytes.) But several different ways of doing this are already known. Vala, e.g., handles it without difficulty, and is able to emit C code (using Glibc libraries).

      So it's not a programming difficulty that's holding things up. It's the standards bodies...or, perhaps, some members of them.

      But I've looked at C++11, and it is not a satisfactory answer. Vala has a good answer. D (Digital Mars D) has a different good answer. Even Python3 has a pretty good answer. (I don't like that in Python you can't determine memory allocation within the string.) Also Racket, etc. But C++ doesn't.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    12. Re:Subtle attack against C/C++ by bzipitidoo · · Score: 1

      From the start, the design of C emphasized speed and efficiency over all else. "Trust the programmer" was one of the mottoes. If the programmers are doing something weird, assume they know what they're doing, and maybe print a warning, but allow it. C was, by design, weakly typed, and minimalist, especially when it comes to checking for errors because such checks take time.

      Often, we've seen efforts to improve C's safety that were eventually sidelined because they were a performance hit. The iostream library is safer, but much slower than stdio. Which one do people prefer? stdio! C libraries are full of routines that do not do bounds checking, for the sake of performance and simplicity. gets() is an infamous one. The language itself is so easy to to use insecurely. Pointers can be set to point absolutely anywhere, and those places both read and written at will. If the OS, with help from modern CPU memory management facilities, didn't set boundaries and kill programs whenever they stepped over the bounds, there'd be nothing to stop them.

      Another idea was adding instructions to dynamic memory allocation to do memory wipes. Before freeing the memory, the computer was instructed to zero it out. This resulted in as much as a 10% performance hit, and was quickly abandoned. Wiping memory has been proposed at the OS level as well. But there are always apps that don't need that because they aren't doing anything sensitive.

      That brings up a big problem with the article. Where should responsibility for security lie? With the OS? I think trying improve a language's security is the wrong approach. That's what they sort of tried to do with Java. It's like trying to prevent bank robberies by securing the steering wheels of all potential getaway vehicles. Yes, make languages easier to use and less prone to bugs, but don't specifically target security.

      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    13. Re:Subtle attack against C/C++ by Antique+Geekmeister · · Score: 2

      > C++ (and do a lesser extent C) lose support because of their extremely poor support for utf8.

      That's because for most programming, UTF8 is not worthy of support. It's inconsistently used, it arbitrarily increases the of individual. It would be much safer used as only binary strings, not as actual characters which must be parsed and reformatted among different environments. The advent and popularity of UTF8 with its confusing and ill defined management of case and formally POSIX compliant operations such as file naming has effectively slowed system programming by many years.

    14. Re:Subtle attack against C/C++ by Anonymous Coward · · Score: 0

      What are you trying to imply here? That pretty much every other language therefore inherits all of C's fragility?

    15. Re:Subtle attack against C/C++ by jrumney · · Score: 1

      All the array needs is a way to address a chunk by character # rather than by byte #

      If you need to do things like that, then just use UTF-32. Memory is cheap. Scanning a byte array counting characters of arbitrary length is expensive, and there are no cheap shortcuts that don't involve taking as much memory as your UTF-32 representation would have used in the first place, which require far more complicated and prone to error algorithms to handle it all.

    16. Re:Subtle attack against C/C++ by ASDFnz · · Score: 1

      I remember a saying when I was learning programming;-

      With C it is easy to shoot yourself in the foot, with C++ it is a lot harder, but when you do shoot yourself in the foot you take your entire leg off.

    17. Re:Subtle attack against C/C++ by UnknownSoldier · · Score: 0

      > C++11 is awesome and has brought it back to modern day relevancy. I

      There is that old joke ...

      There are 2 problems with C++

      1. Its design
      2. Its implementation

      C++ started out as an awesome C with classes extension! Every C++ programmer should read these 2 classics:

      * The Design and Evolution of C++
      * Modern C++ Design

      Today C++ is an over-engineered design-by-committee that unnecessary includes everything and the kitchen sink (translation: clusterfuck). Basic problems of idiotic archaic baggage such as "long long", lack of a proper binary literal (which took years; over-engineered user literals*), macros that aren't type safe, no standardized name mangling nor run-time functionality to query a mangled function name, etc.

      C++ when used sparingly can be a great tool. A balance between the simplicity of C and the power of C++ abstraction is ideal.

      * http://stackoverflow.com/quest...

    18. Re:Subtle attack against C/C++ by david_thornley · · Score: 1

      No, C++ is a separate language from C, and far more expressive. It never was a preprocessor for C; Cfront was a genuine compiler that used C as the target machine, and fairly soon became inadequate for compiling C++.

      If you think it's basically C with more libraries and a fancy pre-processor, you're using it wrong.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    19. Re:Subtle attack against C/C++ by david_thornley · · Score: 1

      FWIW, Linux started way back when C++ was nonstandard (1990?) and didn't have many advantages over C for kernel development. At that time, C was definitely the right choice, and making it a mixture of C and C++ isn't real attractive. Nowadays, I'd recommend C++, as it can do pretty much everything C can and more besides, and standards-conforming compilers can be found everywhere (pity about Visual C++).

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    20. Re:Subtle attack against C/C++ by david_thornley · · Score: 1

      Modern C++ is a lot more coherent than you suggest. Its main problem is the initial compatibility with C, and attempting to be compatible with bad decisions made along the way (long has to be 32-bit, so we need "long long"?). I have no idea why you think binary literals are all that much more useful than octal or hex. Macros aren't type-safe, but C++ templates are. Name mangling is an implementation detail, and there's lots of variation between compiler output that isn't name mangling. Standardizing it would accomplish very little, and there's no need for the runtime to know the mangled name.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    21. Re:Subtle attack against C/C++ by Anonymous Coward · · Score: 0

      The iostream library is safer, but much slower than stdio

      That is a lie, the iostream library can be just as fast once you disable sync_with_stdio which isn't needed unless you mix stream and stdio use on the same FILE object.

    22. Re:Subtle attack against C/C++ by Joce640k · · Score: 2

      UTF8 is great for storing data in files, but ... working with strings in memory? Insanity will follow.

      --
      No sig today...
    23. Re:Subtle attack against C/C++ by Joce640k · · Score: 1

      I think 1996 just called and wants it's Usenet flamewar back.

      --
      No sig today...
    24. Re:Subtle attack against C/C++ by Joce640k · · Score: 1

      I remember a saying when I was learning programming;-

      With C it is easy to shoot yourself in the foot, with C++ it is a lot harder, but when you do shoot yourself in the foot you take your entire leg off.

      Pity you never bothered to find out who said it or in what context...

      --
      No sig today...
    25. Re:Subtle attack against C/C++ by Viol8 · · Score: 1

      Sorry pal, Cfront was a preprocessor in the same vein as Oracles PRO*C. If calling it a compiler makes you feel better about using it then all well and good - but it wasn't. A lot of code went straight through it unchanged, it only processed the specifically C++ parts.

    26. Re:Subtle attack against C/C++ by Viol8 · · Score: 1

      Newsflash - when you're writing a kernel you want to know exactly what is being created during compilation, when memory will be allocated and how is going to be laid out during runtime and when it gets free'd up. ie - it HAS to be explicit otherwise your OS is going to end up in a mess. What you don't want is a load of C++ implicit code and memory allocation happening when you need tight control of both.

      Now get back to application programming and leave the OS coding to people who know what they're talking about.

    27. Re:Subtle attack against C/C++ by narcc · · Score: 1

      and far more expressive

      Such silly nonsense.

    28. Re:Subtle attack against C/C++ by Viol8 · · Score: 1

      "I have no idea why you think binary literals are all that much more useful than octal or hex"

      Binary literals are extremely useful when you're dealing with bits in specific places in a byte/word/etc. Its a lot clearer to read and a lot easier to write than trying to encode and decode into hex or oct.

      "Standardizing it would accomplish very little, and there's no need for the runtime to know the mangled name."

      Oh really? Just how do you think dlopen() finds the functions in a .so shared object file (.dll in windows) loaded during runtime? As things stand you need to 'external "C"' every C++ .so function you might need to call and as for class statics - forget it.

      I think your inexperience in the world of low level programming is showing.

    29. Re:Subtle attack against C/C++ by Anonymous Coward · · Score: 0

      Wiping memory has been proposed at the OS level as well. But there are always apps that don't need that because they aren't doing anything sensitive.

      Most OSs do this now because they can quickly map a large memory rank to a single immutable 4KB page of all zeros. Want 1GB of memory? Sure, here's a pointer. But that 1gb of memory is actually backed by a single read-only 4KB page. Only once you start writing to it will the memory writes page-fault and cause the OS to grab you a real page. Many OSs also zero out memory as a background process and only add the memory back to the "pool" once it's zeroed.

    30. Re:Subtle attack against C/C++ by david_thornley · · Score: 1

      Could be; I don't have much experience in low-level programming using higher-level languages.

      Binary literals would be nice, yes, but I don't see that as a big deal. I find hex literals almost as easy to read, and easier to type correctly. YMMV, of course, but I'd expect proficiency and ease with hex literals to increase over time.

      C++ doesn't have a halfway standardized ABI, unlike C. Name mangling is just part of it. There's a lot of other compatibility issues. This is a problem with the language (not the language standard, but the language in the community). Informally standardizing name mangling would be a start, but only a start. I agree that a reliable ABI would be very nice, but it's more work than you seem to think.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    31. Re:Subtle attack against C/C++ by david_thornley · · Score: 1

      Your first paragraph is entirely true. In writing such code, you'd want to be very choosy about which C++ features you used. That doesn't mean C++ is worse than C in this case, only that it loses a lot (but not all) of its advantages.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    32. Re:Subtle attack against C/C++ by david_thornley · · Score: 1

      I never used Cfront that much; I'm taking the the compiler designation from Stroustrup's "Design and Evolution" book. I never used PRO*C (my main experience with interfacing is OCI and OCCI), but in the case of Cfront you'd have to parse to determine which parts of C code you could let through. What would be a function call in C could be a member function call in C++, perhaps a virtual function call, and maybe it could be passed through and maybe not. Operator overloading meant that every expression had to be parsed by Cfront. If you're taking source code, parsing it, and producing somewhat different target code based on the parse, I'm going to call it a compiler.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    33. Re:Subtle attack against C/C++ by Viol8 · · Score: 1

      So how would you define a precompiler then?

    34. Re:Subtle attack against C/C++ by Viol8 · · Score: 1

      Can't see it being that much work. For method foo in class baa just define the actual function name to be __baa_foo or similar. For a virtual function __baa_v_foo and so on. For overloaded functions __baa_foo1, __baa_foo2 etc. You'd need to know how the names were mapped to which method but its still better than the current mess.

    35. Re:Subtle attack against C/C++ by HiThere · · Score: 1

      It will if you're using C or C++.

      FWIW, *most* of the text I'm working with is ASCII-7, but some of it isn't. Short quotation in, e.g., Greek. I need to be able to count the chars, etc. Utf-32 is an immense waste of space...and I already expect to be doing a lot of paging because of excessive memory use.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    36. Re:Subtle attack against C/C++ by bzipitidoo · · Score: 1

      I wonder if zeroing out memory can go even deeper than the OS. Like, why not have RAM that can zero itself on command? Just turn off the DRAM refresh for a fraction of a second, and viola!

      Memory moves have been made much faster by bypassing the CPU, for instance with hard drives with the DMA mode rather than PIO mode. So they are using a DMA from a /dev/zero device or more like a 4k page of zeroes to a range of memory? What you're describing sounds like an excellently lazy method. Zero newly allocated the memory when it is the object of a pagefault, not eagerly when allocated. Though nowhere near as bad as a PIO (or just PO?) method of pushing zeros out of the CPU and into memory, I'm guessing that is still a small performance hit. Is it?

      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    37. Re:Subtle attack against C/C++ by UnknownSoldier · · Score: 1

      > Modern C++ is a lot more coherent than you suggest.

      You've never actually worked on a compiler have you?

      Parsing modern C++ is a complete clusterfuck.

      > binary literals are all that much more useful than octal or hex

      There is a time and a place for _standardized_ verbosity.

      When you do low-level PLL coding being able to have 1 character = 1 bit is extremely handy.

      > Macros aren't type-safe, but C++ templates are.

      Templates don't provide conditional compilation.

      > and there's no need for the runtime to know the mangled name.

      So you've never had a need for it. Great. You're still an amateur!

      Gee, maybe I'd like to link code compiled with compiler A against code compiled with compiler B so I don't have to ship libs compiled with X compilers.

      Maybe try interfacing some non C++ code with C++ objects. Oh wait, we have to extern "C" everything because of some retarded, and secret linker name mangling.

  5. Contradict often? by Anonymous Coward · · Score: 0

    I've never read so many contradictions in one article before!

  6. Methodology for choosing languages? by Vultaire · · Score: 1

    From the article: "To lay the foundation for the research, the team first examined the volume of languages in the field, and found, unsurprisingly, that .Net, Java and ASP are the most widely used programming languages at 28.1%, 25% and 16% respectively. Legacy programming languages that have been around for decades, PHP (11%), ColdFusion (6%), and Perl (3%) rounded out the remaining field." How did they determine the languages? This certainly differs from TIOBE's methodology (based on Google searches). The "unsurprisingly" seems suspect as well; I feel some of the selections *are* somewhat surprising.

    1. Re:Methodology for choosing languages? by Anonymous Coward · · Score: 0

      Yeah, I thought PHP was still more prevalent than that.

    2. Re:Methodology for choosing languages? by pr0fessor · · Score: 1

      WhiteHat researchers examined the vulnerability assessment results of the more than 30,000 websites to measure how the underlying programming languages and frameworks perform in the field

      It's a small sample size if you said that they were all enterprise web applications I would expect that .Net and Java usage would be even higher.

    3. Re:Methodology for choosing languages? by sporkbender · · Score: 3, Insightful

      I thought that PHP was born around the same time as Java (and definately way before .NET). So how is PHP a legacy language and Java isn't? Or, is the writer just throwing in words to mess with my programming language history?

    4. Re:Methodology for choosing languages? by Shados · · Score: 1

      They came out around the same time, but their popularity as a web development language was separated by quite a few years. PHP was everywhere a few years before JSP and Servlets started powering bank websites all over the place.

    5. Re:Methodology for choosing languages? by Ziggitz · · Score: 1

      Sadly, it is.

      --
      There is no memory shortage. yes I have heard of XFCE. Go away.
    6. Re:Methodology for choosing languages? by Anonymous Coward · · Score: 0

      Because any half-way competent architects and development leads with responsibility for selecting technology stacks for a project have dumped it for things like Python if scripting is really necessarily, but more likely just moved to compiled languages like C# and Java.

      It's a legacy technology because in the business world where the bulk of development is done it's being phased out.

    7. Re:Methodology for choosing languages? by Xest · · Score: 1

      "This certainly differs from TIOBE's methodology (based on Google searches)."

      Actually TIOBE's methodology is absolutely awful. It takes the most popular sites on the net and weights them in an inversely exponential manner.

      One of these pages is Wikipedia, which is editable by anyone, and it puts a massive weighting on them. Similarly it applies arbitrary filters that cut out legit results for some languages, and throw in illegitimate results in favour of other languages.

      You can as an individual trivially subvert TIOBE by making up a new language, posting on Wikipedia with a number of links to it, and creating a number of fake blogs on it.

      Long story short, TIOBE is utterly worthless so using it as a standard of comparison is complete nonsense. Any more rational index would take job postings and so forth from global job posting sites and that sort of thing. Weighting based on information on sites that anyone who wants to can trivially manipulate is utterly stupid.

  7. ASP? by BaronAaron · · Score: 5, Insightful

    Do they mean Classic ASP? They list .NET separately so I don't think they mean ASP.NET, but they also don't include ASP in their list of "legacy" languages. I also seriously doubt 16% of companies are still using Classic ASP.

    ASP isn't even a language, it's a framework. You can write a Classic ASP app in vbscript or javascript. You can write ASP.NET in any .NET supported language. Then there is ASP.NET MVC.

    If they can't get their list of tested "languages" straight, I doubt the rest of the article.

    1. Re:ASP? by Richard_at_work · · Score: 1

      There are also non-ASP.Net MVC frameworks based on .NET, like NancyFX, so the .NET category seems to very very wide. At a guess I'm going to assume the same for Java, as its really the same situation.

    2. Re:ASP? by FearTheDonut · · Score: 2

      Yes, but it's far easier to say, ".NET is .NET", or, more accurately, "Microsoft is Microsoft". i.e. Proprietary.. i.e. bad. While I don't have numbers, I'd wager that Classic ASP (which runs on the .NET framework) is vastly more unsecure than ASP.NET MVC.

      Don't mistake my comment for blind support for Microsoft. But, when a study fails simply acknowledge this very basic fact about the Microsoft ecosystem, it's numbers really don't mean much.

    3. Re:ASP? by Richard_at_work · · Score: 1

      Classic ASP doesn't run on .NET, it was pre-.NET.

    4. Re:ASP? by Anonymous Coward · · Score: 0

      I'd wager that Classic ASP (which runs on the .NET framework)

      Active Server Pages (Classic ASP) pre-dates .NET and has nothing to do with .NET. It is a legacy technology. ASP.NET was a replacement for ASP built on top of .NET.

      ASP and ASP.NET are two completely different things.

    5. Re:ASP? by amicusNYCL · · Score: 1

      They list .NET separately so I don't think they mean ASP.NET, but they also don't include ASP in their list of "legacy" languages.

      That's right, according to them ASP and Java are new, and PHP is legacy.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    6. Re:ASP? by Tablizer · · Score: 1

      You can write a Classic ASP app in vbscript or javascript.

      While technically true, I doubt very many organizations actually do that in practice, based on my observations, such that it's not worth making that distinction, except perhaps as a footnote.

  8. Confusing by vux984 · · Score: 3, Insightful

    I'm not even sure what the article meant by ASP vs .NET ? Surely they aren't talking classic ASP? I doubt anybody is 'starting new projects in classic ASP -- so what is ASP? and how is it not .NET ?

    The rest of the article doesn't make a lot of sense to me either.

  9. Depends on who uses them by CastrTroy · · Score: 5, Interesting

    It may be cliche, but how secure a language is depends on who is using it. PHP is very accessible, and used by a lot of newbies, so "in the field" there turns out to be a lot of vulnerabilities found. However, by following some relatively simple guidelines, code can be made pretty secure. Most of the problems in PHP code are either due to SQL injection, which can easily be avoided by using parameterized queries, or from turning on options that are known to be insecure, like register_globals. C on the other hand would only be used by a small number of highly trained individuals, at least for web applications, so it's less likely to experience problems in the wild, but due to buffer overflows and other memory management problems, it's much easier to shoot yourself in the foot without realizing it.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    1. Re:Depends on who uses them by jellomizer · · Score: 4, Funny

      That can't be, My choice language has been told to be the most secure ever.
      So
      Input $Login
      Input $Password
      Let $LoginID= SQLQuery("SELECT LoginID from Logins where Login = '" $Login "' and Password = '" $Password "'

      I am can rest comfortably knowing that I am perfectly secure.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Depends on who uses them by parkinglot777 · · Score: 4, Insightful

      If you read TFA, you will find out quickly that the headline (both from this site and on TFA) is seriously misleading! What TFA is talking about is doing statistic on 30k websites, and determine what language/frame work they used to implement. Then check on each of them for vulnerability attack, such as SQL injection, XSS, etc. So, the language itself has NOTHING to do with the security, but it is the implementation of the site itself! The article itself is not well written either... Too many quotes from many people in copy-and-paste style. Then the author tries to thrown in numbers (i.e. percentage of this and that) to make it look like it is that useful... NOT!

      TLDR? Below is what TFA is actually about...

      WhiteHat researchers examined the vulnerability assessment results of the more than 30,000 websites to measure how the underlying programming languages and frameworks perform in the field. With that information, the report yields key findings around which languages are most prone to which classes of attack, for how often and how long as well as a determination as to whether or not popular modern languages and frameworks yield similar results in production websites

    3. Re:Depends on who uses them by CastrTroy · · Score: 1

      Exactly. Perl had the fewest vulnerabilities. But only the most experienced coders would even attempt to do a site in Perl, so you kind of end up with exactly what you expect. The popular languages all ended up with the same number of vulnerabilities. It's actually quite surprising the PHP had slightly fewer vulnerabilities than .Net and Java.

      What would be really secure would be a language that actively tried to stop you from doing stupid things like requiring that database queries be parameterized. Don't provide any APIs for running database queries without parameters. Sure you could still construct queries that didn't actually use the parameters, but it would at least get you off to a good start by forcing you to pass them into the function. You could even parse the SQL and throw an error if a value was used where a parameter should be. You could also force checking for a token when submitting forms to ensure CSRF is not being done.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    4. Re:Depends on who uses them by Anonymous Coward · · Score: 0

      It may be cliche, but how secure a language is depends on who is using it. PHP is very accessible, and used by a lot of newbies, so "in the field" there turns out to be a lot of vulnerabilities found. However, by following some relatively simple guidelines, code can be made pretty secure. Most of the problems in PHP code are either due to SQL injection, which can easily be avoided by using parameterized queries, or from turning on options that are known to be insecure, like register_globals. C on the other hand would only be used by a small number of highly trained individuals, at least for web applications, so it's less likely to experience problems in the wild, but due to buffer overflows and other memory management problems, it's much easier to shoot yourself in the foot without realizing it.

      Too bad when you go around looking for example PHP code for SQL, you don't find parameterized code. Then PHP is weakly typed, so something as inoculus as FindIndex(MyArray, "MyString") can return "false", but "false" is equal to "0", which is a valid index. Oh great, how do I know if it found something at index 0 or it returned false because it couldn't find it. Great f'n language. They may have fixed this one annoyance, but there are many more that are just as bad or even worse.

      PHP has a lot of ambiguity and goes out of its way to make sure code runs, even if it makes no sense. Personally, I like it when my code creates an error and fails, instead of giving a false impression of "working".

    5. Re:Depends on who uses them by Anonymous Coward · · Score: 0

      What would be really secure would be a language that actively tried to stop you from doing stupid things like requiring that database queries be parameterized.

      have you seen ruby on rails or django or ... on and on and on? pretty much every web framework that's come out in the last 10 years?

    6. Re:Depends on who uses them by sjames · · Score: 1

      I thought about that a bit. It's easy to remove all but the functions intended to be used parameterized, but that doesn't prevent you from doing something stupid, it just doesn't invite you to be stupid. There is certainly something to be said for that.

      The solution for the second part would be a bit heavy weight and never really satisfactory. For example:

      "SELECT info from STUFF where id=$uid;"

      Pretty much anyone would agree that uid should be parameterized. However, what about:

      "SELECT $field from $table where $other_field = $value;"

      Which of those do we want to force into parameters for all cases? Surely we don't want to force the first query to be re-written as:

      "SELECT $1 from $2 where $3=$4;", array('info','STUFF','id',$uid)

      But short of that, we can't stop someone from being stupid.

    7. Re:Depends on who uses them by narcc · · Score: 1

      Translation: I don't understand dynamic typing, therefore, it's bad and PHP is bad.

      (Just a guess, but I'll bet he still thinks Python, Perl, Lisp, etc. are okay. There often isn't much thinking involved when repeating memes and talking points.)

    8. Re:Depends on who uses them by dave420 · · Score: 1

      "Early 2000 called ... yadda yadda ..."

      Seriously - you're either a terrible programmer, a troll, or both.

    9. Re:Depends on who uses them by lars_stefan_axelsson · · Score: 1

      It may be cliche, but how secure a language is depends on who is using it.

      Well, this might be one of those times where "correlation is not causation" is appropriate. What I mean by this is that while the skill of the user certainly matters, so does the quality of the tool. "It's a poor workman who blames his tools" is a warning against poor workmen, not a carte blanche for shitty tools.

      So of course, a tool can both help you and hinder you doing what you need to. It's no accident that you see top sportsmen obsessing over their equipment. Or why people don't clamour for manual gear boxes without synchronisation rings any more.

      Now, when it comes to programming languages these interactions are very poorly understood. We don't know what makes a certain language (or features) work well for certain programmers in what situations. That said, we've amassed quite a body of evidence to suggest that some things work better than others. Functional programming languages with proper type systems for example seems to make large classes of errors just go away, by making them both obvious and impossible (since the type system wouldn't allow them). They also seem to increase productivity by a factor of four to ten, and increase system performance too boot. (Even though they're "slower" than C in micro benchmarks. Basically the same argument against C from the assembly crowd in the eighties, which we all know fell out in favour of that "slow, bloated, high-level mess" that is C...

      Granted, much of this is still in the research state, and security among other things isn't important enough to make people change their ways (at least not yet), but there is a lot more interesting done, and still left to do, to just say that the tool/language etc. side of the equation doesn't matter. It clearly does.

      --
      Stefan Axelsson
    10. Re:Depends on who uses them by Anonymous Coward · · Score: 0

      PHP is so loosely typed that a returned error can "dynamically" be converted into a valid array index with nary a warning. Dynamic typing is all fine and dandy until it affect error handling or causing ambiguous results. PHP is not actually "dynamic". Dynamic types can still be type safe. PHP mixed dynamic typing with auto-casting, where auto-casting can cast any type into another type, no matter what.

  10. PHP not the worst!!!! by Anonymous Coward · · Score: 0

    WOOT

    1. Re:PHP not the worst!!!! by beelsebob · · Score: 2

      php is not the worst because they measured completely the wrong thing. They measured how many bugs they found in the implementation of the language, not how many bugs a programmer using that language would introduce that the language would not catch for them.

  11. If you want real security by Anonymous Coward · · Score: 0

    You have to build security into a language from the get-go. It can't be an afterthought.

    If you're comparing mitigation rates, it just means you've failed already.

    1. Re:If you want real security by FearTheDonut · · Score: 2

      (Can't believe I'm replying to an AC).

      This sounds great and all that, but that's a very unreasonable statement. Consider C. I don't know a single person who would say that C is secure or that security wasn't built in from the get-go. The same can be said of C++. But those languages offer different benefits (speed and control both come to mind). It's a trade off, to be sure. But sometimes, you have to use a language that isn't secure "from the get-go" to build an application that needs security. We don't always have the luxury of doing the perfect (or near perfect) thing.

    2. Re:If you want real security by Anonymous Coward · · Score: 1

      (Can't believe I'm replying to an AC).

      Why do so many people feel the need to point out that they're stooping below their normally high standards to "reply to an AC"? Either the guy said something that made sense or he didn't. Who cares if he was anonymous? And why lead with that in your reply when it has nothing to do with the discussion at hand?

    3. Re:If you want real security by Anonymous Coward · · Score: 0

      Does your drivers license say "FearTheDonut" on it? Can't believe I'm replying to an AC...

    4. Re:If you want real security by david_thornley · · Score: 2

      C++, properly written, is much more secure than C. It includes memory management, type-safe I/O, and well-behaved library containers.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    5. Re:If you want real security by narcc · · Score: 1

      Let's try it the other way:

      C, properly written, is much more secure than C++.

      Huh, it still works. I guess that's what happens when you use a ridiculous qualifier like "properly written".

    6. Re:If you want real security by david_thornley · · Score: 2

      Except that I gave reasons why C++ is superior in security to C. It's easier to write secure code in C++ than in C. Both are difficult to write well, but well-written C++ code is going to be more secure than well-written C code.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  12. Mean number of vulnerabilities is a good metric? by 140Mandak262Jamuna · · Score: 3, Insightful
    When you reduce a complex issue to just one number, like "mean number of vulnerabilities", it is often an over simplification. It is tempting to think it is better than nothing. But are we really better off making decisions based on an overly simplified view of things?

    One bug that allows silent remote code execution on the WAN side and another bug that is a privilege escalation possibility on the LAN can not be treated as one bug each, right? This is not limited to just security vulnerabilities alone. Many software company top managers insist on looking at bug counts, sometimes sorted into 5 priority/severity levels or so.

    It gets worse in the planning and progress monitoring. They use fancy tools like rallydev.com or something, but they allow each team to define its own story points. The Bangalore team uses 1 story point = 1 engineer week. The Boston team uses 1 story point = 1 engineer day. The Bangkok team uses engineer hour. And the top management gets the report, "This SAGA feature story was estimated to take 3264 story points, and it is 2376 points complete". Complete b.s. that is.

    We pay ridiculously high salaries for the top management, and instead of expecting them to put in the time, energy and effort commensurate with that kind of pay, to make valuable judgement, hard decisions, step on people's toes, tell it like it is, and paint an accurate picture of the state of the company, we let them shirk their responsibilities.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  13. The language being the problem? Seriously? by Opportunist · · Score: 1

    Yes, of course the security of your language (as well as the rest of your environment) matters. But what's way more important is what kind of devs you have. No matter how secure anything is, if the person supposed to use it does not know about its security pitfalls, do you think that's increasing the security?

    Security is by definition the minimum of the security your technology offers and the security your personnel offers. The minimum. Not the average. The same applies to OSs, too. You can have the most secure OS in the world, if you lack the admin to secure it, you're no better off than with an OS that has shabby security itself.

    Your security is way more dependent on the personnel you have, and the ability and expertise they have with the different technologies. Simple scenario: Take an admin that knows OS-A like the back of his hand and can somehow kinda-sorta get OS-B to run. OS-A has a few security holes (that the admin all knows about, including their workarounds) while OS-B is absolutely tight but our admin doesn't know it too well.

    Which one do you think will, administered by said admin, be more secure?

    It's the same with programming languages. C does have its security issues, but a good C programmer knows why he should not put input on the stack and why he should include sanity checks on every input, especially if is of variable length. Some other language might not have that possibly dangerous pit, but there are very, very few languages (outside those fields where security matters and money doesn't) that have none.

    What would you prefer your devs to develop in? A language they know, including all its slings and errors, or a potentially more secure one the pits of which your devs don't know?

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    1. Re:The language being the problem? Seriously? by Anonymous Coward · · Score: 0

      A language they know, including all its slings and errors, or a potentially more secure one the pits of which your devs don't know?
      A more realistic choice would be "a language they think they know but are unaware of lots of slings an errors or one they don't know."

  14. ColdFusion is a PROGRAMMING LANGUAGE? by Anonymous Coward · · Score: 0

    These aren't really "programming languages", they're a set of "web scripting languages".

    Some of them may be "programming languages", too.

    But damn, talk about delusions of grandeur.

    1. Re:ColdFusion is a PROGRAMMING LANGUAGE? by Anonymous Coward · · Score: 0

      There's no difference between a "programming" language and a "scripting" language.

  15. Not a useful paper by MobyDisk · · Score: 5, Insightful

    In the wake of Heartbleed, one might think that this would be talking about array bounds checking or buffer overflow mitigation. No. It is talking about web site frameworks.

    examined the vulnerability assessment results of the more than 30,000 websites

    First of all: this is not measuring the security of the programming language. This is measuring the security of the OS infrastructure and toolchains. Notice C/C++ is not on the list, since it is hardly ever used for creating web sites.

    There was no significant difference between languages in examining the highest averages of vulnerabilities per slot.

    What the heck is a slot?

    Any summary where Perl scores the best must be deeply questioned. I doubt this is an apples-to-apples comparison. Surely these Perl sites are not doing nearly as much as the sites written in other languages.

    1. Re:Not a useful paper by beep999 · · Score: 1

      Any summary where Perl scores the best must be deeply questioned. I doubt this is an apples-to-apples comparison. Surely these Perl sites are not doing nearly as much as the sites written in other languages.

      I can't speak for all perl sites, but I have a extensive perl-based set of web applications running well over 100,000 lines of perl code. It has a clustered Oracle back-end and is administered under a high level of scrutiny and has never had a security breach in 10 years. It's really easy to write horrible perl code, but well written perl code can be very secure.

    2. Re:Not a useful paper by Anonymous Coward · · Score: 0

      It's really easy to write horrible perl code, but well written perl code can be very secure.

      I'll see your perl, and raise you:

      It's really easy to write horrible $PROGRAMMING_LANGUAGE code, but well written $PROGRAMMING_LANGUAGE code can be very secure.

      Now everyone at home can play too!

    3. Re:Not a useful paper by Anonymous Coward · · Score: 0

      Perl isn't the "new hotness" anymore, so most would-be Perl programmers try out Ruby or Python first. This stems the influx of newbie programmers (making newbie mistakes). Neckbeards who grew up with Perl continue to use Perl, and they are all experts by now.

      Correlation is not Causation. http://xkcd.com/552/

    4. Re:Not a useful paper by hAckz0r · · Score: 1
      I think 'slot' is a misinterpretation of someone else's pronunciation of SLOC, or source lines of code, but its usually used in (kilo) k-sloc or (mega) m-sloc when talking about errors in software. if you are talking about just sloc you are in deep trouble bug wise.

      .
      Another possibility is in GUI programming there is a such thing as a slot, which is essentially a callback routine associated with an interface control. However applying that definition to an error count metric is troubling since there is no standard size for a callback.

      For what its worth, whatever language NGINX is written in is not the one to use, the site gateway is apparently down, implicating a bug in the web software serving the article. Maybe the hackers are trashing the servers right now? I would have liked to have been able to read the article on broken web software, but the web software was broken.

    5. Re:Not a useful paper by Anonymous Coward · · Score: 0

      In the wake of Heartbleed, one might think that this would be talking about array bounds checking or buffer overflow mitigation. No. It is talking about web site frameworks.

      examined the vulnerability assessment results of the more than 30,000 websites

      First of all: this is not measuring the security of the programming language. This is measuring the security of the OS infrastructure and toolchains. Notice C/C++ is not on the list, since it is hardly ever used for creating web sites.

      There was no significant difference between languages in examining the highest averages of vulnerabilities per slot.

      What the heck is a slot?

      Any summary where Perl scores the best must be deeply questioned. I doubt this is an apples-to-apples comparison. Surely these Perl sites are not doing nearly as much as the sites written in other languages.

      Indeed, they are not controlling for age of the project. Most of the Perl sites are probably in a development mode where new features are rarely added and almost all changes are security fixes. It's not surprising that such a site has a smaller number of security problems than one where new features are actively being added (which is likely to be the case for most sites written in "newer" languages like Ruby).

  16. It's not just the language, but the implementation by davidwr · · Score: 4, Insightful

    If the language specification doesn't expressly say what happen when things "outside the design" happen, then different implementations may work differently.

    For example:

    If the language design spec says

    "If an array index is out of bounds, exit the program and return a value of ABEND_ARRAY_BOUNDS_VIOLATION to the calling program,"

    that may seem very specific, but if how to "exit the program and return a value of ABEND_ARRAY_BOUNDS_VIOLATION to the calling program," isn't specified by someone (usually the operating system), then it may not be specific enough. if different operating systems specify how to do this differently, then expected "under the hood" behavior will not necessarily be consistent across operating systems.

    For example, does "exit the program" mean simply returning control to the caller, or does it mean explicitly returning any resources that were previously granted to the program by the operating system first? Or is that optional? If it's optional as far as the operating system is concerned, does the language provide a compile- or run-time switch to force such a cleanup? Does returning memory to the operating system guarantee that the OS will sanitize the memory, and if not, does the language guarantee it? If the language doesn't guarantee it, does the language provide a compile- or runtime switch so the program will sanitize memory prior to returning it to the operating system?

    These differences in language implementations and even differences in how operating systems handle the starting and stopping of processes can lead to differences in what the code actually does. Usually these differences are unimportant but sometimes they are very important.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  17. CSS ? by Anonymous Coward · · Score: 0

    Programming languages. Vulnerabilities of programming languages (read: sub-optimal implementation of the language).

    Then you read "CSS", as in Cross Side Scripting ? And SQL injections ? C'mon...

    This is completely unrelated to the programming language. TFA is completely absurd, despite stating that these are "(...)vulnerability assessment results of the more than 30,000 websites to measure how the underlying programming languages and frameworks perform in the field"

    We all know that most web development it's recently done with .net. Java is also widely used, so as ASP. So, the so-called "vulnerabilities" are obviously linked to the most-used platforms.

    Nothing new here for you to read, move along.

  18. FLAME WAR! by HeckRuler · · Score: 1

    FLAME ON! PURGE THE INFIDELS IN THE HOLY FIRE!
    But before we really get into it, this isn't really a measurement of the language somuchas how people use the language. For example: while VB6 was an abomination, VB.NET really isn't all that bad. But since the people who use VB.NET are the amateur noobs who make stupid mistakes. Hey, we all started somewhere. But it means I really wouldn't trust a project that's written in VB.NET for certain tasks.

    These are sociological factors. Politics. Culture. And they matter, but they're not technical aspects. The size of the community. The maturing of the developers. How open the overlord megacorp is to people making tools that interface with their toys. How many developers got the hype-bug and wrote libraries for said language. How good those developers were at their job. It all matters, but it's not an aspect of the language itself.

    Any Turing complete language CAN do the job. You've got to avoid Turing tarpits, but mostly the right tool for the job is a matter of fashion.

    Why the flames? Why is this something that causes so much strife?
    Because we all want to bet on the right horse, and who wins is largely a popularity contest. It really DOES matter what the community does. You can't just go off into the woods and code away in TurboPascel and hope to have a lucrative career. It's an inverse tragedy of the commons. Using the tools of your neighbor SHARPENS said tools. So everyone wants you to use their tools. Because their tools are the best.

    And so the flame wars rage on.

    1. Re:FLAME WAR! by Anonymous Coward · · Score: 0

      Pascal. Delphi was the bomb in it's day (late 90s, early 00s). It got out marketed though. Borland exec's were pretty stupid too. Inprise my ass.

    2. Re:FLAME WAR! by Shados · · Score: 1

      The example you give is a decent one, because there's an easy comparison point: C#. VB.net and C#, aside for unsafe block, inline event handlers, XML literals, VB6 compability assemblies and a few other minor things, are exactly the same. They compile to the exact same bytecode, byte for byte, if you write the same thing in both.

      Yet VB.net devs are paid less, VB.net code is almost universally worse, VB.net companies are generally garbage, even though the 2 language are almost exactly the same, because of all the factors you already pointed out.

  19. Completely missing the point by beelsebob · · Score: 1

    They shouldn't be looking at the number of bugs in the implementation of the language. They should be looking at the bugginess (or not) of the code written in it. That's the important thing.

    1. Re:Completely missing the point by BenSchuarmer · · Score: 2

      The problem with that is that many programming languages have "features" that programmers misuse resulting in security holes (especially in PHP).

      If a language makes it difficult to do things safely, it's reasonable to blame the language.

    2. Re:Completely missing the point by beelsebob · · Score: 1

      Yes... That's my point. This is exactly what they should be testing for - does the language allow you to do dumb things, or does it moan at the first sign of something that could be insecure? This is what they should have tested. Not whether the implementations were any good.

  20. I always knew by Anonymous Coward · · Score: 0

    that PHP was more secure than Java

  21. JAVA For Security and Speed! by Anonymous Coward · · Score: 0

    JAVA is Secure, Java is also fast. But Java Interpreters/compilers are not written in Java.

    So we need to have a java interpreter, running on a java interpreter, written in java, recursively.

    Just think how fast and secure that will be!

    Who needs a 1 second boot when u have a 3 month boot time, good luck exploiting that!

    Security by wearing down your opponent!

  22. More Important Is Ease of Writing Secure Programs by Unknown+Lamer · · Score: 2

    Ur/Web is an interesting language with a type system designed to reject vulnerable web programs as ill-typed. The compiler itself is written in a safe language — Standard ML, and there is a proof of language correctness included.

    --

    HAL 7000, fewer features than the HAL 9000, but just as homicidal!
  23. The whole approach is wrong by gweihir · · Score: 4, Insightful

    The security level of a piece of code with good security is 95% coder competence and 5% language, i.e. language is irrelevant. One thing though is that language can add to the security problems if it has insecure tun-rime implementation errors.

    One reason most security-critical software is written in C is that there, the coder gets full control. A good coder with skills in secure coding will do fine with C. A coder that does not understand software security will to badly in any language, but in C he/she might not even produce anything that works, which will be an advantage. Also in C, it will be far more obvious if somebody is clueless, which makes review easier.

    But "language is important for code security" is even more wrong than "language is important for code reliability". Language is important for code performance though, but only in the sense that it can kill it. Good language choice can also make a good coder more productive (a bad coder has negative productivity, so it hardly matters...). This nonsense about the language being capable of fixing problems with the people using is comes from "management" types that are unable to handle people that are individuals. These utterly incompetent "managers" can be found in many large companies and they believe that in IT, individuals do not matter. Typically these "managers" are not engineers and have no clue what a good engineer can do but a bad one cannot. They also believe that engineering productivity can be measured in hours spent or that all coders are equal and just implement specifications, so outsourcing is a good idea.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:The whole approach is wrong by EvanED · · Score: 2

      A good coder with skills in secure coding will do fine with C.

      I conclude from this and the list of security vulnerabilities in real life that there is no such thing as "a good coder with skills in secure coding."

      Or at least no such thing as a project that only employs or accepts contributions from such programmers.

    2. Re:The whole approach is wrong by Arker · · Score: 1

      "Or at least no such thing as a project that only employs or accepts contributions from such programmers."

      You could probably find a few drawing decent salaries in less public areas, but certainly it's a skill that the tech world in general has no appreciation for at all. And even though I hate it I can understand why - if you have two companies developing a similar product, one does it quick and cheap, the other takes the time to do it right - the first one will 'own the market' before the second can get there. And with that position it has the cash flow to keep paying programmers, while the second one closes their doors.

      The same dynamic still plagues non-commercial projects as well, a quick but shoddy project can gain mindshare and take off before one that does things right has a product to show at all.

      There are a few places where people are willing to pay the price for secure code, and the way things are going I suspect that is increasing, but it's still a tiny minority of available positions.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    3. Re:The whole approach is wrong by naasking · · Score: 2

      The security level of a piece of code with good security is 95% coder competence and 5% language, i.e. language is irrelevant.

      Sure, and memory management, and program correctness, and just about any other achievable program property is 95% coder competence and 5% language by this argument. Except the coders that can guarantee 100% that said property is achieved make up 0.001% of the coder population, which means the vast majority of importance falls on the language to prevent memory leaks, out of bounds errors, and the plethora of other program correctness violations and security vulnerabilities.

      Language is important for code performance though, but only in the sense that it can kill it.

      A language implementation determines code performance, not a language.

      This nonsense about the language being capable of fixing problems with the people using is comes from "management" types that are unable to handle people that are individuals.

      No, it comes from other programmers who recognize not only their own limitations, but the limitations of nearly every other human being who can't seem to come to the same realizations. Dunning-Kruger all the way.

    4. Re:The whole approach is wrong by Anonymous Coward · · Score: 0

      security-critical software is written in C is that there, the coder gets full control

      Not entirely. Sometimes full control will create complexities that create more security headaches. The saving grace is that the user has full control to fix the problem if the security flaw is designed based. In the other languages you may not have that luxury since a design flaw maybe an exploit of the language's design.

      All we know from this is security is hard, and you need to use the right tool [language] for the job at hand. Don't make this the be-all hammer looking for a problem scenario.

    5. Re:The whole approach is wrong by gweihir · · Score: 1

      No, it comes from other programmers who recognize not only their own limitations, but the limitations of nearly every other human being who can't seem to come to the same realizations. Dunning-Kruger all the way.

      As languages and tools are fundamentally incapable of "fixing" limitations of the people using them, I guess you are on the left-side of the Dunning-Kruger graphs as well. There is no replacement for a person that knows what he/she is doing. None at all. There never will be. Making this a language issue just serves to get more people into positions they are filling incompetently. They will then have negative performance, because they cause more problems than they solve. Building software with people that do not have what it takes is not economically viable, unless you are immoral scum that first establishes a monopoly and then puts all the cost of the broken software on the customers. Like Microsoft is doing for example. That is one reason why monopolies are incompatible with capitalism.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    6. Re:The whole approach is wrong by gweihir · · Score: 1

      I disagree. Full control is the only way to enforce KISS. KISS is the only way to write secure software. Sure, a Garbage Collector, for example, sounds nice in theory, but in practice it is merely a tool that allows people that are too incompetent to do memory management to still use dynamic allocation. For example, with a GC you can never be sure freed memory is wiped before being re-used and that can change from one release to the next. Fully checked containers sound nice, but often it turns out they are not that fully checked, or have other limitations and bugs and quite often are not even fully documented. Talk about accidents waiting to happen. Only if you do them yourself can you be sure they indeed do what you think. And so on. I used to be a proponent of high-level languages for everything myself. Bit from what I have seen, they just make the problem worse when security is important.

      Sure, if you do complex software, all these features help. But if you do complex software, it will be insecure. One thing that a language like C makes a lot easier is KISS, because as soon as you find you have to jump though hoops, you notice that you may be doing it wrong and too complex. Of course, if there were an alternative to C in low-level programming, that one would be just as viable. Since C is unique (unless you want to program assembler, that is), it has a special place. This may look like a "be-all hammer", but it is not and that is not the point.

      Of course you should always strive to encapsulate the security-critical functionality and make it as small as possible (by KISS). Writing the rest in some modern language is perfectly fine and I am not arguing against that.

      But the bottom line is that if the coder is not able to use full control competently, the coder is not qualified to write security-critical software. Mos coders are not qualified to write security-critical software, as we are seeing daily, no argument there.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    7. Re:The whole approach is wrong by naasking · · Score: 1

      As languages and tools are fundamentally incapable of "fixing" limitations of the people using them, I guess you are on the left-side of the Dunning-Kruger graphs as well

      Computers enhancing human reasoning. Therefore, computers can't "fix" all human limitations, they can only fix some of them. This is true regardless of whether or not you're a bad programmer. A safe programming language can make a bad programmer into a decent programmer, and a good programmer into great programmer (where "greatness" is a measure of defect rate per thousand lines of code).

      You might as well argue that we should go back to designing bridges and buildings on pencil and paper, because only people who don't understand civil engineering need to design such things using computers. It's an asinine point of view. Good engineers can design ambitious buildings with computers that could never have been designed on pencil and paper, and the "trivial" buildings and bridges that still need building are left for engineers with more limitations.

      The exact analogous argument applies to programming. Computers and safe programming languages enhance human reasoning, and if you don't think so, then I suggest you throw away all of your calculators and computers, because clearly you can get on just fine in today's world without them. Good luck with that.

    8. Re:The whole approach is wrong by gweihir · · Score: 1

      You are right of course, the incentive-structure is completely messed up. For example, if Microsoft had to pay for all the losses their crappy products causes, OS/2 would never had had the marketing issues that killed it. Or if the ones using FOSS but contributing nothing would have to insure themselves against losses due to errors in FOSS from a certain level of usage intensity onwards.

      The problem is that short-term-cheap is not anything that can ever work for things that need to be secure or reliable. And that the people making the decisions for what to buy are idiots or egoists (often both) and do not have to shoulder any of the effects of their bad decisions. Power without responsibility. That can never work. Most people will always optimize their short-term gains, because they do not understand or do not care about the long-term implications.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  24. Strange choice of languages by Anonymous Coward · · Score: 0

    "The most popular programming languages"? Really? Where are Javascript, Ruby, Python, the Cs? On the other hand, is anyone still using ColdFusion? (Which is, or used to be, not even a language but a framework.)

  25. APL by stox · · Score: 1

    Not a single security exploit reported in over 50 years.

    --
    "To those who are overly cautious, everything is impossible. "
    1. Re:APL by bazmail · · Score: 1

      Is anyone looking?

    2. Re:APL by Misagon · · Score: 1

      Large systems are still being done in APL.

      The Swedish medical journal system TakeCare is one example. It handles practically all journals in the greater Stockholm area. It has sure had its slew of security problems, although I don't think that those could be attributed so much to the language as to sloppy sysadmins.

      But hey... a few years ago I thought that nobody would use Erlang for anything significant, until it became a popular language for web services.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
  26. ISO study on programming language vulnerability by david.emery · · Score: 1

    http://www.crosstalkonline.org...

    And here's my $.02: C syntax has been actively harmful in this regard. It's too easy to make a typo that compiles, or to introduce a statement/expression that has a different result than you expect (e.g. the Apple "extra break statement" bug.)

    1. Re:ISO study on programming language vulnerability by Anonymous Coward · · Score: 0

      I've never confused an assignment and equality operator. I just don't know how people fuck this up. But then again, I learned C first and didn't have any other programming experience where the C assignment operator is used as an equality operator.

  27. Re:It's not just the language, but the implementat by davidwr · · Score: 1

    DOH! I *knew* I should've read the freakin' article before writing that.

    Obviously, the article is talking about scripting languages, languages that (typically) run inside of a hopefully-OS-independent-behavior runtime rather than a traditional compiled language that doesn't contain a lot of "runtime" between the compiled code and the operating system.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  28. How does a language remediate anything? by hawguy · · Score: 1

    I don't understand this:

    Perl remediates 85% of all Cross-Site Scripting vulnerabilities, the highest rate among all languages but only 18% of SQL Injection.

    There is no Perl language support to remediate cross site scripting. That's all done by the developer and/or framework he's using, so I don't see how it's useful to say that Perl remediates 85% of XSS vulnerabilities when the language itself has no idea what XSS is or how to remediate it.

    I'm also having trouble reconciling this statement:

    Perl has an observed rate of 67% Cross-Site Scripting vulnerabilities, over 17% more than any other language.

    So Perl re mediates 85% of XSS vulnerabilities -- the highest rate of any language, yet it has a 17% higher rate of XSS vulnerabilities?

    This study would be slightly more useful if they gave details on web frameworks instead of just languages.

    I'm surprised Ruby and Python didn't make the list, I figured that either one of those languages would be more popular than Perl for web development today

    1. Re:How does a language remediate anything? by Unknown+Lamer · · Score: 1

      It is actually possible for the language to prevent certain classes of vulnerabilities. See Ur/Web. That's not what Perl is doing, but...

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    2. Re:How does a language remediate anything? by lcfactor · · Score: 1

      As for Ruby and Python - I'm particularly surprised they didn't make the list but ColdFusion did. I know of many CF apps in legacy support and development, but for new work?

    3. Re:How does a language remediate anything? by Anonymous Coward · · Score: 0

      I work at a fortune 100 company and, at least in my part of the company, everything we do is in Coldfusion 10. Including new work ;-)

      I think of Coldfusion as being to Java what JQuery is to Javascript. You can still program everything in Java, but CF simplifies so many things and makes what might be many lines in Java just one line in CF.

    4. Re:How does a language remediate anything? by Anonymous Coward · · Score: 0

      Heck yes!

      I am starting a new ColdFusion system now- and I expect it to run for at least 15 years. My project will be very large- but it is not really a 'software' project. It is a business project that happens to use ColdFusion as one of the languages.

      Adobe has a roadmap for CF out to 2022, could easily go further. The upgrades continue to stay on track with modern web principles. I don't think any technology has a guarantee of working 10 years from now- it's all a crapshoot. So far I've made a bet on CF that has stood the test of time better than a lot of other languages.

      I get mocked for my choice of ColdFusion all the time. It's okay. 15 years ago I should have been using Perl. 12 years ago I was nuts for not using PHP. 9 years ago only an idiot wasn't using Ruby on Rails. 7 years ago- what kind of peckerwood isn't humping JAVA? 5 years ago all the cool kids (relatively speaking) went to .NET.

      My 15 year old CF code still runs. And somehow, my new code performs just as well as anyone else's. I watch people scrap projects and re-write them just to be on the hot new language. But somehow the final product isn't really any better.

      I don't work in a software shop- I support business processes, and I do a damn good job of it. People who think that changing to a modern language will really have an impact on the business over-inflate the value of what they do. My operation just wants a system that does what they need, has a modern user interface and is secure. Who gives a crap which language I work in?

    5. Re:How does a language remediate anything? by Anonymous Coward · · Score: 0

      There is no Perl language support to remediate cross site scripting.

      http://perldoc.perl.org/perlsec.html#Taint-mode

      I haven't used it for this purpose, but it seems to me that you could very easily adopt a coding standard whereby output is not permitted in certain circumstances if it is tainted, which would help enforce a requirement that data is validated as safe before it is output.

  29. For the life of me.... by Primate+Pete · · Score: 2

    I can't figure out how I would use this to make make a real-world decision. Just picking the "most secure" language overlooks so many other tradeoffs that I just can't see it as a valid approach, especially when the article ends with a call for more testing, not a call to select superior languages.

    This is a non-finding.

  30. That Language Doesn't Exist (Yet) by Anonymous Coward · · Score: 0

    Real-time, embedded safety-critical software needs to be written in a well-specified language. It needs to be compiled and linked in well-validated tools (validated against the well-specified standard). It needs to be verified while executing on a target that was subject to the tools' validation.

    The Ada language has too much conceptual baggage for compiler vendors and application developers to handle.. So, industry uses C, and increasingly C++, to get the work done. MISRA rules attempt to impose sanity, but MISRA rather expresses contempt for these languages. MISRA does not trust the compiler vendors nor the application developers, and the problem starts with the language specifications themselves. Ultimately, MISRA is a shame because it does not provide a means to validate the tools (neither the compilers nor the rules checkers).

    We need a new language, one defined by subject matter experts, one that the industry can and will embrace. That language shall be called, "Blaz" (unwavering protector).

  31. We've already been through this by quietwalker · · Score: 1

    A pretty comprehensive study was done that showed regardless of the language selected, the programs written by developers with the most experience in that language were the the ones with the least security bugs, regardless of traits of the language like attack surfaces or complexity.

    It's short and sweet. A developer's experience with the specific language or framework an application is written in is a better indicator of application security than the language or framework an application is written in.

  32. SQL and amalgamations by istartedi · · Score: 1

    SQL and amalgamations of languages (e.g., JavaScript generated by PHP) not on the list. XSS attacks involve such "mutt" software.

    IMHO, the more code the more opportunities to exploit things. Terse languages to the rescue? Write it all in Haskell, Lisp or something. You'll attract talented developers and the attackers will be like... "Oh crap, we have to analyze that???".

    No silver bullets of course. Something has to be able to read/write sensitive information at some point. Something has to determine under what conditions that occurs. It's human nature to make those conditions complicated to the point where vulnerabilities occur...

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  33. The real cause of Heartbleed by SpaceLifeForm · · Score: 1

    Was a new feature that was enabled by default. The heartbeat 'feature' should have been *DISABLED* by default. New features should always be disabled, and then you let the developer decide whether to enable it or not. And then *TEST* it! And *CODE REVIEW* it!

    --
    You are being MICROattacked, from various angles, in a SOFT manner.
  34. PHP IS the worst by nicholas.allevato · · Score: 1

    The fact that the holes exist is what they're talking about.

    1. Re:PHP IS the worst by beelsebob · · Score: 1

      Yes... and as I said, this is completely missing the point. Holes in language implementations can be fixed as they come up. Bugs that are caused because of bad language design, and lack of the language helping the developer hold all the necessary concepts in their head at once, those can not trivially be fixed like language implementation errors. Not only that, but they'll be several orders of magnitude more common.

      An example. A language with a decent type system can completely eliminate SQL injection attacks, and invalid pointer dereferences. A language with a dependant type system can completely eliminate buffer overruns.

      There are huge classes of security holes and bugs that can be prevented from happening entirely by the language.

  35. SQL injection attacks? by Anonymous Coward · · Score: 0

    People are still writing code vulnerable to SQL injection attacks?

    1. Re:SQL injection attacks? by JDG1980 · · Score: 2

      People are still writing code vulnerable to SQL injection attacks?

      Yes, they are. It doesn't help when lots of online tutorials give crappy information, like saying to use mysql_real_escape_string in PHP instead of a proper parameterized query. (Using the escape function is better than nothing, but it's not foolproof and is needlessly convoluted.)

      This tutorial, which ranks first on Google when I search for 'php sql', uses the escape method and does not mention parameterized queries at all. (The correct method is described here.)

  36. Languages and application security? by DTentilhao · · Score: 1

    "A new WhiteHat Security report approaches application security not from the standpoint of what risks exist on sites and applications once they have been pushed into production, but rather by examining how the languages themselves perform in the field"

    How about designing a language that can't read/write past a previously allocated buffer in memory.

  37. Just use C or ASM by Murdoch5 · · Score: 1

    Do the work yourself and make your programs secure. C und ASM are Still the kings of the hill and always will be.

  38. Need More Prolog Programmers! by Anonymous Coward · · Score: 0

    The headline sez it all!

  39. What a mess by Anonymous Coward · · Score: 0

    Perl is more popular than Ruby and Python? ColdFusion is more popular than Ruby or Python? Seriously?

    All but two of the languages had their first major release in the 1995 to 1996 time frame, according to Wikipedia. Of those released during that two-year period, two (PHP and ColdFusion) are "legacy" based on being "decades old", and two (ASP and Java) are "new".

    Dot NET is "a language". Of course, that language is clearly J#, which means that really all those .NET statistics should be applied to Java, right?

    ASP is different from .NET. Which it is--in one form. That ASP is not "legacy", despite being just as old as two of the three "legacy" languages, and despite being the only language studied which is actually deprecated upstream.

    And the guy who ran the study was surprised to learn that older, more mature technologies were more secure. Well, "older". (Or "secure"--why the scare quotes were added in the article is a mystery.)

    I think this study says more about WhiteHat Security than about any of the languages supposedly studied.

  40. Fine. Lets see a better language by russotto · · Score: 1

    If you don't like C++ (and who does?) or C, what DO you suggest as a systems programming language?

    Rule 1: If it runs under a VM, it's out
    Rule 2: If it requires a garbage collector, it's out.
    Rule 3: COBOL and FORTRAN are out too.

  41. Not a matter of language by Anonymous Coward · · Score: 0

    Security is not a matter of language but of design. Some languages might make that easier than others. But focusing on the language only is like saying: "Let's invent new shapes for our letters so we can write better books."

  42. Re:Fine. Lets see a better language by Anonymous Coward · · Score: 0
  43. Re:Fine. Lets see a better language by theweatherelectric · · Score: 1

    Use Rust. It's not at version 1.0 yet but it's promising. See some comments on Rust's benefits for security. And some blog posts by Andrew Ruef and Patrick Walton.

  44. Gaah. secworld.php by Anonymous Coward · · Score: 0

    'nuff said!

  45. I use bash because it's inherently more secure by Gunstick · · Score: 1

    what bash?
    yes sure. just stay away from eval
    I'm currently checking if other constructs from bash are prone to execution or information disclosure. Came across 'declare' which may have an issue.
    Of course, SQL injections are possible, because SQL is not bash.

    --
    Atari rules... ermm... ruled.
  46. More generally... by countach · · Score: 1

    its pretty much the case that programming languages in which it is harder to make bugs are also harder to make security problems. Because security problems are just a special case of bugs. So all the things we know about writing better languages are important for security. Unfortunately, language technology has always been under-appreciated. People will just use what is popular, which often times is just C or Java and so forth.

  47. Yes, we mean ASP classic. by john_p_peach · · Score: 1

    Yes, we mean ASP classic.

  48. You missed the point by john_p_peach · · Score: 1

    Small point but the data was the median not the mean. The metric should not be used to evaluate individual sites. The idea was to determine if there in a inherit difference between the different languages and how they are used in the real world. Are PHP and Java really much more insecure a programming language?

  49. What is a slot? by john_p_peach · · Score: 1

    The paper says that a slot is basically the bounds on a site. You can think of them as the same but there are some small differences that do not really mean much here.