Skip to content

Instantly share code, notes, and snippets.

@grahamperrin
Last active November 15, 2026 00:24
Show Gist options
  • Select an option

  • Save grahamperrin/6a3c4d69fe4ebe1bb198f840a67d6c38 to your computer and use it in GitHub Desktop.

Select an option

Save grahamperrin/6a3c4d69fe4ebe1bb198f840a67d6c38 to your computer and use it in GitHub Desktop.
Discovering FreeBSD Vulnerabilities with AI – Mark Johnston

Discovering FreeBSD Vulnerabilities with AI

Talk by Mark Johnston (FreeBSD committer and Security Team member), recorded November 2026.

  • Video: https://www.youtube.com/watch?v=QKknFOwT8Co
  • Source: auto-generated YouTube captions, lightly edited. Filler words, false starts and obvious speech-recognition errors are cleaned up; the wording is otherwise kept close to what was said. Section headings are added, with links to the point in the video. Nothing from the slides is included, because only the audio was transcribed.
  • Items in [square brackets] are editorial notes where the captions were unclear.

Introduction (2:12)

Host: Next up, we have Mark Johnston, here to talk about all sorts of fun he's been having, and how he wishes we had fewer bugs in our new code, among other things. I'll hand it off to Mark.

Mark: Hello. Can everyone hear me okay? All right.

As the title suggests, I want to talk about vulnerabilities in FreeBSD and LLMs and how they relate. The literal title of the talk is not really accurate; it's a placeholder. I'm not going to teach you how to find vulnerabilities with LLMs. It turns out that's not very difficult.

What I want to talk about is the experience we on the FreeBSD Security Team have had for the past six to eight months, basically since LLMs got good at finding and exploiting vulnerabilities, which I'd place around March or April this year. I'll cover what it's been like, what we've been doing, and what we'd like to see going forward, in both the near term and the long term.

The FreeBSD Security Team (3:05)

I'm Mark. I'm a FreeBSD source committer, and have been for about 15 years. I've been on the Security Team for maybe five years, mostly as a volunteer. This year I've been working pretty much full time on security issues as they relate to FreeBSD.

The Security Team is a group of people. We have a security officer, Gordon, sitting in the back. There's me, and a few other folks who sit on the security mailing list, receive reports and decide what to do about them. We work as a reactive team. We're not going out trying to harden FreeBSD, and we're not developing mitigations. We're trying to make sure we handle reported incidents.

A lot of this talk is going to be fairly kernel-centric. Many of the bug reports we get are in the kernel, which is a fairly complex piece of software. We also deal with bugs in the base system and in userspace, but the kernel is the biggest target.

I want this to be a fairly open-ended talk. It's not about giving you numbers or strategies. It's about explaining what the experience has been like and what I personally think we need to do going forward. If you have questions or suggestions, please feel free to interrupt me. I'll be happy to be interrupted.

Funding: the Alpha-Omega project (4:38)

My work on the Security Team this year has been sponsored by the Alpha-Omega project. The FreeBSD Foundation applied for funding through Alpha-Omega to handle FreeBSD security in this brave new world of ours.

Alpha-Omega is, I believe, a nonprofit funded by a consortium of tech companies. Its mission is effectively to find and catalyze sustainable improvements in open source projects. It's a way for companies that depend on open source to support open source maintainers. They've funded FreeBSD in the past, and I'm very grateful to be funded by them as we go through this process.

The goal of the project has been to handle the influx of LLM-generated bug reports. As of early this year, I'd say close to 100% of the reports we get on the Security Team are for bugs found by LLMs. I'm sure there are still individuals directing them and looking for bugs in interesting ways, but a lot of the grunt work is LLM-generated.

As we all know, LLMs generate a lot of output. Different groups find the same bugs, and all of it has to be processed. It's a bit too much for volunteers to take on, so as part of this project we're also trying to find ways to scale up our vulnerability handling. I'll show a number later: the security advisories we've issued this year dwarf the number from the past few years. That requires us to be more efficient in how we process security bugs.

