EditorsAbout the SiteComes vs. MicrosoftUsing This Web SiteSite ArchivesCredibility IndexOOXMLOpenDocumentPatentsNovellNews DigestSite NewsRSS

10.16.13

Linux Backdoors Revisited (New Revelations and Old Revelations)

Posted in GNU/Linux, Kernel, Security at 10:43 am by Dr. Roy Schestowitz

Claude Elwood Shannon, the man who introduced entropy

Claude Elwood Shannon

Summary: An anonymous backdooring attempt against Linux goes a decade back, but a randomisation problem in today’s Linux also seems possible (subverting encryption)

Jonathan Allen wrote this article about an incident mentioned also by Freedom to Tinker. Slashdot’s summary goes like this, documenting news from one decade ago:

“Ed Felton writes about an incident, in 2003, in which someone tried to backdoor the Linux kernel. Back in 2003 Linux used BitKeeper to store the master copy of the Linux source code. If a developer wanted to propose a modification to the Linux code, they would submit their proposed change, and it would go through an organized approval process to decide whether the change would be accepted into the master code. But some people didn’t like BitKeeper, so a second copy of the source code was kept in CVS. On November 5, 2003, Larry McAvoy noticed that there was a code change in the CVS copy that did not have a pointer to a record of approval. Investigation showed that the change had never been approved and, stranger yet, that this change did not appear in the primary BitKeeper repository at all. Further investigation determined that someone had apparently broken in electronically to the CVS server and inserted a small change to wait4: ‘if ((options == (__WCLONE|__WALL)) && (current->uid = 0)) …’ A casual reading makes it look like innocuous error-checking code, but a careful reader would notice that, near the end of the first line, it said ‘= 0′ rather than ‘== 0′ so the effect of this code is to give root privileges to any piece of software that called wait4 in a particular way that is supposed to be invalid. In other words it’s a classic backdoor. We don’t know who it was that made the attempt—and we probably never will. But the attempt didn’t work, because the Linux team was careful enough to notice that that this code was in the CVS repository without having gone through the normal approval process. ‘Could this have been an NSA attack? Maybe. But there were many others who had the skill and motivation to carry out this attack,’ writes Felton. ‘Unless somebody confesses, or a smoking-gun document turns up, we’ll never know.’”

Backdoors in Linux are a subject for jokes in Torvalds' mind, but given the above we should take this subject very seriously. In any system, for example, having no mechanism for randomness (like in some embedded devices) typically means that strong encryption (with high entropy) is not possible. Given new alleged “insecurities in the Linux /dev/random,” as Bruce Schneier put it, Linux backdoors seem possible again. David Benfell said:

I’m guessing Schneier knows what the fuck he’s talking about. If it is the same vulnerability, then Torvalds’ defense is that the vulnerable source of entropy is only one of many. But if I read Schneier correctly, the result was still too predictable.

“On the other hand,” says Benfell, “here’s Theodore T’so from the comments:”

So I’m the maintainer for Linux’s /dev/random driver. I’ve only had a chance to look at the paper very quickly, and I will at it more closely when I have more time, but what the authors of this paper seem to be worried about is not even close to the top of my list in terms of things I’m worried about.

First of all, the paper is incorrect in some minor details; the most significant error is its (untrue) claim that we stop gathering entropy when the entropy estimate for a given entropy pool is “full”. Before July 2012, we went into a trickle mode where we only took in 1 in 096 values. Since then, the main way that we gather entropy, which is via add_interrupt_randomness(), has no such limit. This means that we will continue to collect entropy even if the input pool is apparently “full”.

This is critical, because *secondly* their hypothetical attacks presume certain input distributions which have an incorrect entropy estimate —| that is, either zero actual entropy but a high entropy estimate, or a high entropy, but a low entropy estimate. There has been no attempt by the paper’s authors to determine whether the entropy gathered by Linux meets either of their hypothetical models, and in fact in the “Linux Pseudorandom Number Generator Revisited”[1], the analysis showed that our entropy estimator was actually pretty good, given the real-life inputs that we are able to obtain from an actual running Linux system.

[1]http://eprint.iacr.org/2012/251.pdf

The main thing which I am much more worried about is that on various embedded systems, which do not have a fine-grained clock, and which is reading from flash which has a much more deterministic timing for their operations, is that when userspace tries to generate long-term public keys immediately after the machine is taken out of the box and plugged in, that there isn’t a sufficient amount of entropy, and since most userspace applications use /dev/urandom since they don’t want to block, that they end up with keys that aren’t very random. We had some really serious problems with this, which was written up in the “Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices” [2]paper, and the changes made in July 2012 were specifically designed to address these worries.

