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. The EPO's Race to the Bottom in Recruitment and Early Retirements Explained by an Insider

    The European Patent Office under Battistelli is failing to attract -- and certainly failing to retain -- talented examiners



  2. Wouter Pors and Other UPC Boosters Believe That Repeating the Lies Will Potentially Make Them Truths

    The lobbying campaign for UPC, or hopeful lies (sometimes mere rumours) disguised as "news", continues to rely on false perceptions that the UPC is just a matter of time and may actually materialise this year



  3. The Patent Trial and Appeal Board (PTAB) is Utilised in Fixing the US Patent System and the Patent Microcosm Loses Its Mind

    A roundup of PTAB news, ranging from attacks on the legitimacy of PTAB to progress which is made by PTAB, undoing decades of overpatenting



  4. The Patent Trial and Appeal Board (PTAB) and the Federal Circuit (CAFC) Take on Patents Pertaining to Business Methods

    Patents on tasks that can be performed using pen and paper (so-called 'business methods', just like algorithms) and oughtn't be patent-eligible may be the next casualty of the America Invents Act (AIA)



  5. Google's Stewardship of GNU/Linux (Android, Chromebooks and More) in Doubt After Company Resorts to Patent 'First Strikes'

    Google has just turned a little more evil, by essentially using patents as a weapon against the competition (by no means a defensive move)



  6. Links 24/2/2017: Ubuntu 17.04 Beta, OpenBSD Foundation Nets $573,000 in Donations

    Links for the day



  7. IAM, Greased up by the EPO, Continues Lobbying by Shaming Tactics for the UPC, Under the Guise of 'News'

    The shrill and well-paid writers of IAM are still at it, promoting the Unitary Patent (UPC) at every opportunity and every turn



  8. Patent Scope Gone Awry: European Vegetable Patents Office?

    In its misguided race to raise so-called 'production', the EPO lost sight of its original goals and now facilitates patent royalty payments/taxation for naturally-recurring items of nature



  9. Yes, There is Definitely Brain Drain (Experience Deficit) at the European Patent Office and Stakeholders Feel It

    The direction that the European Patent Office has taken under Battistelli undoes many decades (almost half a century) of reputation-building and progress and naturally this repels existing staff, not to mention hampers recruitment efforts



  10. The Sickness of the EPO – Part IV: Cruel Management That Deliberately Attacks the Sick and the Weak

    The dysphoric reality at the European Patent Office, which is becoming like a large cell (with bolted-down windows) where people are controlled by fear and scapegoats are selected to perpetuate this atmosphere of terror and maintain demand (or workload) for the Investigative Stasi



  11. Links 23/2/2017: Qt 5.9 Alpha, First SHA1 Collision

    Links for the day



  12. UPC Roundup: War on the Appeal Boards, British Motion Against the UPC, Fröhlinger Recalled, and Fake News About Spain

    Taking stock of some of the latest attempts to shove the Unitary Patent (UPC) down Europe's throat, courtesy of Team Battistelli and Team UPC



  13. The Sickness of the EPO – Part III: Invalidity and Suicides

    An explanation of what drives a lot of EPO veterans to depression and sometimes even suicide



  14. The Appeal Board (PTAB) and Federal Circuit (CAFC) Maintain Good Pace of Patent Elimination Where Scope Was Exceeded

    The Court of Appeals for the Federal Circuit (CAFC) continues to accept about 4 out of 5 decisions of the Patent Trial and Appeal Board (PTAB) and the US Supreme Court (SCOTUS) refuses to intervene



  15. Software Patents Are Ebbing Away, But the “Swamp” Fights Back and Hijacks the Word “Fix”

    The club of patent maximalists, or those who profit from excess prosecution and legal chaos, isn't liking what has happened in the United States and it wants everything reversed



  16. Report From Yesterday's Debate About the European Patent Office (EPO) at the Bavarian Landtag

    A report of the EPO debate which took place at the Bavarian Landtag yesterday (21/2/2017)



  17. Links 22/2/2017: Wine-Staging 2.2, Nautilus 3.24

    Links for the day



  18. French Politician Richard Yung Tells the Government About Abuses at the European Patent Office (EPO)

    The subject of EPO scandals has once again landed in French politics, just a couple of months since it last happened



  19. The Sickness of the EPO – Part II: Background Information and Insights

    With a privatised, in-house (sometimes outsourced and for-profit) force for surveillance, policing, justice, public relations and now medical assessment (mere vassals or marionettes of the management) the EPO serves to show that it has become indistinguishable from North Korea, where the Supreme Leader gets to control every single aspect (absolutely no separation of powers)



  20. EPO Cartoon/Caricature by KrewinkelKrijst

    A new rendition by Dutch cartoonist and illustrator KrewinkelKrijst



  21. Inverting Narratives: IAM 'Magazine' Paints Massive Patent Bully Microsoft (Preying on the Weak) as a Defender of the Powerless

    Selective coverage and deliberate misinterpretation of Microsoft's tactics (patent settlement under threat, disguised as "pre-installation of some of the US company’s software products") as seen in IAM almost every week these days



  22. The Sickness of the EPO – Part I: Motivation for New Series of Articles

    An introduction or prelude to a long series of upcoming posts, whose purpose is to show governance by coercion, pressure, retribution and tribalism rather than professional relationship between human beings at the European Patent Office (EPO)



  23. Insensitivity at the EPO’s Management – Part VII: EPO Hypocrisy on Cancer and Lack of Feedback to and From ECPC

    The European Cancer Patient Coalition (ECPC), which calls itself "the largest European cancer patients' umbrella organisation," fails to fulfill its duties, says a source of ours, and the EPO makes things even worse



  24. Links 21/2/2017: KDE Plasma 5.9.2 in Chakra GNU/Linux, pfSense 2.3.3

    Links for the day



  25. EPO Caricature: Battistelli's Wall

    Battistelli's solution to everything at the EPO is exclusion and barriers



  26. The 'New' Microsoft is Still Acting Like a Dangerous Cult in an Effort to Hijack and/or Undermine All Free/Open Source Software

    In an effort to combat any large deployment of non-Microsoft software, the company goes personal and attempts to overthrow even management that is not receptive to Microsoft's agenda



  27. PTAB Petitioned to Help Against Patent Troll InfoGation Corp., Which Goes After Linux/Android OEMs in China

    A new example of software patents against Free software, or trolls against companies that are distributing freedom-respecting software from a country where these patents are not even potent (they don't exist there)



  28. Links 20/2/2017: Linux 4.10, LineageOS Milestone

    Links for the day



  29. No, Doing Mathematical Operations on a Processor Does Not Make Algorithms Patent-Eligible

    Old and familiar tricks -- a method for tricking examiners into the idea that algorithms are actual machines -- are being peddled by Watchtroll again



  30. Paid-for UPC Proponent, IAM 'Magazine', Debunked on UPC Again

    The impact of the corrupted (by EPO money) media goes further than one might expect and even 'borrows' out-of-date news in order to promote the UPC


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