In practice it's mostly reactive work. We respond to security reports, we tell people "we're going to investigate this, thanks for reporting it", we write patches, we get other people to write patches, and we review and test them. Along the way we also search for vulnerabilities ourselves. As part of the contract, a few of us have access to Claude Code and Claude Max subscriptions [the captions garble one further item here] via Anthropic, which has been very useful.

The developers funded by this contract are me, Pierre and Tuukka. Pierre and Tuukka have mostly worked on the infrastructure side, whereas I've been dealing with actual FreeBSD bugs.

How the bug reports changed (7:16)

There was a noticeable trend toward the end of 2025. We started getting obviously machine-generated bug reports. They were often nonsensical. For example, they would report a buffer overflow in a program that doesn't implement any kind of security boundary. If you can crash a program like cat with a buffer overflow, that's obviously not great, but in many cases it isn't a security bug. If you can crash an unprivileged program as yourself, you're not getting anything out of it.

So we got a lot of reports where it was "maybe there's something to fix here, maybe not", and you had to read through some really torturous writing to work out what was being disclosed.

By the end of the year that had shifted a lot. The reports were still a lot to process, but they were usually correct, in that they identified a real security vulnerability. They often came with a proof of concept or an exploit, or both, and those were also machine-generated. The proof is in the pudding: if somebody gives you a C program that takes you from UID 1001 to zero, there's a bug, and it doesn't matter how it was found.

A lot of the early bugs were low-hanging fruit. People could have found them by traditional means fairly easily, but for various reasons they hadn't been. Usually they were in subsystems without a clear maintainer, or in code that doesn't get tested very often. One of the early bugs was reported to us directly by Nicholas Carlini at Anthropic. It was a dead simple stack buffer overflow in the kernel, in kgssapi, the kernel module that implements the GSS interface so you can authenticate with Kerberos to mount NFS file systems. That code sadly hadn't been fuzzed, or had static analysis applied to it very carefully.

Over the summer we fixed a whole bunch of bugs of that type.

By the numbers (9:36)

Concretely, we've had 73 security advisories in 2026. Each advisory covers at least one CVE, and sometimes several. In comparison, in 2025 we had just 12. The year's not over, so we're going to have a fair bit more. We might break 100.

Most of the bugs reported to us are in the kernel. It's one of the more complex pieces of the base system, and there's a lot of code in there.

During the summer, as I said, we fixed a lot of low-hanging fruit and the number of incoming reports slowed. I'd been using Claude to find bugs myself and having less and less success. I was telling people excitedly at EuroBSDCon, "maybe the worst is over". That turns out not to be true.

The new wave (10:27)

I don't know how many of you saw that OpenAI published a blog post detailing how they found something like a thousand privilege escalation bugs in Linux. They did that in the past few weeks. We've gotten a few reports from OpenAI as well, I think as part of that same effort. I can say, without giving details, that the nature of the bugs they find now is much more subtle than it used to be, and the techniques they use to exploit them are much more sophisticated.

They took bugs that I would have considered relatively innocuous. These are the sort of thing I'd see in a code review and say "maybe you should fix this, maybe this check could be a bit tighter", and then it turns out to be an exploitable local privilege escalation. We're dealing with a lot of that right now.

We're very fortunate in that we're an established project and a lot of people want to find bugs in FreeBSD. To the many, many people who have sent us bug reports: thank you. We don't have to do any extra work to find bugs, because we have lots of people reporting them to us. In many ways it's reassuring that so many people are trying to find them.

The other thing that's changed is that LLMs can exploit bugs very, very effectively, and they're getting better at it.

