Claude wrote a full FreeBSD remote kernel RCE with root shell

github.com

270 points by ishqdehlvi 5 days ago


magicalhippo - 5 days ago

Key point is that Claude did not find the bug it exploits. It was given the CVE writeup[1] and was asked to write a program that could exploit the bug.

That said, given how things are I wouldn't be surprised if you could let Claude or similar have a go at the source code of the kernel or core services, armed with some VMs for the try-fail iteration, and get it pumping out CVEs.

If not now, then surely not in a too distant future.

[1]: https://www.freebsd.org/security/advisories/FreeBSD-SA-26:08...

tptacek - 4 days ago

Calif (Thai Duong's firm) did a writeup on this, which should probably be the link here; it includes the prompts they used:

https://blog.calif.io/p/mad-bugs-claude-wrote-a-full-freebsd

A reminder: this bug was also found by Claude (specifically, by Nicholas Carlini at Anthropic).

panstromek - 5 days ago

The talk "Black-Hat LLMs" just came out a few days ago:

https://www.youtube.com/watch?v=1sd26pWhfmg

Looks like LLMs are getting good at finding and exploiting these.

ptx - 5 days ago

> It's worth noting that FreeBSD made this easier than it would be on a modern Linux kernel: FreeBSD 14.x has no KASLR (kernel addresses are fixed and predictable) and no stack canaries for integer arrays (the overflowed buffer is int32_t[]).

What about FreeBSD 15.x then? I didn't see anything in the release notes or the mitigations(7) man page about KASLR. Is it being worked on?

NetBSD apparently has it: https://wiki.netbsd.org/security/kaslr/

stephc_int13 - 4 days ago

The most difficult part is always to find the vulnerability, not to fix it. And most people who are spending their days finding them are heavily incentivized to not disclose.

Automatic discovery can be a huge benefit, even if the transition period is scary.

dnw - 5 days ago

Thanks for sharing the prompts: https://github.com/califio/publications/blob/main/MADBugs/CV...

fragmede - 5 days ago

https://github.com/califio/publications/tree/main/MADBugs/CV... would have been a better link

decidu0us9034 - 4 days ago

I could see that being an incremental time save (perhaps not worth the token spend except for the dev team, not a high-value bug). But nbody finds this kind of bug "by hand" and hasn't for a long time now. Do people here really care about kernel security or testing automation? They're just talking about it because Claude? Everything on HN is people doing unpaid promotional work for Anthropic, just talking about all the promise Claude holds and all the various ways you could be spending more money on Claude. bored aimless vibes.

neonstatic - 4 days ago

> "Claude wrote"

I am hoping that quite soon we will have general acceptance of the fact that "Claude can write code" and we will switch focus to how good / not good that code is.

m132 - 5 days ago

Appreciate the full prompt history

a96 - a day ago

Ah, RPC. The gift that keeps on giving even after 30 years of security fails.

yumiatlead - 4 days ago

This showcases the immense power and autonomy of agents, which is the root of enterprise fear. It highlights the urgent need for governance and safety.

andrewstuart - 4 days ago

Errrr the headline makes it sound like a bad thing.

This is what Claude is meant to be able to do.

Preventing it doing so is just security theater.

EGreg - 4 days ago

This requires an SSH to be available?

Is it possible to pwn without SSH listening?

sheepscreek - 5 days ago

I find it more concerning that this is still considered newsworthy. Frontier LLMs in the hands of anyone willing to learn and determined can be a blessing or curse.

navilai - 3 days ago

[dead]

jeremie_strand - 5 days ago

[dead]

Adam_cipher - 5 days ago

[flagged]

imta71770 - 4 days ago

[dead]

imta71770 - 4 days ago

[dead]

aplomb1026 - 4 days ago

[dead]

bustah - 4 days ago

[dead]

volume_tech - 4 days ago

[flagged]

htx80nerd - 4 days ago

[flagged]

alcor-z - 4 days ago

The MADBugs work is solid, but what's sticking with me is the autonomy angle — not just finding a vuln but chaining multiple bugs into a working remote exploit without a human in the loop. FreeBSD kernel security research has always been thinner on the ground than Linux, which makes this feel both more impressive and harder to put in context. What's the actual blast radius here — is this realistically exploitable on anything with default configs, or does it need very specific conditions?

jdurban - 4 days ago

[flagged]

dheerajmp - 5 days ago

You do not need Claude for finding FreeBSD vulns. Just plain eyes. Pick a file you can find one.

PunchyHamster - 5 days ago

I'm just gonna assume it was asked to fix some bug and it wrote exploit instead

rithdmc - 5 days ago

Running into a meeting, so won't be able to review this for a while, but exciting. I wonder how much it cost in tokens, and what the prompt/validator/iteration loop looked like.