[2]https://www.factorable.net/paper.html

However, it may be that on certain systems, in particular ARM and MIPS based systems, where a long-term public key is generated very shortly after the first power-on, that there’s enough randomness that the techniques used in [2]would not find any problems, but that might be not enough randomness to prevent our friends in Fort Meade from being able to brute force guess the possible public-private key pairs.

Speaking more generally, I’m a bit dubious about academic analysis which are primarily worried about recovering from the exposure of the state of the random pool. In practice, if the bad guy can grab the state of random pool, they probably have enough privileged access that they can do many more entertaining things, such as grabbing the user’s passphrase or their long-term private key. Trying to preserve the amount of entropy in the pool, and making sure that we can extract as much uncertainty from the system as possible, are much higher priority things to worry about.

That’s not to say that I might not make changes to /dev/random in reaction to academic analysis; I’ve made changes in reaction to [2], and I have changes queued for the next major kernel release up to make some changes to address concerns raised in [1]. However, protection against artificially constructed attacks is not the only thing which I am worried about. Things like making sure we have adequate entropy collection on all platforms, especially embedded ones, and adding some conservatism just in case SHA isn’t a perfect random function are some of the other things which I am trying to balance as we make changes to /dev/random.

T’so, who is the former CTO of the Linux Foundation, at least acknowledges the possibility that there is a real issue here.

Share this post: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • co.mments
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • NewsVine
  • Print
  • Technorati
  • TwitThis
  • Facebook

If you liked this post, consider subscribing to the RSS feed or join us now at the IRC channels.

Pages that cross-reference this one