That's where we are right now, in November 2026. In the past few weeks we've had a pretty big spike in incoming bug reports. Some are duplicates, but it's a lot. The low-hanging fruit is mostly gone (there's still some), and the bugs we're finding are more interesting. Many of them, with the kernel written in C, are garden-variety memory safety bugs, but we also have a fair few logic bugs: missing authentication checks and layering violations, that sort of thing.

What are we actually doing about it? (12:47)

[The captions render this slide title as "what is syzkaller actually doing about it".]

We're fixing bugs. I read a lot of patches, and the recent influx has meant I'm trying to farm out networking bugs to other developers. Thanks in advance to anyone who has responded quickly to a bug report from me. Quite a few developers routinely do that.

We continue to look for bugs in traditional ways. We use LLMs to audit specific subsystems. We still use syzkaller quite a lot, and we use the regression test suite. A lot of that is after writing a patch, when I want to make sure I'm not introducing more bugs with it. LLMs are not the be-all and end-all of this subject.

Finding the whole class of a bug (13:27)

In a lot of cases, people use LLMs to find bugs in a way that's not quite a random walk, but it looks all over the code base. At some point it finds something, works out how it can exploit it and says "aha, I've succeeded, I found this bug". What often ends up happening is that it's just one instance of a class of bugs, and we have to be pretty careful to identify when that's the case. A lot of the early reports we got in March and April, and through to today, are like this. Researchers just stop when they find a bug. They're not necessarily interested in being exhaustive. So we have to be very careful to identify the whole class.

I'll give a couple of examples. An early one was a bug in our handling of certain types of file descriptors with poll and select, the system calls that let you block until some I/O is ready. When a thread is blocked in select or poll, another thread can close that file descriptor. If the code that manages that file descriptor type isn't careful to wake up the sleeping thread, that thread can later trigger a use-after-free. Nicholas, at Anthropic, found that bug and reported one instance, but we actually had three in the tree. That's the sort of thing we have to be careful about finding, and we're not always successful.

You can find an example here where we fixed the same bug twice, which was also my mistake. In the System V semaphore code there's a wraparound bug where you can trigger an out-of-bounds access by creating and destroying a semaphore set 2^16 times. It turned out there were two instances of the bug in that code, and I only fixed one the first time.

Root causes and incremental hardening (15:33)

Aside from fixing bugs and trying to be thorough about it, each time we fix a vulnerability we look at the root cause: what can we do to make sure this sort of bug doesn't arise again? Usually with each bug there's something small we can do. It might not be a comprehensive, thorough mitigation, but there's usually some incremental step, and it's often worthwhile to do it in the moment.

The obvious first one: we didn't have strong stack smashing protection enabled in the kernel. Stack smashing protection is a compiler mitigation for stack overflow vulnerabilities. If you overwrite a certain part of your stack frame, the kernel notices when the function returns and immediately panics instead of doing something sneaky. We had it enabled in the kernel, but there are several variants and for whatever reason we didn't have the strong one. It turned out that the lack of that mitigation made it very easy to exploit a bug that we had fixed.

A few other miscellaneous examples:

  • I added guard pages around a certain type of buffer we use in the kernel.
  • In C, a common mistake is not checking return values, because C doesn't hold your hand. But for a given function you can force all callers to check the return value. We've had bugs where people didn't check the return value of copyin or copyout, and that turned out to be a disaster.
  • I made a bunch of improvements to KASAN, to improve its effectiveness at detecting certain types of use-after-free.
  • I added some helpers to the kernel that check for integer overflow.

These aren't comprehensive mitigations and they're not going to save the world, but there's always room for improvement, and doing that sort of thing in the moment is, I think, very much our responsibility and a useful thing to do.

Streamlining the advisory process (17:37)

Because we've had so many security advisories this year, maybe not generally interesting, but we've tried pretty hard to make our process more streamlined. In many cases we use LLMs to eliminate some of the boilerplate involved in preparing the advisory itself. We've written a couple of scripts. We've been using a tool I wrote called bricolage to test the stable and releng branches all in parallel: you build a whole bunch of branches, boot a VM, run all sorts of automated regression tests and send out an email when everything's done. That helps us be a lot more confident that we're not going to ship broken patches.

