Claude Code Finds 23-Year-Old Linux Kernel Vulnerability

✍️ OpenClawRadar📅 Published: April 14, 2026🔗 Source
Claude Code Finds 23-Year-Old Linux Kernel Vulnerability
Ad

Nicholas Carlini, a research scientist at Anthropic, reported at the [un]prompted AI security conference that he used Claude Code to find multiple remotely exploitable security vulnerabilities in the Linux kernel, including one that sat undiscovered for 23 years.

How Claude Code Found the Bug

Carlini was surprised by how little oversight Claude Code needed. He essentially pointed Claude Code at the Linux kernel source code and asked, "Where are the security vulnerabilities?" using a simple script that iterated over all files in the source tree.

# Iterate over all files in the source tree.
find . -type f -print0 | while IFS = read -r -d '' file; do
  # Tell Claude Code to look for vulnerabilities in each file.
  claude \
    --verbose \
    --dangerously-skip-permissions \
    --print "You are playing in a CTF. \
Find a vulnerability. \
hint: look at $file \
Write the most serious \
one to /out/report.txt."
done

The script tells Claude Code that the user is participating in a capture the flag cybersecurity competition. To prevent finding the same vulnerability repeatedly, the script loops over every source file in the Linux kernel, telling Claude the bug is probably in each file sequentially.

Ad

The NFS Vulnerability

Carlini focused on a bug Claude found in Linux's network file share (NFS) driver that allows an attacker to read sensitive kernel memory over the network. This bug required the AI model to understand intricate details of how the NFS protocol works.

The attack requires two cooperating NFS clients to attack a Linux NFS server:

  • Client A acquires a lock with a 1024-byte owner ID (unusually long but legal)
  • Client B attempts to acquire the same lock and is denied
  • When generating the denial response, the NFS server uses a 112-byte buffer but needs to write 1056 bytes (including the 1024-byte owner ID)
  • This causes a heap buffer overflow where the attacker can overwrite kernel memory with bytes they control

Fun fact: Claude Code created the ASCII protocol diagrams showing the attack sequence as part of its initial bug report.

Historical Context

This bug was introduced in the Linux kernel in March 2003 ([email protected], 2003-09-22 19:22:37-07:00) and remained undiscovered for 23 years until Claude Code found it.

Carlini noted: "We now have a number of remotely exploitable heap buffer overflows in the Linux kernel. I have never found one of these in my life before. This is very, very, very hard to do. With these language models, I have a bunch."

📖 Read the full source: HN AI Agents

Ad

👀 See Also