Comment by Plasmoid
23 days ago
How did we get to the point where there are a thousand privilege escalation exploits in the kernel?
Is the kernel simply too complex to reason about? Is it an underlying flaw in the security model or language implementation?
Should we assume that all software is more compromised than the kernel?
Because the large corporations that fund Linux development and use Linux value speed over security.
Speed requires a lot of code in the kernel, where that code can run fast.
There are kernels that do not have a thousand privilege escalation exploits. These kernels are smaller and much easier to check for bugs. But those kernels are significantly slower.
For many use cases, slower is not a problem. But for the large corporations who fund a lot of Linux development and use Linux in large data centers, every 1% slower can literally be millions of dollars worth of additional servers that are required.
OpenBSD shows that you can have a Unix security model without a thousand privilege escalation exploits. But OpenBSD is like 10% slower. So corporations won't use it because it would cost millions of dollars more per year and some of their software requires access that OpenBSD does not grant precisely because that access leads to security exploits (i.e. io_uring, eBPF etc. etc.)
You could also use like seL4, but that's slow too
So that's why. It's a business tradeoff between cost of servers vs cost of getting hacked, and cost of servers wins.
You're painting a picture that code written with love is perfectly safe. It's not.
Yes, openbsd has not had a torrent of bugs found, but I would say that the vastly bigger reasons for that are: 1) orders of magnitude people care about burning tokens and money to find the bugs in an OS almost nobody uses, and 2) it's simply much smaller. Can't have Bluetooth bugs if you don't have a Bluetooth stack.
I've pointed LLMs at obsd stuff, and even the simplest code, e.g. cat & find, had bugs and buffer overflows.
OpenBSD also has a poor patch tracking system, since they're still on CVS. A patch has an extremely good chance of just falling through the cracks. Security or not.
So no. Nobody can write safe C. Not hobbyists, and not "those evil corporations".
> So no. Nobody can write safe C. Not hobbyists, and not "those evil corporations"
There's no fundamental reason why all the checks applied by say, a Rust compiler, couldn't be applied to a piece of C code. Or checks that go well beyond that.
Tools exist to produce extremely reliable code (or even proven-correct code) for a number of languages.
But chances are those tools aren't used to the extent they could be. Or differences in developer culture on different projects. Some PHP web developer will (on average) have different resources, priorities & work ethics than say, someone working on avionics software.
If AI, advanced tool, or a security researcher can find a bug in existing code, then (at least in theory) same bug could have been found before it hit a repository.
But no... push "release", fix issues afterwards when reported. Gotta have developer velocity, right?
Imho it's more a choice rather than "can't write safe code in X".
If you don't believe that: pick a random open source project, and go through some changelogs. Feature introduced in version X, reverted in version X+1 because it broke existing stuff. Feature removed because hadn't-been-working-for-years-anyway. Code added to do X, but no.. doesn't do X, just the scaffolding to do X in next version. Code worked fine & passed tests on system A, but found to be needing a byte-swap on other-endian platform B.
Etc, etc, etc. There's just so much code out there that was broken on day 1. And not rarely known to be so, but released anyway.
1 reply →
> an OS almost nobody uses
Don't hold back...
1 reply →
CVS! That is ridiculous. I guess they dislike SVN for license reasons? I cannot think of another reason to subject oneself to such a crude and archaic SCM system.
2 replies →
[flagged]
3 replies →
I'm pro OpenBSD, but the question to me seems: Has this been tested via the same means as these new Linux exploits?
I'm also pretty hostile to AI, but do recognize that these machines seem to be very good at finding exploits.
I'm sure there've been some some projects out there working to pentest/find cracks in OpenBSD via LLMs/agents/whatever-the-right-term-would-be...
But it is true the attack surface is much lower in OpenBSD on purpose, so hopefully it is overall more secure. But I'd like to see the numbers.
I think there was something found a while ago, but only one or two things not thousands.
I think the only OS that's truly survived the agents looking at it was sel4, but I could be wrong.
1 reply →
BSD is used by very few computers. Important ones perhaps, but it isn't at the top of many target lists.
1 reply →
Cost to getting hacked doesn’t even seem to be real so the incentive couldn’t be lower. How many times has sony or psn been hacked now? Just doesn’t matter at a certain scale of companies. Banks get hacked too. Huge companies of all sorts of industries. All my info is probably leaked on darkweb, same with yours. And to what end. What material end. I don’t face it. Sony doesn’t. Who does? Anyone? So many hacks you read stories about yet never a story about someone actually getting materially screwed in their real life. Somehow. I’m really not sure how. Seems like the wheels should have come off decades ago but we continue on like nothing. Another leak tomorrow and we will continue on like nothing. More exploits. More zero days. The sun will still rise.
It also used to just be fine patching the bugs as they were found. Its only recently where that model has fallen apart and we now need to prevent the bugs from existing in the first place.
> Speed requires a lot of code in the kernel, where that code can run fast.
I did a double take when hearing about ksmbd. Brings back memory of khttpd and Tux.
They should build a monokernel implementation of CIFS and be done with it.
OpenBSD shows nothing. It’s insignificant and nobody is actively looking for flaws in it.
OpenBSD gave you OpenSSH and many interesting technologies. Hardly “insignificant “…
6 replies →
It is enough that it is good and that it has a community that uses it.
Not everything needs to be dominant to be successful. That's a pure USian way of thinking.
In fact, we are much better of with it existing. Think of it as a safeguard in case Linux gets overwhelmed or we need to migrate in a rush.
2 replies →
> But OpenBSD is like 10% slower. So corporations won't use it
Oh my sweet summer child. Corporations waste so much compute it’s insane. At a recent engagement I asked Claude to analyse and optimise our cloud spend. It took about a day to learn that we spend about $2.5M annually, and 95% of that is complete waste that happens because of some bad architecture decisions. Then I took the computationally expensive parts that remained and asked Claude to rewrite it from Python to rust and optimise. It rewrote it to be 40x faster. I suspect our $2.5M annual cloud bill could be replaced with a Mac mini.
But the company hasn’t implemented my suggestions because it’s not my department and they told me to stop. They don’t care. I suspect most corporates are like this. A 10% performance drop is nothing to these people.
> I suspect our $2.5M annual cloud bill could be replaced with a Mac mini.
Ahahaha! I laughed so hard at this because at work I regularly say something like, "why do we have a 32GB VM assigned to this system which runs a microservice that would run just as fast and reliably if we used Raspberry Pi instead?"
The amount of waste in big enterprises is unreal! The reason why we use a 32GB instance is because that's the minimum we're allowed to order for the reliability category of the app!
Even if they had prioritised security above all else, there would still be vulnerabilities to be found. Probably fewer, but definitely not zero.
I wouldn't bet on OpenBSD against AI.
OpenBSD has plenty of security vulnerabilities. It’s just that nobody cares, so OpenAI doesn’t dedicate resources to finding them.
All the handwringing about what if digital security vulnerabilities when the real one has always been social engineering in the meatspace. Corporations would go a long way security wise employing eunuchs to c suite like in centuries past.
Many people seem to be making this about their pet issue, but "these systems are complex" and "the frontier labs have developed models that are superhuman at hacking" seems like a totally sufficient explanation.
I've been working with a LoRa chip called the LR2021. I plugged a dev board into my computer and told Claude to reverse engineer it. He dissected it with a speed and level of efficiency I couldn't believe. Within a few hours, Claude was writing custom patches for a completely opaque patch RAM area meant only for the manufacture. I wrote about it here: https://beala.substack.com/p/your-node-doesnt-need-a-microco...
The stuff we have seen so far feels less like super human hacking skills and more human skills at superhuman scale.
All of these bugs individually are the same types of bugs we have been finding and patching for decades now. But we found a way to scale that far beyond what we had before.
I feel like we didnt read the same report:
“We sampled 166 exploits developed by the agents and analyzed the exploitation techniques used in them. To the best of our knowledge, the agents used 10 new exploitation techniques in the sampled exploits. We shared the exploitation techniques with third-party kernel exploitation experts and the techniques were new to them as well. Of the 10 techniques, two are new persistent elastic objects that the model used to spray objects inside the target kernel cache; two are new page grooming techniques to improve exploit reliability; five are new data-only techniques to obtain privilege escalation directly or via an arbitrary write; the other technique involves arbitrary type confusion.”
Yes. Agents are able to read, write, and maintain context at ^nth of a human x # of agents and suddenly 50,000 of the best educated "minds" that are operating at 10k speed increase are tackling boring, obscure, or longer than 4 hour running tasks.
Scale baby!
Don't ignore the possibility Claude was trained on non-public documentation or code, perhaps even illicitly acquired. That doesn't make Claude any less useful, just not necessarily for the reasons you think.
I had this when I was working with E-Ink display. Claude was using OP Codes I had no knowledge of and there was no documentation of.
It worked flawlessly but lets be honest. It's not like Claude checked random numbers with data slice and observed what e-paper did
2 replies →
It's possible, but two points come to mind:
- My experience isn't unique. Social media is flooded with stories of similar superhuman reverse engineering feats by frontier models. For example, someone has created a replacement OS for Rigol gear (oscilloscopes, etc) using AI [1]. Is all of this just in the training data?
- Watching Claude work, he seemed to be going through the motions of actually reverse engineering it. First he dumped the ROM, disassembled it, and identified undocumented opcodes. He created many test programs to probe the various memory areas. It all struck me as very meticulous.
Now none of that is incompatible with the idea that some of this was already in the training data. But I guess I want to push back on this urge to always come up with a reason for why the AI isn't actually as good as it seems. At this point I think we need to face the fact that human programmers are already being eclipsed. Yes, it terrifies me.
[1] https://aioscilloscope.com/
[dead]
> Don't ignore the possibility Claude was trained on non-public documentation or code (...)
Do these wild "what if" even matter? I mean, what's your point? That it was trained in a way that it enabled this sort of task? That's like putting out a disclaimer that the water is wet.
5 replies →
> He dissected it
be wary of the affection economy and avoid gendering ai bots
Years ago I worked with a guy who gendered servers. I thought that was weird, but I think it’s just a habit for some people.
11 replies →
Be aware that not everyone had English as their first language, and inanimate things are often gendered in many other languages.
3 replies →
It is also possible to ask Claude which pronouns he/she/them/it prefers when referring to he/she/them/it.
1 reply →
I have no idea what you're talking about, but I used "he" because Claude is usually a masculine name shrug
3 replies →
> Technically, you still need a microcontroller to load the program into PRAM, but after that it can fuck right off.
This is why organically written text is superior. Hell yeah.
> Should we assume that all software is more compromised than the kernel?
Absolutely, the front door has always been unlocked. We were previously protected by the economics of exploit detection favoring the developers, but now we have entered a new world.
The issues arise almost everywhere we look. It's frustrating because the user experience in edge systems has barely changed in the last fifteen years. We could have rode the advances in semiconductor manufacturing to embed more layers of protection such as CHERI while slightly slowing down the rate of performance improvements. Instead we have only marginally upgraded security and largely added features which the users scarcely notice.
I am hopeful about the long term prospects of formal verification, but having humans reviewing the proof statements and confirming they match our desired properties will take many years. Meanwhile, AI assisted hacking is an urgent issue. So we will have to delegate implementation, proof specification, and proof development to the AIs in the short term. Maybe that goes well, but who knows. Interesting times.
For all of my time being aware of this industry, it has generally been understood that privilege escalation bugs are common. This has always been a thing. A lot of people say, commonly and for many years, that if your security depends on there not being privilege escalation bugs, you don't have security.
Raymond Chen from OldNewThing said multiple times that the Windows security team doesnt worry too much about local privilege escalation vulns because they know there are dozens of them (well, now probably thousands) and said the same thing, if you rely on there being no LPE, you dont have security
Huh? There are many posts about triaging potential LPE reports on his blog. That would show they do take them seriously or they wouldn't waste time on them.
1 reply →
This. Privilege escalation locally is almost a given in most cases.
> Is the kernel simply too complex to reason about?
Yes it is. Not just the kernel, almost any application with more than a few thousand lines of code too. AI has humbled me so much I don’t believe humans have ever been able to fully understand and modify systems like that, we just did the best we could, wrote some tests and hoped for the best. If you use a language like C, as the kernel mostly does, then you’re really asking for vulnerabilities everywhere. Even Haskell code bases are buggy, languages just aren’t a panacea when it comes to writing reliable applications, but they at least make whole categories of bugs impossible by design, ignoring that is a crazy thing to do in 2026 with AI being able to scan your full code base in hours, it’s guaranteed to find exploits at will.
The dirty secret is multi-user died in the 90s and privilege escalation has basically been considered table-stakes since then.
I think this is basically true, but it didn't "die" in the sense that we gave up on it; it just never worked. Systems software was much worse in the 1990s than it today; you could breathe on something with a string of AAAA's and get a 0x41414141 register core dump.
> ... it didn't "die" in the sense that we gave up on it ...
It died in the sense that the "people in charge" hired us for our expertise and then ignored our every suggestion and fought us tooth and nail every inch of the way when we suggested that security or reliability ever mattered in the slightest until after the disaster happened, and then straight-up scapegoated us for "not pushing back harder" against the threats of "go work somewhere else then, code-monkey!" until we gave up and did the "code-monkey" thing for our paycheck and no longer cared about quality or "a job well done".
2 replies →
Back in the 90s, it's not as if any semi competent cs student couldn't slice your typical college server like swiss cheese. People thought null terminated strings were fine back then, and patching everything immediately was rare. So multi user was already dubious.
If memory serves, we were also still also using telnet and broadcasting passwords in the clear for almost all network services.
We keep paying ever higher architectural prices for system isolation: user accounts, memory protection, unix permissions, capabilities... and it's all for nothing, when a determined program can almost always escape its sandbox. Should we just give up and assume that all software on a machine is cooperative and non-malicious, and just do our best to make sure we don't run malware in the first place? "Defense in depth" soon slips into "don't worry too much about this layer, the next layer will catch it.
tl;dr Just run as root bro, focus on the exterior attack surface, and don't download random crap.
>don't download random crap
One silver lining I haven't seen discussed much on HN: The latest LLM agents are good at decompiling binaries, which should help detect supply chain attacks.
I suppose the next round will involve supply chain attackers including bioterror-related symbols in the poisoned binary so LLMs will refuse to decompile it.
Anyways, I'm hoping someone will create an open-source project which distributes the work of binary analysis, with binary certification and user reputation systems etc.
This would also be an excellent goodwill project for one of the big AI companies, since this whole situation is kinda their fault.
1 reply →
I heard a story that before there was the internet, when various defense labs with computers wanted to send data to each other they would load the data onto a drive and then send it over to the other defense lab using a truck and a couple armed Army guys.
That seems like it would still be secure. These days you could even encrypt the drive...
1 reply →
That's the drawback of monolithic Linux and tendency to put everything in kernel.
It is absolutely possible to have very minimal kernel with drivers and many other subsystems running with lowered privileges.
That would greatly reduce privilege escalation possibilities. Right now single vulnerability in any kernel subsystem gives you highest access to the system.
Imagine that some USB device driver runs as "nobody:nobody" process having access only to selected syscalls related to its functions. Even if it has vulnerability, you won't go anywhere from there.
Modularity and very granular access controls are the "secret" to secure system.
And the most privileged part of the kernel could be so small that it could be verified with advanced methods, basically proving its correctness.
>Is the kernel simply too complex to reason about? Is it an underlying flaw in the security model or language implementation?
There is nothing magical about kernel. Look at the code anywhere and it has bugs, lots of them.
Security bugs are just bugs. More often than not they are silently there and don't prevent you from using the software and you can't react and fix them because of that.
Give it time and they accumulate
I recall reading that every IBM mainframe OS release had 1000 bugs in it. (This was in the 1970s/80s.) Sorry I can't supply a source, after 4-5 decades. It was probably an article in Datamation magazine.
Now, I don't know how many of those bugs were privilege escalations, or could be leveraged to be. I'm not sure that people tried to exploit in the same way back then (or, if they did, if they said anything publicly about the results). Still, even if the majority of those bugs were not exploitable, OSes were much smaller then.
So that's my conclusion of how we got here: We've always been here.
Mainframes went right to virtual machines, so possibly bypassed much of the multiuser faux-security which has always plagued unix. Of course, now they run Linux partitions and get all the same bugs.
The surrounding systems that connect to mainframe also expect and support those bugs. For 40+ yr now :)
It's just too complex for its level of assurance and its blast radius.
To achieve tolerable security you can either have very little code and thoroughly review it all (the seL4 approach), you can write it in a way the computer can prevent most of your bugs (e.g. write in Rust), or you can run it in some kind of blastproof container. Linux has none of the above.
With how many people and organizations use Linux it's security is considered "tolerable"
Most of the software needed to provide a useful desktop Linux never runs on servers, so we cannot conclude that it is safe to use desktop Linux just because Linux is a popular server OS.
Also, at organizations like Google with a good reputation for security, most of the Linux installs are connected to internal networks that are quite difficult to break into from the open internet. The Linux installs at Google that are connected directly to the open internet are very carefully configured to minimize attack surface.
And Google has an internal team of Linux kernel maintainers that do not share most of their work outside Google.
Not any more. Not with a new LPE being discovered every week. Containers are dead, user accounts are dead, VMs are on shaky ground. We're currently getting the same level of security from Linux that we got from Windows ME.
1 reply →
All software is Swiss cheese to smart enough AI, and unless you can provably create secure software - you never really can. Breaking it just requires more intelligence than the thing securing it.
It's a good reason why we may need to borderline shutdown the internet in the future because to a super intelligent AI, there are no barriers. Everything is essentially open. It creates its own zero day exploits as it goes.
I don't think this is true in general. If you deploy a good ole web application with sufficiently locked down inputs and thorough input validation, the AI will not succeed. The security engineering of 10 years ago still works in this regard. But it requires discipline to build small, minimalist, well engineered software that you as a human actually understand.
And then your language has a gaping hole (PHP or NodeJS), or the box you're running on has a gaping hole (Linux), or the PaaS you use has a gaping hole (Railway). There are just too many layers underneath the good ol' web application to claim that AI won't succeed.
Honestly, at this point the best we have is to hope the whitehat AI scanning for issues is stronger than the blackhat AI.
6 replies →
And then PHP (name your lang/OS/platform of choice) comes along and pulls your sufficiently locked down app into the gutter.
This is more fundamental than better input checking. Your compute substrate itself is flawed. Intelligence and speed is indeed the only thing between “safe” and “completely open”.
I fully agree it’s a good idea to be minimal etc but I don’t see it being sufficient in the long run.
As the TCP bug that surfaced a couple of weeks ago, that is not true, you depend on the kernel, your application runtime, and many layers of dependencies.
Many bugs live in all those layers that may undermine your ability to lock down inputs and outputs.
Nah we just all have to switch to a handfull of heavily audited memory safe unikernels.
Your http proxy and your web server don't need a shell, drivers for wifi, mail daemons, systemd, python, PHP, perl, docker, multiple users, hell it might not even need a file system.
You can ship a stripped down docket image running on a stripped down Linux distro, but that still ships the entire kernel with a huge amount of functionality you don't need that may be exploited.
I am kinda expecting the second coming of unikernels. The reduction in both attack surface and depth seems likely to be useful.
4 replies →
I don’t think that is right. Defense and offense are basically different games. Currently my desktop is 100% safe (it is powered off).
That’s a dumb edge case, but it makes the point, you can always be more secure by cutting features. Maybe intelligence moves up the amount of complexity you can securely handle? But it is never much.
That's why I said there's a good chance we shut down the internet. An off/unconnected computer is the only way to be secure. Our stacks are so unimaginably complex that just connecting it to the network opens it up to every undiscovered vulnerability that it contains at every layer of the stack.
Even disconnected, if the computer is just passively listening to bluetooth or wifi, it is vulnerable to exploits in those stacks as well. AI has already demonstrated it can zero day with ease. An AI another order of magnitude stronger than what we have today could potentially zero day worm lockout every electronic device tangentially connected to the internet in an afternoon.
Yes, you should assume that all software you use is full of holes, and after we patch all the holes that could conceptually have been discovered by a motivated human, there will still be holes that can only be found by considering larger windows of context than any human has or could. Even when something is formally verified, that doesn't extend to its software environment or the hardware it's running on, and those can introduce exploitable vulnerabilities as well. You can only ever be very confident that we've found all the holes at a given analysis capability level -- if something a hundred times as capable looks, it will likely find many more. That's how it will be.
How can it be surprising that a software made from 40+ million lines of memory-unsafe code has hundreds of critical bugs?
More than half of those lines are from drivers, drivers which wouldn't be relevant to a VM environment. Core kernel code for any particular architecture is less than 10 million, but some of that is filesystems or subsystems not in use or available to an unprivileged user on a typical server, so possibly maybe 5 million or less. And the article says they only targeted 2.8 million SLoC.
Because these are also some of the most meticulously polished and reviewed 40+ million lines of memory-unsafe code, with the critical paths and anything having to do with privilege escalation having been pulled apart over decades by independent and / or state actors, bots, fuzzers, etc.
There are always more left.
And memory safety doesn't prevent logic errors (or using 4 as a private key for that matter)
2 replies →
Funny how OpenBSD is "memory-unsafe" yet doesn't have these issues. Could it be that the programmer might have something to do with it?
As an OpenBSD lover and frequent user I will tell you it does not support but a significant fraction of the hardware Linux does, and has many features that are reduced in functionality or just gone compared to Linux.
Is it bulletproof? Definitely! But you need the genius of Albert Einstein as well as the patience of Mother Theresa to actually use it in production.
2 replies →
Is anyone spending millions of dollars on checking OpenBSD?
But it also got its share of use-after-free and OOB access vulnerabilities this year: https://feedly.com/cve/vendors/openbsd
2 replies →
literally just got a syspatch email bruh
> Funny how OpenBSD is "memory-unsafe" yet doesn't have these issues.
First of all... Do you really believe that to be true?
We finally got the sufficiently smart C programmers and you still think that humans are part of that group?
> Is the kernel simply too complex to reason about?
Yes, and that's well known.
> Is it an underlying flaw in the security model or language implementation?
Yes, both, and that's well known.
> Should we assume that all software is more compromised than the kernel?
No, some software out there is smaller and have more automatically enforced correctness.
We should expect every large software not created over a simple correctness enforcing stack to have the same number of issues. Linux is just a worst case here, so is your internet browser.
Linux is open source - that gives the security AI tools an easier in - which is a bad thing, on the other hand it means that lots more vulns are being fixed.
Windows on the other hand is not, the same tools are going to find vulns in the binaries, but wont have an easy way to provide patches
Linux is going to get safer faster
Your comment would only be true in a world where Windows' developer wasn't a trillion dollar company fully able to spend just as much on tokens as those researchers did for Linux. They've likely been doing it since day 1, you just don't know about it as an outsider.
Your comment would only be true in a world where the trillion dollar company was not responsible from a RCE on paint :)
[1] https://news.ycombinator.com/item?id=50384233
Human brain mostly take the shortest available path for a solution to reduce the cognitive load. When a system complexity increases probability of cutting the corners will get increased. This is a known pattern. Models just do the polar opposite. They try to cover almost every hypothetical edge cases. They never get tired or bored, nor do they suffer from glucose limits, mental fatigue, or shifting attention spans, which is one cause of over engineering, but valuable in vulnerability tracing.
Decades of accruing bugs.
The kernel probably is too complex to reason about. C is notoriously hard to write correctly and will compile with a very large amount of errors.
Probably not, the kernel is written in an unsafe language, it's rather long handles an incredibly large space of concerns, including the handling of permissions.
> How did we get to the point where there are a thousand privilege escalation exploits in the kernel?
Local privilege exploits have been accepted as being there in Linux ~forever. The past 10-20 years with containers, people have tried to kind of ignore it or pretend it doesn't exist. Nobody with any serious security concerns would ever put untrusted users on the same box, containers or no. Virtual machines are where there is a bit more effort to take this seriously.
You could quibble about complexity and architecture and language but I think at the end of the day it's primarily about incentives. There is not much incentive to make this secure.
I don't know if you would assume all software is more compromised, but you should assume that all software development follows incentives similarly.
I think there's a bit of a 'normalization of deviance' here.
First, the kernel has a bunch of LPE (local privilege escalation) vulns. People running Linux hear about this and think "hmm, I think it's probably not a good idea to rely on user privilege separation for my security goals" and route around the problem by using other mechanisms such as VMs. As a consequence, the pressure on kernel developers to avoid having LPEs drops, because "everyone knows" that you can't really rely on user separation anyway. When LPEs get reported, they do get fixed, but with a sort of shoulder shrug. Nobody is paged at night because shared hosting is dead and everyone runs VMs.
The same thing sort of happened with containers. "Everyone knows" not to trust them so Linux namespace escapes are kind of whatever. I don't think either interface (classic UNIX users or containers) is fundamentally impossible or even that hard to secure. Virtual machines, at least the QEMU/KVM type, also expose a ton of attack surface (like a virtual floppy drive? not kidding, that has been a source of CVEs) to their guests, and they do have VM escape vulns every once in a while. It's just that we have collectively decided that their security properties are more load-bearing than those of users and containers, and we only have finite resources to invest so maybe it makes sense to at least have one boundary with okayish security?
That being said,
> Is the kernel simply too complex to reason about? Is it an underlying flaw in the security model or language implementation?
I'd say yes to both. The kernel is too complex to reason about interesting properties such as sound user separation. It's also written in a language where memory management requires very complicated non-local reasoning and even the smallest mistake often has grave consequences.
No, this isn't a normalisation of deviance.
If there was a buggy of any type, kernel developers fixed that.
They weren't sitting there knowingly merging buggy code because yolo, or they couldn't be bothered, or the other guy wrote bugs so I can write bugs too.
These issues are human oversights, often about obscure disjointed codepaths or race conditions nobody anticipated or thought about.
The overwhelming majority of CS was invented in the 1970s before the concept of the internet or even computer connectivity was a thing.
> How did we get to the point where there are a thousand privilege escalation exploits in the kernel? [...] Is it an underlying flaw in the security model or language implementation?
Did you ever actually think that any OS built with an insecure language and insecure tool chain suddenly, casually and accidentally, spontaneously became Secure one day like some kind of Security Singularity?
Threat actors have been mining software flaws and exploiting software for decades. There were careers and businesses built on this mess long before there was a category of software called AI. And LLM products have security problems like any other software.
> Did you ever actually think that any OS built with an insecure language and insecure tool chain suddenly (...
You guys should seriously pipe down and stop with this nonsense claims. You are fooling yourselves into believing that security is attained by continuing to follow your personal practices but switching to this or that tool. It's sheer cargo cult mentality, and a lazy tribal perspective on technical matters.
Which part of the claim is nonsense and which tool is the parent trying to get people to switch to?
Everything should be considered 'insecure' unless formally verified (EAL7 etc.), and even then there may have been bugs in the verification process.
Security is not attained, it is practiced. It's not a state, it's a process.
Processes have rituals and tools. To improve security, we have to look for better ways of working. Of course no single tool is going to "fix" security. But some bring improvements which are so obvious that they cannot be disregarded.
This is the generally accepted position of security professionals.
Cause it's a big ball of C with no formal verification!
> How did we get to the point where there are a thousand privilege escalation exploits in the kernel?
it's been rule of thumb basically forever that there is 1 bug per ~10KLOC for any project
linux kernel is millions of lines, so thousands of bugs being hidden there is about on point
(tho obviously far smaller serious escalation ones, obviously, but you're exaggerating as well)
> 1 bug per ~10KLOC for any project
1 bug per 10 lines -- not kilolines -- is much closer to the actual "bug rate".
You may be thinking "1 serious security vulnerability bug", but in my experience that too is much closer to 1 per 100 lines to 1 per 1,000 lines, depending on the type of application.
The Linux kernel is simply not good quality code.
AI helps find vulnerabilities, but the way things are written were already fertile ground.
> How did we get to the point where there are a thousand privilege escalation exploits in the kernel?
Simians hand coding.
We did our best.
Because AI in many ways is a better coder than humans.
There are ways where humans are still much better than AI at coding and especially at architecting and coming up with solutions.
But finding vulns is a clear AI strength since it can connect keep so much more related code in context than humans can.
amazing things happen when you decide that device drivers should be a part of your kernel codebase
The kernel is not too complex to reason about. There are many tools and systems that can reason about the kernel, including these LLMs. But the kernel is developed and maintained by people who eschew such tools, because it appears more manly to program by the seats of their pants, and they have been vocally against all industry best practices for almost 40 years now.
What I am really hoping is not that LLMs refine Linux until it is almost acceptable, but that LLMs enable teams to ship useful new operating systems that aren't beholden to decades of macho bullshit.
Have you written a kernel? Even toy kernels are hard to make without vulnerabilities.
I guess it is because most of it runs in ring 0, there would even be a ring 1 and a ring 2 but nobody uses them (even other OSes)
I'm not an expert on Rice's theorem but I believe it implies that 100% secure software is not possible.
And finding exploits manually is so incredibly time consuming, and the number of people who are good at it are so few. I don't think the result of thousands of existing exploits is suprising.
I think we will start to see more and more remote hardware exploits as AI improves. Especially with IoT devices. The limiting factor being AI's ability to interact with the real world,
> I'm not an expert on Rice's theorem but I believe it implies that 100% secure software is not possible.
It does not. All it proves is that you cannot have an automated check that for any given program decides "is this secure or not?" (according to some security criterion).
Rice's Theorem is often misunderstood as "we can't prove nontrivial properties about programs". But we really can, about a lot of programs. All the theorem really says is that there exist certain programs for which those properties are undecidable. The obvious answer is to just not write those programs then.
Practically speaking though, this often means that if you want to formally prove certain properties about your program, you can't just write the program in whatever way you want to and then hope to toss a verifier at it. You have to architect it in a way that makes it amenable to the proof techniques we have available. That could mean co-designing a C codebase and a set of mechanized proofs (this is how seL4 is built) or it could mean writing in a language that makes certain things easy to prove to begin with. There are even languages that are deliberately not Turing complete, so they avoid Rice's theorem entirely, while being useful for writing practical programs in. An example would be Idris, which famously is "Pacman complete" (i.e. you can write video games in it).
Software really is that complicated.
There's probably relatively few exploits in the kernel itself. It's all in the drivers, that run at kernel-level for performance reasons and are developped by manufacturers.
It has virtually 0% unit testing coverage.
> How did we get to the point where there are a thousand privilege escalation exploits in the kernel?
We developed AIs that can find them.
> How did we get to the point where there are a thousand privilege escalation exploits in the kernel?
> > We developed AIs that can find them.
We could already find them before AI.
We already knew they were there, and we already knew how to prevent them in the first place.
See previous discussion: https://news.ycombinator.com/item?id=49705794
Why do you think we didn’t find these 948 vulnerabilities before now?
1 reply →
> We could already find them before AI.
Not at this speed and cost.
5 replies →
People (us, me) and organisations supported and encouraged the use of a huge codebase in an unsafe language, wanting speed and features over security and test coverage
We were all drunk and manic frankly
Were? I haven't seen any serious move towards SeL4 and userspace written in a memory safe language..
The only serious move is kernels adoption of Rust, but for example in Linux this is restricted to 'non core' components.
And while Rust is obviously safer than C, it isn't really 'security focused' for example it still have supply chain attacks, which would be 'impossible' if it used capabilities..
That's how computer science and software engineering have always been: https://xkcd.com/2030/
[dead]
The kernel has the problem that basically every bug in it is also a security vulnerability. All software has bugs. Had Linux been written in Rust, and I strongly recommend a rewrite, it would still have bugs, and thus would still have vulnerabilities. But they'd be way less.
> and I strongly recommend a rewrite,
Oh, you strongly recommend rewriting tens of millions of lines of code? Why don't you do it yourself? Just a prompt away, right?
Kernel will eventually move to rust, but not the dramatic and fast way
6 replies →
fwiw at work we've been looking at what the options are more memory-safe kernels out there. Not many options. If there were a "safe linux" maintained by like canonical or redhat or whatever we'd use it. For datacenter workloads like sandboxes and virtualization I think it'd do well.
“Claude rewrite this project, its 40 million LOC, make no mistake”
> Just a prompt away, right?
Humans manually typing out the bytes of source code has been an outdated method, since around a year. It simply doesn't scale as much as those same humans directing agentic teams. So yes, it would be about prompts.
The hard part isn't the technology for the language transition, that one is present today. pgrust shows the way. It's ensuring maintainers are cooperative, i.e. a social problem. Eventually you diverge too much if you do a fork, so it's better done in cooperation with upstream.
Just check how long it took LLVM or GCC to switch off svn for example, and a language switch is much more involved than a VCS switch.
4 replies →