An easy example in practice was the intermediate CA certificate compromise [the captions say "Imudrah"; possibly eMudhra, which I could not confirm] a few weeks ago. Somebody discovered that a whole bunch of TLS CA private keys were absurdly small and could be trivially brute-forced. I can't remember exactly which day that was reported, but a few hours later Dag-Erling had revoked some of the root CAs that were used to sign those compromised intermediate CAs. I backported that commit to the stable branches and all the releng branches and tested them, and that night Gordon and Colin were able to put out a security advisory. It took us basically half a day to get that out, when a lot of larger organizations took a fair bit longer.

Code review and testing (19:12)

One thing that's really been important to me through this process: we have all these bugs in the kernel, so clearly some process has failed such that we have them in the first place. What can we do to make sure we're not introducing more bugs into the kernel as we fix them? There's always a steady stream of developers pushing changes into the kernel, and it's become clear that we need to be a lot more careful and rigorous when it comes to code review and testing.

A lot of what we've been doing has been reviewing patches, even ones that aren't necessarily security related. When you're writing code in a privileged context, it's very important that everyone fully understands the change. We're doing everything we can to catch bugs before they get into the tree, and a lot of that has involved using LLMs to find bugs.

Post-commit review

Just yesterday I announced to the developers mailing list that we now have a post-commit review service. Basically, every commit that lands in the FreeBSD source tree is automatically analyzed by Claude. Any bugs it finds are reported to the committer if they've opted in, and to the source manager group if they haven't. In either case, bugs found are logged to a database, emails are sent, and we're aware of them.

Pre-commit review

In the same vein, we've been working on pre-commit reviews using LLMs. Pierre has been working on using local models, talking to a Phabricator instance, so that you can submit a review and have an LLM find bugs automatically.

It's important to emphasize that this isn't meant to replace any of our existing processes. It's that LLMs are very, very effective at finding the tricky little bugs that very often arise in C programs, and my conviction at this point is that they're just better than us. I can find a lot of bugs if I'm having a good day, but on a bad day I can easily miss things. This gives us another safety net. When an LLM can catch those mistakes, I can more comfortably think about the high-level intent of the change and make sure that makes sense, which tends to be an area where LLMs are not as effective.

Near term: what we need to do (21:46)

I've been talking to a lot of folks over the past couple of days about this. It seems to me that, in the near term, the most important thing we need to do is fix as many bugs as we can.

Make it a collaborative effort

The Security Team can't drive this in a centralized way. When we get bug reports we try to give them to the respective maintainers quickly, but it's very important that developers who maintain a particular subsystem or driver are proactively using LLMs, and traditional methods like fuzzing, to identify bugs in their subsystems and fix them.

We have a lot of people doing that already. I'm very heartened to see various vendor drivers where the maintainer was clearly given time by their employer to identify all the latent bugs in their driver, prepare a patch, notify the Security Team about anything that might be sensitive, and commit their fixes. There are also individuals going around finding bugs by all sorts of methods and fixing them.

Think about root causes, not whack-a-mole

Here's one of my pet examples, which I've been bitten by before and haven't fixed systematically. This time I'm definitely going to fix it. Does anyone know the difference between these two identifiers in the kernel, MIN and min?

[Audience: function and macro.]

Yes. MIN is a macro. That's the traditional "first C macro you learn as a student": you use a ternary operator to compare two values. It has the classic problem with macros that it expands each argument twice, so if you have side effects it doesn't work well, which makes it kind of dangerous to use. min is a function whose parameters are 32-bit integers. If you pass 64-bit integers to it, they're silently truncated, and you may get the wrong result.

