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

At IBM, Workers 'Expire' Early ("Next Step" is 'Voluntary' Layoffs Decades Before Retirement Age)
It seems like the "new normal" is layoffs not existing or barely existing because companies hide them
Bluetooth and Wi-Fi on Gym Equipment Can Endanger Several Parties
Joy oh joy! Give us more "smart" things
Microsoft Silent Layoffs This Month (PIPs and More "Buyouts", Driving Out the Workforce), According to Insiders
They know it's happening because they see it and fellow workers talk about it, even if the media keeps mum
Omarchy is Already Dying
Same as the life cycle of slopfarms
A Vortex of Beacons (or "Bluetooth Everywhere" Vision)
If someone (or someones) calls you paranoid for taking about "beacon"-like functionality, there will be no lack of authoritative citations (e.g. Web links) they can be provided to prove them wrong
 
What I Learned in London
some ministers still help us in our fight for press freedom in the UK
EPO "Cocaine Communication Manager" - Part XVI - The German State Does Not Enforce the Law Against European Patent Office Officials
It's not acceptable that Europe's second-largest institution can get away with crime time and time again
Germany's National Broadcaster (DW English) to Air Julian Assange Film This Coming Week
It seems rather sad that we live in a world where rich thugs can get away with so many horrible things
WordPress is Bloatware and Bloated Software Guarantees Security Incidents
This site turns 20 in about 11 or 12 weeks from now and it was never cracked, not even when it ran WordPress
Too Many Chiefs (or Chefs) at IBM, They Don't Know How to Run a Company (With a 100+ Year or Century-Old Brand Recognition Advantage)
It seems like a consensus opinion; some line managers or middle managers are too selfish or self-deceiving
Clacton's Election Was a 'Show Election'
At least some people squeezed out some "free press" out of this charade [...] That the media kept boosting parodies as the alternative/s to the bigot is a topic we wrote about a great deal over the past 3 weeks
Windows is Burning
Windows is the "burning platform" of the year
Gemini Links 15/08/2026: Stress, Jetlag, and GPU Hype (Waste of Energy for Amusement, Fake 'Currencies', and Now for Mass Plagiarism)
Links for the day
Links 15/08/2026: XBox Rotting Further, "France’s Top Court Strikes Down Ban on Social Media for Children"
Links for the day
SLAPP Censorship - Part 150 Out of 200: Always Independently Verify What People Claim to Be (or Find Yourself in a Jason Arday-Type Moment/Dilemma)
I'm not a cardiologist and Garrett was never a security expert
Links 15/08/2026: "There Is No A.I." (Slop Plagiarism Isn't Intelligence) and Its "Impact on the Environment Is Absolutely Horrifying"
Links for the day
Gemini Links 15/08/2026: Gratitudes, "Microflier" Drones, and Literate Programming
Links for the day
IBM's PIPs and RAs (Layoffs) Going on, Interns as 'Scabs'
It seems like a consensus (also in Reddit, we took a quick look)
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, August 14, 2026
IRC logs for Friday, August 14, 2026
Gemini Links 14/08/2026: Slower Internet, Logging Off Made Easy, and Human Code
Links for the day
Links 14/08/2026: "Mystery of Dark Oxygen", People Despise Slop, and Backlash Grows Against Fake Currencies (Energy-Wasting Scam Like Slop)
Links for the day
Free Publicity
They say there's no such thing as "bad press" or that every publicity is good publicity, sometimes free publicity
Farage's fears, media hijacked by-election, what really happened in Clacton
Reprinted with permission from Daniel Pocock
It's Friday. A Ton of People Departing From IBM and Red Hat.
A mere subset of people who announce this in public at Microsoft's LinkedIn
GNU/Linux and ChromeOS Beyond 11%
Combined with ChromeOS, it's already past and beyond 11%
Chatbots/LLMs Are the Next "Clown Computing", Pure Hype, a Serious Mistake
Programs that scan text and emit something similar (but full of errors)
Links 14/08/2026: Slop 'Music' Causing Problems, Slop Data Centre Contractor Unpaid (Massive Debt), and The Cyber Show Says We're "Colonised By Wankers"
Links for the day
Fake Growth of Social Control Media is Misleading
nowadays people look for alternatives - ones not controlled by MElon, CPC, and Kapo-Berg
statCounter: Windows Down to All-Time Low of 25%, Android Leads the Pack, GNU/Linux About to Leapfrog Apple, Overtaking MacOS
The situation was very different in past years
Microsoft's Mass Layoffs (Including 'Voluntary' Secret Layoffs) Take Their Toll on Seattle
How much longer can they hide their crises?
Planet Fedora ("Fedora People") is Just IBM Staff, Former IBM Staff, and LLM Slop
this is what Fedora boils down to now
Explanation of What Will Happen to Red Hat (and Other Acquired Companies) After August
In short, a lot will be scuttled; history shows it happens over and over again
SLAPP Censorship - Part 149 Out of 200: It Took a Long Time to Show What Jason Arday (at Cambridge) and Harvey Weinstein (in Hollywood) Really Were
Really bad when society endures abuse because the abusers silence their exposers
Gemini Links 14/08/2026: 32-bit RISC-V and BlackBerry
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, August 13, 2026
IRC logs for Thursday, August 13, 2026
'Voluntary' Layoffs (a Form of Silent Layoffs): Microsoft Global Voluntary Separation Agreement (GVSA) in August 2026 and September 2026
Today and yesterday
Microsoft Sees Windows on Fire, Pours Gasoline Over It
The latest move from Microsoft defies logic
Racing Towards "Woman Zero"
They don't seem to value women
The Legacy of Gerstner (Rapid Destruction) Continues at IBM
They say IBM never recovered from Gerstner, who instead of saving the companies (IBM and others he claims credit for) set up a collision course of rapid shrinkage
Counters in Clacton Commence in 3 Hours at Clacton Leisure Centre
Even a few hundreds of votes for Pocock would be considered a great success
Swiss army to attack 2,900 domain name owners? Cult of ETH Zurich & Debian
Reprinted with permission from Daniel Pocock
IBM's Bluewashing of Confluent Carries on, More Layoffs Coming, Same Likely Applicable to Red Hat
September 30 is a day before this next phase of bluewashing at Red Hat
Headlines About Microsoft and Ransomware, But They're "SPONSORED FEATURES" at The Register MS
The Register MS habitually publishes LLM slop too
Links 13/08/2026: K-pop Suicide Due to Social Control Media, Legal Problems for Facebook Over Safety
Links for the day
'Cancel Culture' Isn't About Empathy, It's About Making Good People Homeless
Seeing what they did to RMS, remember that those "concern trolls" are about everything other than ethics and morals
Daniel Pocock in The Nerve
Lots of publicity owning to the enrollment
Why Support Daniel Pocock
Our readers who come from IBM and the EPO are certainly familiar with the tactics of censorship and what that sort of censorship leads to
SLAPP Censorship - Part 148 Out of 200: The Manosphere
Those people don't just threaten our national sovereignty, press, democracy etc. They also endanger women everywhere.
Gemini Links 13/08/2026: Health, Partial Eclipse Sketches, and Guilelessness
Links for the day
GNU/Linux Reaches 10% "Market Share" in statCounter
As of this morning
15% of IBM Marked for Potential Termination, PIPs are the "New Layoffs" (or RAs) at IBM
IBM is a dying company, but it does not want the press to say this or for people to understand that
Links 13/08/2026: "The Rise of the Measles-Industrial Complex" and Spotify Curbs Slop
Links for the day
Daniel Pocock on Australia's 9News (Nine Entertainment)
This gives visibility to software and technology issues
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, August 12, 2026
IRC logs for Wednesday, August 12, 2026