158 points · by kenjackson · 2y ago · 168 comments
The redhat kernel panics were caused by a bug in the kernel ebpf implementation, likely a regression introduced by a rhel-specific patch. Blaming crowdstrike for this is stupid (just like blaming microsoft for the crowdstrike bsod is stupid).
For background, I also work on a product using eBPFs, and had kernel updates cause kernel panics in my eBPF probes.
In my case, the panic happened because the kernel decided to change an LSM hook interface, adding a new argument in front of the others. When the probe gets loaded, the kernel doesn’t typecheck the arguments, and so doesn’t realise the probe isn’t compatible with the new kernel. When the probe runs, shit happens and you end up with a kernel panic.
eBPF probes causing kernel panics are almost always indication of a kernel bug, not a bug in the ebpf vendor. There are exceptions of course (such as an ebpf denying access to a resource causing pid1 to crash). But they’re very few.
To me this feels like a complicated question - both Linux and Windows organisations are quite good at kernel reliability engineering even though quite different organisational structures and engineering approaches are involved.
Yes "the wrong people were trusted" but I don't see how we can completely solve this with engineering.
They're different because linux promises "eBPF are safe and cannot crash the kernel", and failed to deliver on that, while Microsoft says "drivers are all-powerful and as such must be written with care", and CrowdStrike did not heed this warning.
> Yes "the wrong people were trusted" but I don't see how we can completely solve this with engineering.
I mean, we could solve the "third party software fucks the kernel up" problem easily with engineering: providing userspace APIs to do stuff that currently need kernelspace access. There's no inherent reason security products (or, really, any products) needs to live in the kernel, it's just that there are no APIs to do this job, so security products have to go there. If Microsoft provided a good API doing what the custom drivers currently do, most security products would drop their driver in a heartbeat.
For instance, macOS fixed this exact issue a couple years ago by introducing Endpoint Security Framework, a userspace API that allows watching a bunch of events, and authorizing whether they should be allowed or blocked. It's a well-designed API that should obsolete the need for kernelspace access in security products.
Yeah, it isn't as if crowdstrike was specifically advertising certified support for RedHat Linux and related products.
Obviously OS updates come out a lot more often these days than they used to - but we're also better at test automation than ever before, and beta software is easier to get than ever.
It sure would be nice if companies that decide to produce kernel modules and to support certain OSes could test those kernel modules against those OSes at the beta stage.
But how are they supposed to prevent a bug in a newly released kernel update? You can't test your software on future updates that aren't out yet.
If RHEL breaks some core functionality you depend on, in a newly released update, you can't really do much to prevent breakage, even with the best QA in the world. At best, they could have caught it as soon as RHEL published the new kernel... but by then it's already too late, all your currently-deployed probes now have a ticking time bomb, and need to be updated before the RHEL kernel update is applied, lest you kernel panic.
If say you support a distro, you can’t turn around and complain that supporting the newest version is hard, no matter who caused the problem. Plenty of products say ‘this works on $x but it’s not officially supported’.
Wait, how is this stupid? Unless I'm missing something, wasn't the patch part of a Microsoft payload that included an update to Crowdstrike? Surely Crowdstrike is culpable, but that doesn't completely absolve Microsoft of any responsibility, as its their payload.
What is the point of driver signing if a vendor can basically build in a back door and Microsoft doesn't validate that this back door is at least somewhat reasonable
Backdoors of all kinds can be installed to most any operating system without vendor co-operation. That is the nature of general-purpose operating systems.
Maybe I'm wrong and Microsoft does some QA on drivers before they are signed?
That would be grounds for blacklisting indeed (out of experience). However, that's not the case here, no matter how you put it.
Before you downvote that comment, I'd like to remind everyone that this was already happening. Realtek's driver cert was leaked, and a lot of malware used this cert to sign their drivers for _a decade_ until anything happened about it.
Microsoft's driver signing workflow is utterly pointless and it doesn't mean anything. Any vendor that takes their security serious should never trust those driver signatures.
this comment right here sums it up:
> Sure, but Windows shares some portion of the blame for allowing third-party security vendors to “shit in the kernel”.
This update was buggy and it caused the host machine to go into a BSOD boot loop.
The fact that the host machine happened to be running Windows has very little to nothing to do with it.
It's like blaming a pothole for your car going exploding. Yes there was a pothole, yes it shouldn't have been there, yes it could have been avoided, but the fact that your car self immolated because of mere pothole points to possibly other underlying issues with your car.
Maybe most of these "drivers" shouldn't be in Ring0 to begin with? This is a general problem and the norm, Windows is just another OS that allows this this way.
user-land drivers are a thing, heck they are the standard for modern micro kernel architectures
and even with hybrid kernels pushing part of the code out of the kernel into something like "user land co-processes" is more then doable, now it's now trivial to retrofit in a performant way and flexible way but possible
Mac has somewhat done that (but I don't know the details).
On Linux it's also possible, through with BPF a bit of a in-between hybrid (leaving some parts of the drivers in kernel, but as BPF programs which are much less likely to cause such issues compared to "normal" drivers).
A good example for that is how graphic drivers have developed on Linux, with most code now being in a) the user-land part of the driver and b) on the GPU itself leaving the in kernel part to be mostly just memory management.
And the thing is Windows has not enforced such direction, or even pushed hard for it AFIK, and that is something you can very well blame then for. You in general should not have a complicated config file parser in a kernel driver, that's just a terrible idea, some would say negligent and Windows shouldn't have certified drivers like that. (But then given that CrowdStrike insists that it _must_ be loaded on start (outside of recovery mode) I guess it would still have hung all systems even if the parsing would have been outsourced because it can't start if it can't parse it's config).
Where Microsoft is to blame however is the unrelated Azure outage in the Central US region that happened (and was fixed) just before the CrowdStrike faulty update.
> always indication of a kernel bug and before
but:
> blaming microsoft for the crowdstrike bsod is stupid
and who owns the kernel in windows land? Microsoft. how is it stupid to blame Microsoft for not making kernel safe?
> Missing a check (or precondition, or validation) is squarely on Microsoft.
Missing a check for presence of dynamite before allowing me to start the car is squarely on Volvo!
You see how silly that sounds?
Now, back to being serious: MS cannot possibly control and validate everything you decide to install and run on your system, specially if the things you install are kernel drivers. It is simply impossible. If you install a kernel driver developed by a 3rd party company, and that driver crashes your system because the devs at that company forgot to perform proper validation of data, well... that's on them. Even if MS wanted, they wouldn't be able to verify the soundness of any piece of code that is installed as a driver and runs with kernel level privileges. That'd require solving the halting problem.
AIUI, Microsoft actually has good tooling for validating drivers before they are deployed, but it requires that you actually run the validation...
eBPF is a bytecode that is interpreted in the kernel, with the explicit goal to allow writing code that executes at the kernel-level in a safe way. Any kernel panic (again, short of pid1 kills) is considered a bug, and could even potentially be exploited to gain capabilities in some cases. Here, the kernel explicitly says "this is safe", so any problem within is a bug in the kernel.
In contrast, a kernel module/driver is just some third-party code that is loaded in the kernel. Here, all bets are off: it is up to the third-party to do their job properly and make sure their code is correct.
In this case, CrowdStrike explicitly opted into writing a kernel module, and then failed to, as you say, "handle their null check". The segfault wasn't in Windows code, it was in CrowdStrike code that lives in the kernel. Crowdstrike should have handled their nullcheck, failed, and that will lead to a BSOD.
To be clear: the only way microsoft could make the kernel safer here is by disallowing kernel modules entirely. While there is an argument to be made that this could be a good idea, it is a bit beside the point.
nowadays i work at a place that uses a different solution and guess what: it's also a f-ing cpu (and i/o) hog -- it makes my m1 pro macbook slow to a crawl and there's no way to disable it.
Except where Apple does not allow vendors loose in key places like the kernel. One of the interesting questions here is whether Microsoft could possibly do that: Windows users would be better if the kernel was restricted to first-party code, things like AV used the same kind of interface which macOS has, and third-party code was forced into more moderated channels (malware uses many of the same techniques) – but there’s a security industry with revenue measured in tens of billions of dollars annually who would be running to the regulators if there was anything which could remotely be seen as favoring Defender over their products. I still think it’d be possible but hard enough that I’m not surprised they’ve slowly been letting awareness of the downsides build, especially on the enterprise IT side.
I was wondering whether this debacle might push them to have a roadmap for restricting kernel drivers in favor of the Windows eBPF implementation which has been approaching production grade. Sometimes you need a huge blowup to remove support for the status quo.
Once I got new laptop due to some internal migration, it was blazingly fast. Well, not so much anymore. I literally don't install anything on it since receiving it, I simply can't (unless its just about copying to c: and it runs). Some colleagues have stuff like windows firewall running constantly on 50% cpu, nothing admins can fix apart from replacing ntb.
my zsh config spawns in ~90ms on my macbook air m2 while it takes 600ms in the m1 pro.
I hate all the EDR nonsense on laptops. I wonder if the added cost for lost workhours and electricity wouldn't be more than the tiny chance of catching a malware.
Also, for Linux and especially BSD admins: has this incident affected your perspective on EDR/XDR systems in the kernel? What would you suggest as an alternative to ensure regulatory compliance?
What am I missing?
Edit: I know it is supposed to implement "EDR", but it's always explained in the vaguest of terms.
EDR solutions hook into the kernel to log, and block system calls. They use this information to try and generically identify malware. For example you could detect ransomware by identifying a process that is enumerating a large number of files, reading from those files, and then saving those files.
For a SOC, you can also use an EDR to identify files, hashes, connections to given IPs across your fleet of servers. This can allow you to see what devices have been compromised. The EDR can then isolate them, by blocking network syscalls and allow only the SOC to access to investigate and remediate.
This is the value they provide (or at least claim to) to a cyber team
This is actually the most important thing happening with EDR as a concept, it handles novel cases that have never been seen before, with a human review very quickly. Our csirt has an SLA of 3 minutes.
It's right there in the name acronym. Detection and Response.
In that case are you telling me their pitch is that they detect this behavior, dispatch some human agent from their CSIRT within 3 minutes to remotely but manually come check the binary, dump some strings, do some reverse engineering and track the CC server etc?
"We have magic code that watches everyone's computer and sends it all back to our system, where we apply magic to detect malware and then send the code back to all of your systems and until we can say we have AI, we're going to lie that a human will be able to review this information in 3 minutes.
For example, patching nginx is not going to help if your user gets phished of an suth token that was explicitly supposed to let them run code on the server - bit catching that the code started browsing files elsewhere and sending data out will help you notice the breach.
In reality, that's way too much data for anyone to make sense of, but giant companies spend tens of millions of dollars per year to deploy all the things so they can say they're doing it.
On the other hand, funny things can happen. I got called out by the security team at one job because the EDR agent on my workstation registered that I had put a file on disk that had a malware signature. Well, it turns out that I had checked out the security team's git repo containing malware signatures...
But I did get called out in about 20 minutes by a random security engineer I'd never met who told me the exact path on my PC where the file was. Is that a good thing? I'm not sure.
we have crowdstrike in our usual production environment and i was always against it because i was always afraid of something like what happened. but security department pushed it through because this is something that they understand and can control. "security architecture of product" it's not concept that they understand.
but answering your question, fedramp does requires EDR to be present. according to our fedramp advisors clamav is sufficient for passing audit.
oh the jargon
> We're making progress by the minute
I better hope you do.
But that doesn't seem to be what happened here.
Random idea that I haven't fully thought through: continue to run the kernel at Ring 0 and userland at Ring 3, but move "tools" like this to Ring 1.
And even if it has ring 0 access it can’t really verify anything without secureboot or something like it verifying that nothing else started before it. This is also why Riots anti cheat runs as ring 0 as it has to protect the game against the owner/admin of the machine.
(And after that there is still bios or firmware level exploits)
- apache2 crashed on VM (had not happened in 8 months--our entire tenure at Hetzner
- another VM become entirely unresponsive--would only respond to ping. could not even access via control panel provided console. had to do a reboot. after that, the box seems to be ok.
- we are still waiting on a response to our ticket from Hetzner.
My perspective is that it is a very very poor idea to have an anti-malware solution running on a Linux system. CrowdStrike is very persistent in their sales pitches and do FUD campaigns better than the competition to convinse people with decision making authority that Linux and Containers and what needs an antivirus.
How would you stop, detect and/or remove this threat from this machine on a linux server without antivirus / EDR?
CrowdStrike doesn't remove threats. It would stop the process and quarantine the file. It requires knowledge on how to actually remove the threat beyond the quarantined file.
If we were _really_ serious about endpoint security we'd be pushing business users towards operating systems with more modern security architectures, like Android, iOS or Chrome OS. That would be a lot of work though due to the fact that most legacy software is not compatible with those systems.
No we don't we just have compliance checklists to get through.
I would really hate to be anyone on the team responsible for the Falcon Sensor, right now. I suspect that their printer is churning out CVs, like nobody's business.
> and will update this story if we receive substantial information.
I'll lay odds that there's folks at Crowdstrike that are thinking of just responding with poop emojis.
But they could be right, they may have an issue in their engineering department recently.
---
Speaking of,I wanted to mention a slightly related observation I've had recently scrolling through twitter (unfortunately) looking for information on this crisis. There are a lot of people who at least know enough technical jargon to probably work in IT or technology but they're using arguments like "it must be because of a DEI hire", for those who are unaware they're using "DEI" as a replacement for a hard-r N-word. In other words, I just learned that blatant racists are not a rarity in our corner of the world. If you're not one of them, I wanted to inform you of what they really mean. Fortunately I haven't seen this on HN so far :)
There is a certain type of tech person (well, they probably exist elsewhere, but the tech variety is particularly noisy) who seems absolutely determined to use this one every time a company does something stupid; there seems to be an odd unwillingness to blame _process_, rather than some sort of imagined individual saboteur (who would, preferably, in the minds of these people, be someone other than a straight white man).
A particularly extreme example, to the point that it almost read as parody; when the door plug blew out of that 737, there was a certain amount of fixation by the weirdos on Twitter on how the pilot was a woman. Quite how this was supposed to have anything to do with it was unclear.
The whole thing is pretty weird, and feels quite new. Sometimes, a poorly-run company is just a poorly-run company.
Imagine actually being a minority, woman or any group like that and making a mistake. sucks.
Was it though? Your second paragraph is written in a way that it can easily be interpreted as "all critics of DEI hiring are racists". Is that a more sophisticated statement than "all minorities are incompetent"? Is being a racist the only reason someone might be opposed to quota-based hiring?
It's new because, 10-20 years ago in America at least, it finally became extremely unfashionable to utter blatantly racist stuff in public, to the point where it cost you your friends and maybe your job, depending on who heard it. But then Trump happened, and casual racism became OK again among half the population, like the 50s have returned.
Wherever I've seen diversity initiatives, the point is to expand the hiring pool, not shrink it. In other words this is people who, for whatever reason, want to portray the situation as precisely the opposite of what it is.
Isn't that exactly the problem though: hiring is currently based on race/gender in favor of white/male hard enough that you get interior people from that hiring pool?
Imagine if any minority or woman was involved in any crowdstrike team that had anything to do with this outage and consider how the DEI debate is being raised in that context. If those people are hired, does it make them a DEI hire by default? of course not! that is silly, that's not even what DEI is. It is a slur in this context, nothing short of it.
I wouldn't be saying this if DEI was in any way relevant to the topic at hand, then we can discuss how DEI was to blame. Honestly, I don't even agree with the corporate approach of DEI, but bringing it up in this context would indeed be racism. Imagine making a mistake and someone say "this is what you get for allowing white privilege" is that fair? is that not racism? that's what's happening here. Everyone deserves fair treatment.
Very easily could be one highly technical or just highly resourced individual with a bot farm..
That's what you get if you browse Twitter. Stay off mainstream Twitter for your own sanity.
> Fortunately I haven't seen this on HN so far :)
Here people just blame offshore workers for this bug or other such critical bugs, as if US workers don't make mistakes. Peoples' egos are just unbelievable. If it's not DEI developers, then it must be those filthy foreign programmers from developing nations responsible for poor quality software and I've even seen here mentioned that Windows worldwide dominance also be blamed on SW devs from developing nations for being too poor to own Macs. I despise this "holier than thou" mentality of some privileged tech workers.
Linux has been a viable alternative for decades now for many tasks. This problem wasn't caused by a lack of money. If you want to blame someone for the dominance of Windows, blame corporations and managers, because they're the ones that have chosen it. SW devs from developing nations have only been doing what they perceived to be in their best economic interest.
For decades?! Maybe on the servers, but on PCs, hardly. Also, even if that may be the case now, it doesn't change the fact that at your job they'll most likely use Windows not Linux on the workstations. Linux is king on the servers, but PCs everywhere will mostly still be Windows, especially in corporate environments.
Of course, white people making mistakes is unheard of.
Yeah it's quite frustrating how easily people latch on to the daily meme if it reinforces their preexisting prejudices.
Republicans calling Kamala Harris the DEI candidate in 3, 2, 1...
I'm curious about what you mean though, if you have any sample threads.
How many Linux machines did crash a few days ago? How many Windows machines did crash a few days ago? Case closed.
Btw - The article mentions Dave Plummer's analysis of the issue which might be easier for people to understand and worth a watch. - https://www.youtube.com/watch?v=wAzEJxOo1ts
Like, this is not new. They, as an industry, have been a byword for shoddy nonsense for literally decades.
And as security tools break a lot of security norms - like sandboxing, least privilege, and running in userspace - you might think such enthusiasts would make sure they were coded with the utmost care. That this team of secure coding all-stars would be code reviewing, managing scope, fuzz testing, static analysing, formally validating and suchlike, as befits code running with the highest privilege levels.
Surely huge multinational corporations wouldn't grant unlimited privileges to kernel modules written by clowns.... would they?
If you believe the crowdstrike marketing, I can see how you might think shadowy saboteurs are the only plausible explanation.
Eh, I mean, you might think that, absent any other information about the industry, but they're largely not.
After all, who exactly would benefit from such a nefarious scheme to crash windows computers? Certainly not Crowdstrike.
State Actors, given the current Geo-Political tensions.
You have to take a all-in-all broader view. I remember a while ago Kaspersky was accused of data-siphoning/spying from computers it was installed on and other nefarious activities. See New Government Ban on Kaspersky Would Prevent Company from Updating Malware Signatures in U.S. - https://www.zetter-zeroday.com/new-government-ban-on-kaspers...
As for your opening statement "Some part of a company already aware of an issue but different part still ships is a pretty common tale" is not applicable here since this code runs in kernel mode (in both OSes) and thus would be subject to far far greater scrutiny and testing than an ordinary app. As Dave Plummer points out in his analysis Microsoft Kernel Drivers are signed and certified after an exhaustive testing process. Even if Crowdstrike wrote their drivers as an interpreter and the data update files were actually programs in some p-code, Microsoft would have definitely known of it and its inherent vulnerabilities. I would bet money that Microsoft knows all about preventing threats/vulnerabilities than any other company simply because of their long experience and large userbase and thus would not have allowed Crowdstrike such a free hand.
I love a good conspiracy just like anyone. And i certainly hope the relevant authorities will take a good, deep look at what knocked over the dominoes CrowdStrike set up in a line. But i just don’t see how those state actors would benefit from this. There is damage, both financial and humans harmed, but is that the best a state actor could do? I would have thought they would sync such an action with other measures for maximum impact.
> You have to take a all-in-all broader view.
That is always wise. Can you tell us more? In particular could you spell out how the Kaspersky ban factors in here in your opinion?
> As for your opening statement "Some part of a company already aware of an issue but different part still ships is a pretty common tale" is not applicable here since this code runs in kernel mode (in both OSes) and thus would be subject to far far greater scrutiny and testing than an ordinary app.
Are you saying that this scrutiny is somehow enough to overcome companies natural tendency to be disparate and unorganised?
I disagree. If state actors had this type of capability they would use it to spy on big companies. The espionage potential is huge. They wouldn't waste it on causing a minor inconvinence.
> is not applicable here since this code runs in kernel mode (in both OSes) and thus would be subject to far far greater scrutiny and testing than an ordinary app
Lol. What next? Politicians always tell the truth? Everyone gets a free unicorn? This is just obviously not how the world works. There is a long history of anti-virus software being kind of crap.
Russia or China would certainly benefit from the ability to do this at a time of their choosing, and it's possible they could have an agent inside Crowdstrike, especially given China's history of industrial espionage.
I think russia or china are probably the least likely purpotrators possible. Their incentives strongly disalign with this.
But indeed, this really sounds like it was an internal error.