That bug has bitten people before. Usually the answer is to just use the right variant, but for various reasons no one has ever done the work to get rid of these functions or unify the approach. That's exactly the sort of thing we need to stop deferring. There are cases where we do fix this stuff systematically, but we need to be more proactive about these kinds of issues. The real reason we don't is usually that someone else will probably deal with it. As someone who's tried to fix these kinds of problems before, I'd love it if we collectively started having more discussion and analysis of these kinds of bugs.

Use the bug reports we already get

We already get a large number of bug reports from third parties. FreeBSD is in a very fortunate position in that a lot of people are already looking at our code and finding things to report. We can leverage them. Bugzilla and GitHub are awash with people reporting bugs. They might not be the most critical ones to look at, but they're worth investigating. LLMs are getting more and more capable of exploiting innocuous things, and it can be quite shocking what they can do when you give them enough constraints. So it's really important that even innocuous bugs get addressed in some way.

Send us patches, but apply judgment to LLM patches

The Security Team gets a lot of bug reports, and it's really nice when folks also submit patches, in particular git-formatted patches with an author and a commit message.

Don't rely too much on LLMs to give you correct patches. The patches they produce are usually correct in the sense that they address the immediate issue, but very often they don't fix the problem at the right layer, or they're incomplete. You still have to apply judgment to LLM patches.

I know there's a wide variety of opinions on using LLMs to write code. My experience, at least, is that in an existing, established, large codebase, naive use of LLMs won't have enough context to fix things in a sane, useful way. So it's important that we still apply human judgment.

Regression tests

Adding regression tests should, at this point, be standard behavior. We've gotten a lot better at that in the past couple of years. For some areas, especially drivers and certain subsystems, it can be difficult to write useful regression tests. But for the core kernel and file systems, any time you find a bug, we need to make sure we don't reintroduce it later. Any time I write patches as part of a security advisory, I try quite hard to add a regression test when it makes sense. I'm very heartened by the number of tests that have been coming into the tree in the past few months. So, another appeal to developers: please include regression tests when possible. If you're not sure how, please ask. Quite a few of us have done a lot of work on the test suite.

Chicken switches

One thing I'd quite like to see is chicken switches: a way to turn off features in the kernel without recompiling or rebooting. In many cases functionality is provided by a kernel module, and you can unload it. But a lot of things are compiled into the kernel that you can't turn off in a useful way: features that maybe 99.9% of users don't need but that are there for completeness.

My pet example right now is compat32. On 64-bit kernels you can run 32-bit binaries, which exposes a whole different system call table, and we do have security vulnerabilities in that code from time to time. Today, as far as I know, there's no way on amd64 to turn that off without recompiling your kernel.

So whenever you add a feature to the kernel, I'd say it's good practice at this point to include at least a sysctl knob that lets users who don't depend on that feature turn it off. When we publish a security advisory we have a section for workarounds: what can you do to make sure this bug doesn't affect you until you have time to apply a patch? I haven't done a systematic analysis, but it's not uncommon for us to publish an advisory with no real workaround, because we don't have this kind of mechanism in place. So please carefully consider, when adding features, whether it would be useful to let users opt out. Personally, even better would be to not have the feature in the kernel by default whenever possible. Having it live in a kernel module is a useful strategy.

Use LLMs to review code, and be rigorous

Regardless of your feelings on using LLMs to write code, it's unquestionable to me that they are extremely effective at reviewing it and at finding low-level mistakes. As long as our kernel is written in C, it is absolutely imperative that we use LLMs to catch bugs before they enter the tree. That's my personal stance, having spent a few months using them to augment my own review. I'll often open a code review in Phabricator, spend time reading the diff, and concurrently have Claude or another LLM review the patch in the background. Then I compare: what did I catch that it didn't, and what did it catch that I didn't? For many single-character or fairly localized bugs, it's on average more effective than I am.