What Else is New


  1. With UPC Dead for Battistelli's Entire Remaining Term, No Reason for the EPO or the Administrative Council to Keep Battistelli Around

    Thoughts about what happens to the EPO's leadership after 'Brexit' (British exit from the EU), which severely undermines Battistelli's biggest project that he habitually used to justify his incredible abuses



  2. Links 24/6/2016: Xen Project 4.7, Cinnamon 3.0.6

    Links for the day



  3. Benoît Battistelli Should Resign in Light of New Leak of Decision in His Vendetta Against Truth-Telling Judge (Updated)

    Benoît Battistelli continues to break the EPO's own rules, not just national laws, as a new decision helps reveal



  4. Fake Patents on Software From Fake Australian 'Inventor' of Bitcoin and the Globally-Contagious Nature of EPO Patent Scope

    News from Australia regarding software patents that should not be granted and how patent lawyers from Australia rely on European patent law (EPO and UK-IPO) for guidance on patent scope



  5. Patent Lawyers Love (and Amplify) Halo and Enfish, Omit or Dismiss Cuozzo and Alice

    By misinterpreting the current situation with respect to software patents and misusing terms like "innovation" patent lawyers and others in the patent microcosm hope to convince the public (or potential clients) that nothing in effect has changed and software patents are all fine and dandy



  6. Looks Increasingly Plausible That Battistelli is Covering up Bogus and/or Illegally-Obtained 'Evidence' From the EPO's Investigative Unit

    Why we believe that Benoît Battistelli is growingly desperate to hide evidence of rogue evidence-collecting operations which eventually landed himself -- not the accused -- in a catastrophic situation that can force his resignation



  7. As Decision on the UK's EU Status Looms, EPO Deep in a Crisis of Patent Quality

    Chaotic situation at the EPO and potential changes in the UK cause a great deal of debate about the UPC, which threatens to put the whole or Europe at the mercy of patent trolls from abroad



  8. Another Demonstration by European Patent Office (EPO) Staff on Same Day as Administrative Council's Meeting

    SUEPO (staff union of the EPO) continues to organise staff actions against extraordinary injustice by Benoît Battistelli and his flunkies whom he gave top positions at the EPO



  9. Links 23/6/2016: Red Hat Results, Randa Stories

    Links for the day



  10. Interview With FOSSForce/All Things Free Tech

    New interview with Robin "Roblimo" Miller on behalf of FOSSForce



  11. Links 22/6/2016: PulseAudio 9.0, GNOME 3.21.3 Released

    Links for the day



  12. IP Europe's UPC Lobbying and the EPO Connection

    The loose but seemingly ever-growing connections between AstroTurfing groups like IP Europe (pretending to represent SMEs) and EPO staff which is lobbying-centric



  13. EPO “Recruitment of Brits is Down by 80%”

    Letter says that “recruitment of Brits is down by 80%” and "the EPO lost 7% of UK staff in one year"



  14. The Conspiracy of Patent Lawyers for UPC and Battistelli's Role in Preparing by Firing People

    The parasitic firms that lobby for the UPC and actually create it -- firms like those that pass money to Battistelli's EPO -- are doing exactly the opposite of what Europe needs



  15. Patent Lawyers, Having Lost Much of the Battle for Software Patents in the US, Resort to Harmful Measures and Spin

    A quick glance at how patent lawyers and their lobbyists/advocates have reacted to the latest decision from the US Supreme Court (Justice Breyer)



  16. Links 21/6/2016: Fedora 24 and Point Linux MATE 3.2 Officially Released

    Links for the day



  17. Supreme Court on Cuozzo v Lee Another Major Loss for Software Patents in the United States

    Much-anticipated decision on the Cuozzo v Lee case (at the highest possible level) serves to defend the appeal boards which are eliminating software patents by the thousands



  18. As Alice Turns Two, Bilski Blog Says 36,000 (Software) Patent Applications Have Been Rejected Thanks to It

    A look back at the legacy of Alice v CLS Bank and how it contributed to the demise of software patents in the United States, the birthplace of software patents



  19. EPO Self-Censorship by IP Kat or Just Censorship of Opinions That IP Kat Does Not Share/Accept (Updated)

    ree speech when it's needed the most (EPO scandals) needs to be respected; or why IP Kat shoots itself in the foot and helps the EPO's management by 'sanitising' comments



  20. Caricature: Bygmalion Patent Office

    The latest cartoon regarding Battistelli's European Patent Office



  21. Links 21/6/2016: GNU/Linux in China's HPC, Linux 4.7 RC4

    Links for the day



  22. Under Battistelli's Regime the EPO is a Lawless, Dark Place

    How the EPO's Investigative Unit (IU) and Control Risks Group (CRG), which is connected to the Stasi through Desa, made the EPO virtually indistinguishable from East Germany (coat of arms/emblem above)



  23. New Paper Demonstrates That Unitary Patent (UPC) is Little More Than a Conspiracy of Patent 'Professionals' and Their Self Interest

    Dr. Ingve Björn Stjerna's latest paper explains that the UPC “expert teams” are in fact not experts but people who are using the UPC as a Trojan horse by which to promote their business interests and corporate objectives



  24. Money Flying to Private Companies Without Tenders at Battistelli's EPO (by the Tens of Millions!)

    Extravagant and cushy contracts to the tune of tens of millions of Euros are being issued without public scrutiny and without opportunities to competition (few corporations easily score cushy EPO contracts while illusion of tendering persists -- for small jobs only)



  25. Patent Examiners and Insiders Acknowledge Profound Demise in Patent Quality Under Battistelli

    By lowering the quality of patents granted by the European Patent Office Battistelli hopes to create an illusion of success, where success is not measured properly and is assessed by biased firms which he finances



  26. Jericho Systems Threatens Alice, Court of Appeals for the Federal Circuit Threatens the Patent Trial and Appeal (PTAB)

    A look at the two latest threats to those who helped put an end to a lot of (if not most) software patents in the US



  27. How the Halo Electronics Case Helps Patent Trolls and How Publications Funded by Patent Trolls (IAM for Instance) Covered This

    A Supreme Court ruling on patents, its implications for software patent trolls, and how media that is promoting software patents and patent trolls covered it



  28. Patent Lawyers' Fantasy Land Where Software Patents Are Suddenly Resurrected Even When They're Not

    A quick glance at where the debate over software patents in the United States stands and how profiteers (such as patent lawyers) not only mislead the public but also bully the messengers



  29. Links 19/6/2016: Randa Over, Fedora 24 Release Soon

    Links for the day



  30. [ES] La Oficina Europea de Patentes de Battistelli Amplia su Contrato con el Nefasto FTI Consulting Para Neutralizar a los Medios, Desperdicia Millones de Euros

    Sacando a luz a lo que pasa con el presupuésto de la EPO y como es puesto “a trabajar” bajo la tiranía sin precedente de Battistelli (Eponia) justo en el corazón de Europa


CoPilotCo

RSS 64x64RSS Feed: subscribe to the RSS feed for regular updates

Home iconSite Wiki: You can improve this site by helping the extension of the site's content

Home iconSite Home: Background about the site and some key features in the front page

Chat iconIRC Channel: Come and chat with us in real time

CoPilotCo

Recent Posts