Try Pro free

Decoder · 6 min · Nov 7, 2026

Rewriting old code can cost less than patching it

Alex Stamos argues that rebuilding vulnerable code with tests can beat fixing thousands of bugs one by one.

In this episode

Full analysis
  1. 3:28AI lets attackers find and exploit bugs in real timePro pick 4 min
  2. 15:27Defenders need cheaper tools for security operations4 min
  3. 32:15Companies need to red-team themselves before attackers doPro pick 4 min
  4. 9:26AI is eroding the old hierarchy of hacking skills5 min
  5. 22:32Rewriting old code can cost less than patching it6 min
  6. 35:58Defensive agents need hard limits on what they can change6 min
  7. 51:55Verifying authentic media is more practical than detecting fakes5 min
“if you're looking at your code base and you scan it and you've got 10 000 bugs then probably now we're at the point where rewriting it is actually cheaper”
ASAlex Stamosat 22:37 · Decoder
22:37

Takeaways

  1. A tested rebuild may be cheaper than fixing thousands of bugs.
  2. He wants Google and Amazon to consider a server-focused Linux fork.
  3. Memory-safe languages could reduce a recurring source of vulnerabilities.

About this segment

Alex Stamos argues that rebuilding vulnerable code with tests can beat fixing thousands of bugs one by one. He proposes a server-focused, memory-safe Linux fork as a way to reduce future risks.

AS

Alex Stamos

Alex Stamos is chief security officer at Cognition and lecturer at Stanford's Cyber Policy Center.

  • Nilay Patel, Host · Editor-in-chief, The Verge

    Helped start The Verge in 2011 and has hosted Decoder since 2020.

From “How AI is breaking cybersecurity | Decoder”, Nov 7, 2026. Watch the full episode

Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

  1. 22:36

    we have to stop to get out of this like we're just going to find bugs and patch them a bunch of stuff just needs to be refactored right like if you're looking at your code base and you scan it and you've got 10 000 bugs then probably now we're at the point where rewriting it is actually cheaper that is my observation from looking at these customers of ours is that if you can get a working build, then it is actually much easier to write a whole humongous suite of tests and to spec out how this thing works and then to rebuild it within that spec and those tests securely than it is to find all the bugs and fix them. It actually is. And so I don't know what is going on through the mind of the Lynx kernel developers, but that thing, again, that talk I gave like at the beginning of this year, I posited two possible futures. And the one was, we're now at superhuman bug finding.

  2. 23:28

    Maybe we just have a pool of superhuman bugs and we're going to drain it. That's the good future. But the bad future is every time we get a new model, there's a new superhuman bug pool that's a little more superhuman. And unfortunately, we seem to be closer to that. And the Linux kernel got a bunch of fixes for Mythos, and then Mythos Preview. And then we had Mythos 5.1, and there's another pool. And then we got AstroCyber and we just got another thousand Linux kernel patches. It's like, it's not slowing down yet. And I don't think we're just going to scan our way through the C code of the Linux kernel. There's only like two companies, honestly, in the world who could probably do this. It'd be Google or Amazon. I wish instead of like the Fuchsia project or rebooting the Google book or the Chromebook again, Google would take all of

  3. 24:13

    those incredibly brilliant engineers and they just tell them take the linux kernel and rewrite this in rust and that would be their gift to the world and it would be an incredible um advertisement for gemini for carbon or whatever would be like get rid of all the drivers that nobody needs like this thing just have to run on the 4060 x3 or whatever i mean i i know it doesn't but you know you know i'm saying like yeah and then just release it and call it whatever you want the glinux kernel just like they did this with open ssl right and i would run that right like cognition would run that on our servers like or have google and amazon do it together and it would cost them 100 million dollars but compared to the societal cost that this is costing us every time we have to patch the linux kernel and you have to reboot every linux machine on the entire planet that's

  4. 24:59

    what has to happen but for whatever reason the technology industry has not been able to get together and make these hard decisions of these fundamental things that underlie the entire human race, we have to completely rebuild. This is why I started by talking about how the economics of cyber led to the culture of cyber. I mean, this is like the most decoder way of approaching this conversation, I know. But when you describe the research teams at the NSA and then the operational teams, that is an org chart that comes out of economics of the work.

  5. 25:30

    You're saying, oh, someone has to make a big decision here. You need to look at it from a very high level and say it is cheaper to spend $100 million to fix Linux, rewrite Linux today, than it is to successively patch new bugs when every new model comes out. I don't think anyone's in that position. I don't think Linus Torvalds is in that position. I think Sundar Pichai and Andy Jassy are. I think they literally have each other's cell phone numbers. If one of them, maybe they don't listen to Decoder, but I expect one of them.

  6. 26:05

    their direct reports does. And I would like one of them to talk, go into their one-on-one and say, sir, I listened to the most handsome, best spoken CISO I've ever heard. And he had a great idea. And you could get incredible credit if you're the one, but yeah, we'll, we'll both do it, but we'll, we'll leak to the wall street journal. That was your idea first. Yeah. You should call the other and we should spend a hundred million, maybe a billion dollars.

  7. 26:30

    Like we just had a bug in the TCP stack of Linux. That is insane. We can't do this anymore. The problem with rewriting the Lynx kernel is like half of its driver code and nobody has that hardware anymore, right? Like somebody had to be in the presence of that hardware with a, you know, a ThinkPad T40 when they wrote that driver and they don't have that anymore. But the good thing is, is a huge number of the really important uses of the Lynx kernel are production server hardware.

  8. 26:57

    And so fork it, right? Like Linus will never do it because Linus wants to support all that stuff. And he's got like all of these politics, but Google and Amazon don't have to care about Linus Torvalds. Right. And so Google and Amazon can create a new version, a new fork of the Linux kernel, and they don't have to call it Linux. That can be ABI binary compatible with the Glib C and everything above it.

  9. 27:19

    In fact, they can eventually fork Glib C, right? Yeah. And they can build it and they can call it whatever they want. and it only runs on production hardware and then they can use it for their clouds. And eventually all the clouds will move to it. And if you want, other people can run the insecure thing that has to be patched all the time and that's fine. But like for the things that our containers run on, I would feel a lot better if it was written in a type safe, memory safe language that also has the ability now to have contracts.

  10. 27:49

    So like these languages have the ability, you don't have to do full form of verification, which is incredibly hard, but you can do kind of these things that approach formal verification. I'm a little over my skis here because there's people much smarter than me that study this, but basically you define, this is how this function is supposed to work. Here's the contract it has. And very, very smart software engineers would love to write these things because you know, they had time on their hands. No, no person who had a real job used to write these things, but LLMs have tons of time on their hands, right? Cause you know, we're frozen in time while, while they're, you know, thinking that incredible machine speed.

  11. 28:23

    And so you could totally have them rewrite the Linux kernel with this, you know, not quite formal verification. Please, if you're listening and you work at Google or Amazon, go pitch this. Anyway, there's my pitch. I'm just saying, I know Jason's listening. So if you heard it, I'm not even going to say who it was. It's not just the Linux kernel, but I'm saying like, that is the kind of thinking we're going to need to make it through this, right?

  12. 28:43

    It's like, you can't, we can't just patch our way through this because it's killing us. And because the other thing that's killing us is companies can't,