It is very hard to tell whether a bug is a security bug. LLMs are getting really sophisticated at exploiting simple-looking logic bugs that, a year ago, I might have flagged in a code review as "maybe fix this, optional". So it's important to be quite rigorous whenever we make changes to code that's exposed to unprivileged contexts. That especially includes concurrency. We have fairly fine-grained locking in a lot of the kernel, and the amount of rigor needed for multi-threaded code is much higher than for single-threaded code. There are a lot of interactions that can lead to subtle race conditions, and sometimes it's possible to exploit them. A simple buffer overflow is obviously a security bug, but a small race condition here or there can also be one.

All of this also applies to code that runs only in root contexts. Maybe you have a device driver with a device file that exposes code only to root. It's important to fix mistakes in that code as well, and to treat them as security bugs all the same. The fact that it's root-only means you have a workaround in place, but code gets copied around and patterns get copied around, and over time bugs in "safe" code get propagated. That's another pattern I've seen a few times.

Don't panic

These are all short-term things that I think we need to focus on over the next few months. We're going to spend a lot of time fixing bugs, and I'm going to be poking a lot of people to fix bugs in their subsystems.

Don't panic. I think this is something the industry is collectively going through. A lot of the bugs we get are not earth-shattering, and they often have workarounds. We've been churning out advisories pretty regularly, and I anticipate we'll continue to do so.

A lot of the bug reports we've gotten from, say, OpenAI are not things I've been able to find readily with other LLMs. So it's fair to assume we still have quite a bit of time to continue fixing problems in our codebase. But it is important that we respond collectively and treat it as a priority.

Longer term: maintaining a security posture (33:03)

In the longer term, and this is where I'd appreciate a lot more discussion and suggestions: what should we do in FreeBSD to maintain a security posture against this fairly adversarial approach of using LLMs to find bugs? These are just examples of things I'd like to see us explore.

Keep using traditional methods for now. Static analysis is often quite a bit cheaper than burning tokens all day to scan the same code over and over. Whenever we fix a bug, we should consider whether we can refactor the code so the original bug isn't possible, whether we can run cheap static analysis passes, or whether we can add compiler directives to expose bugs. We've been using syzkaller, a system call fuzzer, for a long time to find bugs, and that's been very effective.

Don't rely on continuously burning tokens. In the long run, it seems important to me that we don't just rely on continuously burning tokens to verify that our code is correct. We need more rigorous methods. I have a couple of directions I'd be interested in exploring:

  • Model checking. Olivier [surname not captured] has been using a model checker to find bugs in the kernel: writing formal models for small interfaces in the kernel and finding ways to describe interface properties formally. That's turned up some interesting bugs, and he's been submitting patches for them.
  • Other languages in the kernel. If you've talked to me over the past couple of days, I may have mentioned I'm interested in exploring the use of other programming languages in the kernel. For many purposes, C is just a bit too unfriendly. It would be really nice to use a language where you can model object lifetimes, pointer provenance and so on formally, as opposed to using manual analysis, code review and various heuristic techniques to try to demonstrate that your code is correct. I don't have a particular language in mind. But I wonder whether we can distill techniques from languages that are better at solving the systematic problems we see, and adopt them within C, so we gradually converge on more explicit semantics around pointer provenance, ownership and lifetimes. We have some fairly small examples of that in parts of the tree.
  • Fil-C. The other thing I'd love to explore, which I don't have a lot of personal experience with, is Fil-C, which has been a subject of discussion over the past couple of years. For those who haven't seen it, it's effectively an LLVM extension that lets you write and run memory-safe C, for some definition of memory safe. The big idea is that you store additional pointer metadata out of band, so that when you use pointers in C, the code emitted by LLVM does additional checking that helps prevent a whole bunch of bugs. It can be used to establish spatial safety for C programs, and it enables garbage collection in C. Right now it only supports amd64 Linux, but I'd love to see someone port it to FreeBSD, try to compile the base system, and see what needs to be done. Is it possible to use it in the kernel? I don't think anyone has tried yet. If someone's interested in exploring these topics, I'd be very interested.

