Bonum Certa Men Certa

Linux Backdoors Revisited (New Revelations and Old Revelations)

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.

Recent Techrights' Posts

SLAPP Censorship - Part 90 Out of 200: When Efforts to Silence His Spouse and Also the Wife of a Blogger in Another Continent Only Give More Exposure to Embarrassing Information
The Garrett trial ended in October 2025
Links 27/05/2026: TSMC Workers Next to Consider Strikes, Ceasefire Cracking
Links for the day
 
"LLMs Are Not Much More Than Plagiarism Engines"
the impact of LLMs on communities and software projects
Is Slop Profitable Yet? No.
Everything is a giant minus
Bob (Robert) Cringely Has Just Explained That After 3 Years of Hard Work It Became Apparent LLM Slop is Unfit for Purpose in Courts
Added moments ago to Daily Links
Links 28/05/2026: LibreSSL 4.3.2, "Jeff Bezos Is Afraid Of What Comes Next", Measles Making a Comeback
Links for the day
PCs That Are Made to 'Expire' and 'Secure' Boot Contributing to Planned Obsolescence
People who are responsible for this ought to be held accountable
Evil, Faceless Corporation: Google Steals Money From You If You Don't Purchase an Android Device for MFA
At this point, under the guise of "hey hi" (slop) Google is firing tens of thousands of workers
People Go Back to Basics, Abandon Microsoft's GitHub to Avoid Slop
The media didn't pay any attention to GitHub's de facto chief quitting Microsoft only a few months ago
IBM - Much Like the European Patent Office (EPO) - Gives the President (Head of Board and CEO) All the Money While Staff Drowns in High Inflation Rates
They're discussing the same sort of thing we often see mentioned in the EPO
"THE REGISTER EXPLAINER" as "Paid-for SPAM" at The Register MS With "AI" 40 Times in the Short Page
What will be left of The Register MS in a few years?
2025: EPO President Campinos Breaks the Cookie Jar, Steals Another Million Euros While His "Brother-in-Law" Does Cocaine at the Office and Staff Prepares Rolling, Indefinite Strikes
any additional month of Campinos in charge of the EPO is a liability not just to the EPO but the EU as well
Gemini Links 28/05/2026: Dumping Microsoft GitHub, Gopher Rabbit Hole
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, May 27, 2026
IRC logs for Wednesday, May 27, 2026
SLAPP Censorship - Part 89 Out of 200: SRA Admits Malfunction, That's Why Transparency is Paramount
There have been more efforts than we can to count or can enumerate (probably over 100 such efforts) to gag us and to prevent us writing about what has happened
Our Free Software Activist in Connecticut (USA)
We'll soon revisit the latest round of legislation on "age" (surveillance, ID)
Links 27/05/2026: Living Without 'Smartphoones' and "Russia’s Biggest Attack on Ukraine in 18 Months"
Links for the day
Gemini Links 27/05/2026: The USA as an "Experiment" and Some Ubuntu Manuals
Links for the day
[Video] Full Video of Richard Stallman's Talk in Rome
It seems inevitable that the official GNU site will have it
Slop is a Passing Fad, It's About Faking Productivity (Plagiarism, Misinformation, and False Positives)
Slop is a bubble. Some people accept it later than others.
Anderon - Like Kyndryl - Could be Far Deeper in Debt Than Its Alleged Worth (Vapourware)
Time will tell, but it seems like a Federal-enabled (by the Federal Government) accounting scam, nothing more, nothing less
The Media That Keeps Covering "AI" Because the Pushers of It Pay for Spam
23 times in the page they mention "AI"
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, May 26, 2026
IRC logs for Tuesday, May 26, 2026
Codecs and Software Patents - Part XI - The Stance of RMS (Dr. Stallman) Reassured GNU Regarding AV1
cautioned against software patents since the early 90s if not earlier
Google: We Are Locking You Out of Your Account (Since 15+ Years Ago) Because You Don't Have a Spyphone We Remotely Control
Google (GAFAM) is an evil company deep in debt
Red Hat: Bluewashing by IBM, Followed by RAs (Layoffs)
We could use some hints or evidence related to this
Gemini Links 26/05/2026: A Year of Composting, Fedora Bricks Itself and Infuriates Users With Slop and Wayland (Not What Users Want, What IBM Wants), Crawlers on Geminispace a Nuisance
Links for the day
Links 26/05/2026: "Making the Digital Physical"; "The Medical System Abandons Women When They Are Most Vulnerable"
Links for the day
While US Government Greenlights (or Bluelights) Bailouts for IBM Some Foreign Governments Blacklist It
"Albany leadership doesn’t know what they are doing but are damn good at pretending they do."
Good Thing When Home Appliances Are Ancient Antiques
dealing with the alarm has cost only time
The Bloating of the Web Contributes to Global Warming and Causes Burnout (Slowdown, Hardware Erosion, Waste)
This problem isn't limited to weather sites or subsites
IBM Bailouts and the IBM People Inside the Administration
It seems possible/plausible that it is bailout money down the drain or that this money will never arrive at all
Links 26/05/2026: Lithium Batteries Causing Fires (Even on Planes), 'Timmy' the Whale Dies
Links for the day
Why It's Ludicrous to Call Us "Microsoft Haters"
Even if clustered together, news items still cover a broad spectrum (or spectra) of issues
Pursuing Facts in an Age of Lies and 'Hallucinations' (Falsehoods Without Anyone Accountable, They Try Calling Computer-Generated Lies or Forgeries "Intelligence").
Our aim is to relay information while bypassing gossip networks like social control media and slop in "search" clothing
Computer-Generated Legal Filings Get You Reported to the Solicitors Regulation Authority (SRA)
We'll write a lot more about this in the future
EPO "Cocaine Communication Manager" - Part XII - In the Second-Largest Institution in Europe One Can Take Paid 'Sick Leave' for Doing Cocaine, Then Come Back
Cocaine addicts in the management were bullying colleagues. They're still in charge.
Sites in Their Twenties
We currently run concurrently a handful of series and have a lot more in the backlog
SLAPP Censorship - Part 88 Out of 200: Brett Wilson LLP is Defaming Trans People in America Because Garrett Pays Hired Guns to Silence Them
Garrett is scoring many own goals this year
Sloppy "Resource Action," (RA) or IBM Layoff, Leads to Another IBM Lawsuit, Alleging IBM Tries to Pass Liability to Algorithms
IBM is meanwhile resorting to slop to gaslight its remaining shareholders
The Latest IBM Layoff Rumours
What has happened to the company that invented so much of modern computing?
Holy See Recognises the Threat of GAFAM and Slop
Will the Holy See move away from GAFAM?
The Old Ways of Computing Were Objectively Better
Not as fast, but certainly much better
Social Control Media is a Giant Waste of Time (and There Are No Future Remedies for This)
Social Control Media is considered unhealthy to young people, but it is also collectively unhealthy to nations and nation-building
Codecs and Software Patents - Part X - Florian Müller Still Muddying the Waters for FOSS, Using Software Patents
Some things never change...
Gemini Links 26/05/2026: Slop Bug Reports and Crawlers Considered Evil
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, May 25, 2026
IRC logs for Monday, May 25, 2026