Slashdot Mirror


Linus Responds To RdRand Petition With Scorn

hypnosec writes "Linus Torvalds, in response to a petition on Change.org to remove RdRand from /dev/random, has lambasted the petitioner by called him ignorant for not understanding the code in the Linux Kernel. Kyle Condon from the UK raised a petition on Change.org to get Linus to remove RdRand from /dev/random in a bid 'to improve the overall security of the linux kernel.' In his response, Torvalds asked Condon and the supporters of the petition to gain an understanding of Linux drivers and cryptography, and then 'come back here and admit to the world that you were wrong.' Torvalds stressed that kernel maintainers knew what they were doing and the petitioner didn't. Torvalds, in a similar outburst just yesterday, hoped that 'ARM SoC hardware designers all die in some incredibly painful accident.' This came in response to a message from Kevin Hilman when he noted that there were quite a few conflicts in the ARM SoC pull request for Linux 3.12 which were a result of the platform changes conflicting with driver changes going in to the V4L tree."

19 of 566 comments (clear)

  1. you have the source by AndroSyn · · Score: 5, Insightful

    You have the source code, remove rdrand from the kernel yourself.

    1. Re:you have the source by Anonymous Coward · · Score: 5, Insightful

      It's not a "cop out" at all. The party that manages the code doesn't want to remove a feature that there's no logical reason to remove. The petition was one sentence, linked to no debate, made no points and didn't even attempt to negotiate. It could have said, "Do it, because we say so." and it would have been just as informative. I think you need to look up the definition of "cop out", because the petition creators could have actually done something useful, and didn't.

    2. Re:you have the source by AndroSyn · · Score: 5, Informative

      It's not as simple as just commenting out a few lines of code.

      No, it's easier than that. You can simply pass nordrand to the kernel. It was the first thing I saw when I opened up
      arch/x86/kernel/cpu/rdrand.c
      __setup("nordrand", x86_rdrand_setup);

      So there...don't like rdrand, don't use it.

      From Documentation/kernel-parameters.txt

                      nordrand [X86] Disable the direct use of the RDRAND
                                                      instruction even if it is supported by the
                                                      processor. RDRAND is still available to user
                                                      space applications.

    3. Re:you have the source by Anonymous Coward · · Score: 5, Insightful

      No, it is not. Being unwilling to do something for yourself, and then demanding that others do it for you, to the point of trying to pressure them with a mass petition, is the most obnoxious cop out.

    4. Re:you have the source by pipatron · · Score: 5, Insightful

      Are you suggesting that the kernel should kill of application in userspace using this instruction? Are there any other instructions you morally object to? Using XOR with a constant is also bad cryptography, perhaps it should be prevented by the kernel.

      --
      c++; /* this makes c bigger but returns the old value */
    5. Re:you have the source by TechyImmigrant · · Score: 5, Informative

      Yes. But I'm not going to give a well researched answer because I'm about to get on a plane.

      Primarily the problem is that the Linux kernel RNG exists in many contexts and trusts that its random sources are random across all those contexts. This has been found to be false. The factorable.net study showing re-used primes between certs created on low-entropy router devices is an example of what can go wrong.

      There are other more detailed things. The pool entropy calculations are flat out wrong. They are less wrong after Peter Anvin submitted a patch to have it do a piecwise approximation to a shannon entropy sum rather than an arithmetic sum, but it's not doing anything like a normal min-entropy computation for an entropy extraction algorithm.

      The kernel trusts userland programs to be honest about the entropy in the sources. E.G. RNGd. However RNGd and other entropy gather daemon's have no basis on which to know the source entropy and so they make it up. The kernel takes this number and uses it in the pool entropy calculation. And so the whole calculation is built on sand.

      The behavior of the kernel results in boot time entropy starvation, right at the point where you need it most.

      This is RdRand changes the picture somewhat. The entropy source is well modeled and its min entropy is know. The resulting entropy from the condition is therefore known. The entropy seeding the DRBG is therefore know. It is therefore known how to extract full entropy output from RdRand, and it is known what the cryptographic resistance to brute for attack is (which is not quite the same thing). Such a chain of reasoning is what a good RNG should have.

      You are better off using RdRand because it's available from the first instruction executed. It has known properties and the resulting numbers are not subject to the timing, memory API attacks that the kernel RNG numbers are subject to on the long winding path from device to RNGd to kernel API to kernel RNG to /dev/random to userland library to userland application.
       

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    6. Re:you have the source by tytso · · Score: 5, Insightful

      The random driver has changed significantly since July 2012, which is we were given a heads up about the paper described at http://factorable.net/ which is also when I took back maintainership of the /dev/random driver. We gather entropy at every single interrupt, and mix it into the entropy pool. This is done unconditionally, you can't disable it, like what happened with the SA_SAMPLE_RANDOM flag.

      The thing about entropy pools is that when you combine entropy sources, the result gets better, not worse. So the best thing would be if we had hardware random number generators sourced from China, Russia, and the USA. Since presumably the MSS, KGB, and the NSA mutually distrust each other, if we combine the entropy from those three soruces, the result will be stronger than any one alone.

      This is why I don't recommend using RDRAND directly. Sure, an honest (emphasis on honest) hardware random number geneterator will always be able to source higher quality entropy than anything we can do by sampling OS events, such as interrupts. But the problem is it's hard to guarantee that a HWRNG is really honest. Especially given the Snowden revelations which seem to indicate the NSA has successfully leaned on at least one chip manufacturer. If you must use RDRAND, I'd recommend generating a random key via some other means, and then encrypting the output of RDRAND by that random key before use the resulting randomness for session keys, etc. Or better yet, do what we do in /dev/random, which is to mix RDRAND with other sources of entropy.

  2. Got your feelings hurt? by Splab · · Score: 5, Insightful

    The TFA makes it look like Linus went on full rampage mode and tore a insightful request down by being mean.

    Actually reading his responses, Linus is pretty level headed and just says no, you can't have this.

    Guess submitter got his feelings hurt?

  3. Re:Negotiation Skills by Goaway · · Score: 5, Interesting

    There was no negotiation going on. There was a single obnoxious guy calling Linux "an approved partner of the NSA" and complaining about something he knew nothing about. He deserved what he got. In fact, Linus went pretty easy on him.

  4. Re:At Least He Doesn't Throw Chairs by Goaway · · Score: 5, Insightful

    No, the guy who made the petition was way out of line for calling Linux "an approved partner of the NSA", and way out of his depth because he had no idea what the hell he was talking about.

    Linus was just responding to an asshat, and went pretty easy on him.

  5. Randomness not so random by schneidafunk · · Score: 5, Insightful

    I have to admit I didn't know much about the controversy so I went and found some articles.

    Here is an article showing some weaknesses in Linux's random generation: Analysis of the Linux Random Number Generator

    As reported by Bruce Schneier for this Wired article: http://www.wired.com/politics/security/commentary/securitymatters/2007/11/securitymatters_1115

    --
    Some people die at 25 and aren't buried until 75. -Benjamin Franklin
  6. A petition? by macemoneta · · Score: 5, Insightful

    If you believe there's something broken in the kernel (or other open source project), you don't create a petition, you create and submit a patch. If you don't know enough or don't have the skills to create a patch, you're probably not qualified to criticize the implementation.

    "Anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that 'my ignorance is just as good as your knowledge." -- Isaac Asimov

    --

    Can You Say Linux? I Knew That You Could.

  7. Excuses, excuses, excuses ! by Taco+Cowboy · · Score: 5, Insightful

    Maintaining your own kernel tree over time is most certainly non-trivial by most peoples standards

    Some people just had to complain about every-single-thing, even if it's downright inane.

    Open source is just that, you can read the source of the programs, and with the source, you have the options to do the following :

    1. Determine if the program has any backdoor / malware embedded

    2. Change/alter the source to your own liking

    3. Learn from the code and perhaps in a latter day you might be able to apply what you have learned in your own program (and I am not talking about cut and paste)

    If all the above are STILL not good enough for you, the offerings from Apple and Microsoft are always available.

    --
    Muchas Gracias, Señor Edward Snowden !
    1. Re:Excuses, excuses, excuses ! by fritsd · · Score: 5, Insightful
      Hey, you forgot an important one:
      • 4. PAY ME to make a kernel package for you that has this RDRAND thingy turned off.
      --
      To be, or not to be: isn't that quite logical, Slashdot Beta?
    2. Re:Excuses, excuses, excuses ! by vux984 · · Score: 5, Interesting

      Open source is just that, you can read the source of the programs

      I believe the suspicion is the RDRAND cpu instruction itself is a black box from intel that may have been subverted by the NSA.

      As such, no, it can't be audited, and it's source cannot be inspected.

  8. Re:Why all the whining in the first place? by Spad · · Score: 5, Insightful

    It's getting increasingly difficult to label people tinfoil hatters given the way the NSA leaks are making even the most ardent paranoid conspiracy theorists look like they've vastly underestimated the problem.

  9. Re:At Least He Doesn't Throw Chairs by oztiks · · Score: 5, Insightful

    I'm with you on that. It seems like his sense of humour and his calling "a spade a spade" philosophy earns him a lot of criticism. I always argue that Linus is your typical purest. He's not there to please or appease. He's there to focus on getting things done right, in his own way, but as correct as he sees it.

    I argue that because he's giving Linux freely to the world and with limited monetary gain that we can't chastise him too much about it either. What he's missing is something which I've learned through my own errors when dealing with people in the past. And that is, to deal with "the public" one must always do so with the softest possible touch. That's only if you're wanting to earn the minds of the masses mind you.

    So I say. People who bag him with the whole "his attitude is appalling" type statements. Well, it sucks to be you because I think that you're just too much of a sook and you need to harden/lighten up a little. The people who condone the attitude I say "meh, you're probably a purest as well" because they wish to understand truth and wish to see what goes on in the Linus' mind just as I do.

    As me for me. Truth be told. The day Linus actually starts acting like the rest of the PR sheep out there is the day I'd start to worry about crypto that NSA may of sneaked in to the Linux kernel. Until then. It's good to see him throwing out comments like "Deep throat Microsoft" and "You're ignorant". This kind of talk is indicative of when the internet wasn't populated by commercially driven cock suckers like Mark Zuckerberg abusing the word "hacker" and trying to pass himself off as "one of us".

    So at the end of the day, who's really lost touch here?

  10. Re:At Least He Doesn't Throw Chairs by oztiks · · Score: 5, Informative

    He didn't create anything. ANYTHING. Open source existed before Torvalds. UNIX existed before Torvalds. To use the infamous battle cry of the typical Slashdork... "Where's teh innovationz?!?!?111!!?"

    I've been using Linux since 1993. I can't even begin to tell you how wrong you are :) Oh the memories ... 14.4 modems, 386 DX!! (yes, none of those pussy SX processors), Hercules monitors and MFM harddisks!

    When people start treating it like a valid technology instead of a religious movement it'll get more momentum in the mainstream.

    You're missing the point. It's not treated as a religious movement It's kind of more like being a 60s child in the modern day if that makes sense.

    When people start worrying about advancing Linux over where it stands versus Microsoft or Apple it'll finally have the chance of taking great leaps forward.

    Google wrapped a business model around Linux. It's called Android and it's doing just fine.

  11. Here's your debate by Okian+Warrior · · Score: 5, Insightful

    It's not a "cop out" at all. The party that manages the code doesn't want to remove a feature that there's no logical reason to remove. The petition was one sentence, linked to no debate, made no points and didn't even attempt to negotiate. It could have said, "Do it, because we say so." and it would have been just as informative. I think you need to look up the definition of "cop out", because the petition creators could have actually done something useful, and didn't.

    Okay then, lets fix this.

    The NSA has compromised products and devices in the design phase - both software and hardware. We don't know which products are compromised or how, but we do know that some are.

    Random number generators cannot be verified - it's a computationally infeasible problem. If the NSA has subtly tampered with a product, there's no way to tell from the outside looking in. You *might* be able to tell by looking at the generator source. (Note that the linux random number generator has at least one undocumented source of entropy.)

    There is no reasonable way to look at the source code/microcode of the rdrand instruction.

    Additionally, there is no way to verify the underlying source of randomness of the rdrand instruction. There could be vulnerabilities on the silicon die.

    The whole point of open source is that people can peek at the software and see what's going on.

    Since there is no way to inspect the random number generator and no way to verify it's operation, it should not be used by default.

    It's a security risk, plain and simple, and risk management should be up to the user. However small the risk is, forcing everyone to take it multiplies the chance that someone will get burned by it.

    Here's your logical argument. If Linus wants to debate this, let him address these issues. Linus needs to show the premises wrong, or that the conclusion doesn't follow from the premises.

    If he can't, then he should abide by the recommendation.