Parting thoughts (37:20)

FreeBSD is a very large code base, and we manage to maintain it with a fairly small number of developers compared to equivalent projects. So it's very important that whenever we fix bugs or make changes, we do so with a holistic sense of the system. We don't want to fix a bug in one part of the system just to avoid patching a different part because "it's difficult to land patches there". That type of indirection leads over time to complexity and security bugs.

It's very satisfying in FreeBSD that, as developers, we can modify pretty much any part of the code base, and the process is fairly uniform: you submit a patch and the relevant committers help review it and land it.

So, whenever possible, let's avoid duplicating features and creating multiple variants of the same thing. Obviously there's some history of that in FreeBSD, and it's difficult to find ways to make everyone happy. But for the time being I think it's critical that we keep the size of the kernel manageable. Code bases generally don't shrink over time; they only get bigger. From a sustainability perspective it's going to be quite important to keep that fairly bounded.

I think that's all I had to say.

[Applause]

Q&A (38:57)

Q1: Keeping private security patches private

Richard: I've got a procedural question. You've shared certain exploits or potential security findings in the TCP stack, and I think I made a mistake by putting the patch up in Phabricator rather than having some internal route. Is something planned to make these things not immediately public, so that malicious actors can't exploit things that were shared with us in private?

Mark: Once something's been published, it's effectively been published, so it's pretty hard to undo. In general, though, Phabricator does support restricting the visibility of patches. When you create a review you can create it in preview mode without sending email to anybody. Then, at least within the web UI, you can limit visibility to subscribers only, for instance. That lets you create a private patch.

Richard: Can we document this a little? I'm not aware of that capability in Phabricator.

Mark: Yes. We can probably put instructions on the security page for using Phabricator to submit private patches. When in doubt, email is always going to be a bit safer, with less risk of those types of mistakes. The other comment I'd make in general is that if the bug you're fixing was found by one person, it's very likely someone else will find it as well. We get many, many duplicate bug reports, where different groups of people, often around the same time, report the same bug.

Richard: That's certainly true, but I still think for those kinds of problems, not poking everybody's nose at a specific issue would be a good idea. Maybe share the steps for these private reviews when you share a private exploit with the people who are going to submit the patches.

Mark: Okay.

Q2: Where are we on the "S-curve" of bug discovery?

Questioner: I'm working with a language community with lots of packages. My mental model is that at some point LLMs will have enough capability to find probably all of the bugs, by some definition of "all", in terms of compute. So I envisage something like an S-shaped cumulative curve. Where do you think we are in that process, or at least where do you think you are?

Mark: Right now it has not flattened. As I said earlier, it felt like it was flattening a couple of months ago, and it has since unflattened. I don't know how that's been reflected in other language communities. That's been the case for FreeBSD, and based on news I've read over the past couple of weeks, it's probably also true for Linux.

Questioner: So there's at least another year? We won't be done by the end of 2027?

Mark: I wouldn't say a year specifically, but I can imagine my time for the next three months at least being very full of fixing these bugs.

Questioner: But you might be done by the end of 2027, or unlikely?

Mark: Well, I already told people during the summer that maybe this had run its course and we were close to done, and I was wrong. So I don't want to make that prediction again. There are a finite number of bugs in our code, and at some point it may be possible to fix them all. But given the size of the codebase, it's also very possible that we keep introducing subtle defects over time and keep ourselves walking on a bit of a treadmill.

My intent with post-commit review is to at least try to staunch that flow, to reduce the rate of incoming bugs as much as possible while we're fixing them. We might end up with security bugs being a rarity a year from now. Or we might end up in an equilibrium where every so often new bugs come in and we have to deal with them. In a sufficiently large codebase it's really hard to have any confidence either way. It's going to be really important that we have more mitigations, more ways of defending ourselves even in the presence of a particular bug.

Q3: Why not just make min take 64-bit arguments?

