Slashdot Mirror


Multiple Security Holes In Ruby 1.8, 1.9

ruphus13 notes a six-pack of serious vulnerabilities discovered in Ruby by a member of Apple's security team, Drew Yao. Patches are linked from the ruby-lang.org advisory. "With the following vulnerabilities, an attacker can lead to denial of service condition or execute arbitrary code... These vulnerabilities are likely to crop up in just about any average ruby web application. And by 'crop up' I mean 'crop up exploitable from trivial user-specified parameters.' It's not hard to begin imagining cases where Ruby/Rails programmers use code similar to the samples above to routinely handle user input."

20 of 148 comments (clear)

  1. Re:The real story by JeremyGNJ · · Score: 3, Insightful

    That's really not the story. The story is how simple the exploits were and yet, how long it took to be discovered.

  2. Re:Confirmation by setagllib · · Score: 3, Insightful

    Then what is? Sun Java and Microsoft .NET have both had long histories of security patches. Python is a lot better but nothing is perfect.

    At least with a Linux Python/Ruby you get the security fix within hours as part of your regular operating system update. With Java you have to download the whole thing again from Sun's site. With .NET you have to wait for patch tuesday or apply a hotfix manually.

    --
    Sam ty sig.
  3. Re:The real story by mccalli · · Score: 4, Insightful

    The real story here is how quickly the bugs were patched. I'd like to see MS respond half as fast to holes in Windows and it's attendant parts and pieces.

    No. The real story here are the security bugs, precisely as described. This isn't cheerleading - to users of Ruby it really doesn't matter how fast some other imagined patch might have come out from another company for a different product. If I'm running Ruby, I need to know that these bugs exist and that patches can be applied for them.

    Drop the us vs them thinking - it doesn't help is pretty much just FUD.

    Cheers,
    Ian

  4. Re:The real story by Anonymous Coward · · Score: 5, Funny

    sooo... open source failed? that's what it sounds like you're saying. beware of pitchfork carrying moderators ;)

  5. Re:Confirmation by larry+bagina · · Score: 4, Interesting

    "Enterprise" means you don't blindly install updates on day 0.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  6. Re:message to staff at Apple HQ by LunarCrisis · · Score: 5, Insightful

    The bugs would have been there even if Apple hadn't found them. Why not thank them for improving the quality of Ruby?

    --
    Mr. Period: Nine is the one that's right by ten!
    Nine: One day I will kill him. Then, I will be Ten.
  7. Re:The real story by CrazedWalrus · · Score: 5, Insightful

    How did open source fail? Someone who wasn't the original author had access to the code and found the bugs. How quickly it's found is a function of how many qualified people are looking at the code. I didn't RTFA, but presumably Drew Yao, a member of the security team, was security auditing the code. This activity would have been much harder to impossible with closed source code.

    I'd say the system worked as advertised here.

  8. Re:The real story by headLITE · · Score: 4, Insightful

    A vulnerability in an open source project was found by a third party doing a security audit of the code. The possibility to validate the source code is exactly what open source proponents claim is the reason for open source being more secure. Everybody can have a go, a thousand pairs of eyes see more than one pair, and all that. Try auditing Visual Basic 6 for comparison.

  9. good news by corbettw · · Score: 4, Funny

    Now it's time to start calling up all those RoR sites and use this to convince them to switch the Django.

    --
    God invented whiskey so the Irish would not rule the world.
  10. Re:Confirmation by /ASCII · · Score: 5, Funny

    No, "Enterprise ready" means they didn't have to deal with that shit on Star Trek.

    --
    Try out fish, the friendly interactive shell.
  11. Re:The real story by moosesocks · · Score: 3, Interesting

    Try auditing Visual Basic 6 for comparison. I don't need to see the source to know that VB6 is completely insecure. The documentation is more than sufficient to prove that the entire language was fundamentally flawed.
    --
    -- If you try to fail and succeed, which have you done? - Uli's moose
  12. Re:The real story by Anonymous Coward · · Score: 5, Insightful

    How did open source fail? Someone who wasn't the original author had access to the code and found the bugs. How quickly it's found is a function of how many qualified people are looking at the code. I'd say the system worked as advertised here.
    Slight correction -- it's a function of how many qualified and honest people are looking at the code. Now, the skilled but dishonest Russian hacking cartels had a financial incentive to look through the code for security problems; comparatively few security researchers had financial incentives to do so. Are you really sure this is the first time this bug has been discovered? Or just the first time by nice cooperative people who don't exploit it and keep it secret?
  13. Someone had to say... by Hognoxious · · Score: 4, Funny

    Ruby - it's the new PHP.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  14. Funny how open source always wins... by Anonymous Coward · · Score: 5, Insightful

    Case 1: the code has no bugs: "many eyes make for shallow bugs!" everyone chants.

    Case 2: the code has bugs which get reported and fixed. "See, this would have taken much longer if the source was closed!" This claim is impossible to verify objectively but is stated as a fact, regardless of how trivial the bugs are.

  15. Re:message to staff at Apple HQ by UnknowingFool · · Score: 4, Insightful

    Apple finds serious bugs in Ruby. They tell the Ruby developers. Ruby developers issue patches. That's not sensational.

    MS finds a bug in Safari. They tell everyone not to use Safari. I see slight differences. :P

    --
    Well, there's spam egg sausage and spam, that's not got much spam in it.
  16. Re:The real story by CrazedWalrus · · Score: 3, Insightful

    I didn't say anything about Microsoft. Obviously there are, but the source is much more difficult to obtain. If the source can't be obtained, auditors must use more difficult types of testing, or just hope that the vendor did their job correctly.

    My only point was that Apple would have a much more difficult time auditing, say, Office for Mac, than they would with Ruby due to the requirement for source code agreements or using more arcane methods like blackbox testing or disassembly. The same applies to Photoshop, Flash, or any other 3rd party closed-source app.

    The victory here is that Ruby was improved by a 3rd party who had ready access to the source. When the source is available, this will happen much more often than when it's not.

  17. Re:Goes to show ... by Etherized · · Score: 3, Insightful

    Keep in mind that ruby and PHP are essentially contemporaries - they've both been in real use for over a decade. By most measures, one would think of them as being "mature" technologies, and yet we still see bugs like this crop up in both languages. I think it just goes to show - while selecting a "mature" technology has its advantages, it will not make you immune to problems.

    For what it's worth, this appears to be a flaw in the official ruby interpreter. That's a big deal, of course, but just so you know: most people who speak the praises of ruby are talking about the structure of the language, not necessarily the implementation of the interpreter itself. There are alternate implementations of the ruby interpreter that are generally considered to be "better" than Matz's in many ways.

  18. Re:Confirmation by Idaho · · Score: 3, Insightful

    Granted, ruby is supposed to do it, but I mean, seriously - are kids these days so spoiled by JavaScript and VB that this kind of error is a surprise and the biggest bug ever?

    1. If the interpreter is supposed to do it, except it then turns out it actually doesn't (or doesn't do it correctly), then yes.
    2. If the problem occurs in something that is a part of the language itself, or at least part of its standard library/built-in types, or, however you want to define it, if it is in the set of stuff that everyone who has the language installed has installed, and the functionality is used in pretty much any program ever written in the language, then yes.

    So, yes.

    --
    Every expression is true, for a given value of 'true'
  19. Re:Goes to show ... by smallpaul · · Score: 3, Insightful

    So, um, how's jPHP and Jython coming along? Would you deploy a real life application on Jython?

    So, um, how's jPHP and Jython coming along? Would you deploy a real life application on Jython?

    Go team. Rah! Rah! Rah! YEAH!!!!

    But I have two questions:

    1. What does the relative merit of Jython versus Jruby have to do with the price of tea in China? Are you moving your apps from the buggy MRI to JRuby this week to avoid these security holes?

    2. What evidence do you have that Jruby is more appropriate for "real life applications" than Jython? I know people who have deployed real life applications on Jython since before the first checkin of JRuby. For example, Websphere ships with Jython.

    http://wiki.python.org/jython/JythonUsers

    Ruby has some real advantages over Python. But if you don't know them, don't just make stuff up.

  20. Re:Goes to show ... by SanityInAnarchy · · Score: 3, Insightful

    This, IMHO, goes to show that Ruby isn't any better at security than the other Open Source interpreted languages. Fixed that for you.

    And it never claimed to be. I don't know anyone who uses Ruby because it's more secure. Everyone I know who uses Ruby does so because of the beautiful syntax, pervasive OO, and other things that make it nicer to program in.

    far less mature then, let's say, Python or PHP. Oh, really?

    And again, it's not the security. I'm willing to risk having to patch my interpreter like this once in awhile, if it means I'm able to

    Keep in mind, this vulnerability is so far only a DoS, and won't necessarily affect most installations. Most people run multiple interpreters serving a single site, each load-balanced to. Knock out one and it'll be restarted, while the other continues to serve content.

    Which brings us to your next point...

    A matured, tested and established mod_ruby, unicode and a few years more in the field is what Ruby needs before I take a look at it. Well, let's see -- Unicode has existed, albeit not great, for quite awhile. 1.9 has had Unicode strings from the beginning.

    mod_ruby -- you do realize pretty much no one in the Ruby world uses Apache, right? It's all mongrels and nginx... But if you must, there's Passenger.

    a few years more in the field is what Ruby needs before I take a look at it. Obviously, you really haven't taken a look at it.
    --
    Don't thank God, thank a doctor!