Questioner: You said somebody should fix min. Why not just make lowercase min take 64-bit arguments?

Mark: That would be one solution. I would probably opt for a macro that introduces local variables within a block and does a single comparison without evaluating its parameters multiple times. When the macro was originally written there wasn't really a good way to do that, and now there is. We already have a variant of min that takes 64-bit arguments, with a name like ulmin or qmin [the captions are unclear on the exact names]. This is all fairly arcane. We have workarounds for limitations of the language that no longer apply, but they've persisted. Things like that get fixed routinely, but there are always more of them, so whenever we see problems like that it's really important to call out the root cause rather than just papering over it.

In this case I'd ditch the functions and use a macro with typeof(a) a1 = a; typeof(b) b1 = b; and then do the comparison. You've evaluated each macro parameter once, and the compiler will warn you about signed/unsigned comparison. I think that's probably the right solution. In the meantime we have to go through all the existing callers and audit them to make sure they aren't relying on the old behavior, which is a bunch of work. It's a slog, but it's the sort of thing that really improves the codebase.

Another attendee: Part of the terror is that some places rely on the truncation as a feature rather than a bug.

Mark: Yes, this is the fun of C. I might fix that problem and in doing so introduce a new security vulnerability. It's that easy to make subtle mistakes. That's an area where an LLM can't prove anything for you, but it can give you a lot more confidence, or suggest areas where additional testing might be suitable.

Q4: Access to better models, and drawing a line under old bugs

Questioner: You said all new commits are being reviewed by Claude, but I guess we don't have access to Mythos [the captions say "Metals"] or GPT-6 Cyber or similar models.

Mark: I personally do not. There are various FreeBSD contributors who do, and who have been reporting bugs found by models that aren't generally available.

Questioner: I think it would be good to be able to draw a line, so that from now on we can find new bugs quickly when they appear. Then we can go back and fix the old bugs, and at least know that going forward we're pretty okay. Of course the models will get better and find more subtle bugs. I would guess Anthropic or OpenAI would be happy to give us access to those models.

Mark: I haven't had much experience applying for access through those specific channels. Through Alpha-Omega, a bunch of us already have access to publicly available models. And my experience over the past couple of months is that they've improved enough, for instance Opus 5.5, that bugs which didn't turn up when I scanned certain subsystems a few months ago are now being found.

We can use better models to scan each commit as it goes into the tree, but that's never going to be sufficient on its own. We need a lot of different approaches combined to be more confident here. Maybe someday a model will come along with some way of proving there are no bugs, but until then all we can do is assign some probability that it will find a given bug in the tree. Some bugs are very context-dependent. One commit changes some code, and another commit relies on the new behavior. Bugs can be introduced over time via different commits that change behavior in ways that interact unexpectedly, and the amount of chaining that can lead to such a bug is really unbounded. So who's to say that reviewing every commit in isolation will uncover everything? It won't. It's just a way to reduce the influx. It's always going to be important to review the tree holistically in addition to reviewing each commit. That's my unscientific feeling on that.


Host: Okay, thanks, Mark. Good on time. We're ready for our break, until about 11:45, and we'll come back for our next talk, which is going to be from Core. Thank you.

[Applause]

@grahamperrin

grahamperrin commented Nov 14, 2026 •

Copy link
Copy Markdown
Author

To download the YouTube-provided subtitles in SubRip Text format, I used an extension for Firefox:

My prompt to Anthropic Claude (Sonnet 5.5, medium):

This .srt file was downloaded from https://www.youtube.com/watch?v=QKknFOwT8Co, tidy the content and produce Markdown that I can paste to a gist in GitHub.

The chat: https://claude.ai/share/45466e1a-6f61-4f7a-876e-666df5fca640.

Corrections:

  1. Tukka (revision 2); he's named and pictured at FreeBSD AI Vulnerability Project Launched (The Linux Foundation®, 2023).

@grahamperrin

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment