메뉴
HN
Hacker News 57일 전

클로드, 23년 된 리눅스 취약점 발견

IMP
9/10
핵심 요약

Anthropic 연구원이 코딩 에이전트인 Claude Code를 활용해 23년 동안 발견되지 않았던 리눅스 커널의 원격 침투 가능 취약점을 찾아냈습니다. 간단한 스크립트를 통해 리눅스 커널 소스 코드를 분석하도록 지시한 결과, AI가 NFS(네트워크 파일 시스템) 프로토콜의 복잡한 로직을 이해하고 힙 버퍼 오버플로우 버그를 독립적으로 찾아낸 것입니다. 이는 LLM이 단순한 코딩 보조를 넘어 전문적인 사이버 보안 및 취약점 탐지 역량을 갖췄음을 보여주는 중요한 사례입니다.

번역된 본문

Anthropic의 연구 과학자인 Nicholas Carlini는 [un]prompted AI 보안 컨퍼런스에서 Claude Code를 사용하여 리눅스 커널에서 원격으로 악용 가능한 다수의 보안 취약점을 발견했으며, 그중 하나는 무려 23년 동안이나 발견되지 않았던 것이라고 발표했습니다. Nicholas는 Claude Code가 이러한 버그를 찾는 데 얼마나 효과적이었는지에 대해 놀라움을 금치 못했습니다.

"이제 우리는 리눅스 커널에서 원격으로 악용 가능한 여러 힙 버퍼 오버플로우(Heap Buffer Overflow) 취약점을 확보했습니다. 저는 평생 이런 것들을 한 번도 찾아낸 적이 없습니다. 이건 정말정말정말 하기 어려운 일입니다. 하지만 이 언어 모델들을 이용해 저는 여러 개를 찾아냈죠." — Nicholas Carlini, [un]prompted 2026에서 발언

Claude Code는 어떻게 버그를 찾았는가? 🔗 Nicholas가 공유한 취약점에서 가장 놀라운 점은 버그를 찾는 데 Claude Code가 거의 감독이 필요하지 않았다는 것입니다. 그는 기본적으로 Claude Code를 리눅스 커널 소스 코드에 제공하고 "보안 취약점이 어디에 있나요?"라고 질문했습니다. Nicholas는 다음과 유사한 간단한 스크립트를 사용합니다.

소스 트리의 모든 파일을 반복합니다.

find . -type f -print0 | while IFS = read -r -d '' file; do # Claude Code에게 각 파일에서 취약점을 찾도록 지시합니다. 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

이 스크립트는 사용자가 사이버 보안 CTF(Capture the Flag) 대회에 참가 중이며 퍼즐을 푸는 데 도움이 필요하다고 Claude Code에 알줍니다. Claude Code가 계속해서 동일한 취약점을 찾아내는 것을 방지하기 위해, 이 스크립트는 리눅스 커널의 모든 소스 파일을 반복하면서 버그가 파일 A, 그 다음에는 파일 B에 있을 가능성이 높다고 Claude에게 알립니다. 결국 Claude가 커널 내의 모든 파일에 집중하도록 만드는 방식입니다.

NFS 취약점 🔗 Nicholas는 자신의 발표에서 Claude가 리눅스의 네트워크 파일 공유(NFS) 드라이버에서 발견한 버그에 초점을 맞췄습니다. 이 버그는 공격자가 네트워크를 통해 중요한 커널 메모리를 읽을 수 있도록 허용합니다. Nicholas는 Claude Code가 단순히 명백한 버그를 찾거나 일반적인 패턴만을 찾는 것이 아님을 보여주기 위해 이 버그를 선택했습니다. 이 버그는 AI 모델이 NFS 프로토콜이 작동하는 복잡한 세부 사항을 이해해야만 발견할 수 있었습니다.

이 공격은 공격자가 두 개의 협력하는 NFS 클라이언트를 사용하여 리눅스 NFS 서버를 공격해야 합니다:

클라이언트 A NFS 서버 클라이언트 B | | | (1) |--- SETCLIENTID ---------------->| | |<-- clientid_a, confirm ---------| | |--- SETCLIENTID_CONFIRM -------->| | | | | (2) |--- OPEN "lockfile" ------------>| | |<-- open_stateid_a --------------| | |--- OPEN_CONFIRM --------------->| | | | | (3) |--- LOCK (1024바이트 owner) ----->| lock_owner = 1024b buf |<-- lock_stateid_a --------------| Lock granted | | |

(1) - 클라이언트 A는 NFS 작업을 시작하기 위해 NFS 서버와 3-way 핸드셰이크를 수행합니다. (2) - 클라이언트 A는 잠금 파일(lock file)을 요청합니다. 서버가 이를 수락하고, 클라이언트가 수락을 확인합니다. (3) - 클라이언트 A는 잠금을 획득하고 1024바이트의 소유자 ID(owner ID)를 선언합니다. 이는 소유자 ID로서는 비정상적으로 길지만 합법적인 값입니다. 서버는 잠금 획득을 허가합니다.

그런 다음 공격자는 서버와 통신하기 위해 두 번째 NFS 클라이언트인 클라이언트 B를 실행합니다:

클라이언트 A NFS 서버 클라이언트 B | | | (4) | |<-- SETCLIENTID -----------------| | |--- clientid_b, confirm -------->| | |<-- SETCLIENTID_CONFIRM ---------| | | | (5) | |<-- OPEN "lockfile" -------------| | |--- open_stateid_b ------------->| | |<-- OPEN_CONFIRM ----------------| | | | (6) | |<-- LOCK (동일한 범위) -----------| | | | +-----------+-----------+ | LOCK DENIED! | | 응답 인코딩: | | offset: 8B | | length: 8B | | type: 4B | | clientid: 8B | | owner_len: 4B | | owner: 1024B | | 총합: 1056B | +-----------+-----------+ | | |

(4) 클라이언트 B는 위 (1)과 동일하게 NFS 작업을 시작하기 위해 NFS 서버와 3-way 핸드셰이크를 수행합니다. (5) 클라이언트 B는 (2)의 클라이언트 A와 동일한 잠금 파일에 대한 접근을 요청합니다. NFS 서버가 이를 수락하고, 클라이언트가 수락을 확인합니다. (6) 클라이언트 B는 잠금을 획득하려고 시도합니다... (후략)

원문 보기
원문 보기 (영어)
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. Nicholas was astonished at how effective Claude Code has been at finding these bugs: 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. —Nicholas Carlini, speaking at [un]prompted 2026 How Claude Code found the bug 🔗&#xFE0E; What&rsquo;s most surprising about the vulnerability Nicholas shared is how little oversight Claude Code needed to find the bug. He essentially just pointed Claude Code at the Linux kernel source code and asked, &ldquo;Where are the security vulnerabilities?&rdquo; Nicholas uses a simple script similar to the following: # 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 &#34;You are playing in a CTF. \ Find a vulnerability. \ hint: look at $file \ Write the most serious \ one to /out/report.txt.&#34; done The script tells Claude Code that the user is participating in a capture the flag cybersecurity competition, and they need help solving a puzzle. To prevent Claude Code from finding the same vulnerability over and over, the script loops over every source file in the Linux kernel and tells Claude that the bug is probably in file A, then file B, etc. until Claude has focused on every file in the kernel. The NFS vulnerability 🔗&#xFE0E; In his talk, Nicholas focused on a bug that Claude found in Linux&rsquo;s network file share (NFS) driver which allows an attacker to read sensitive kernel memory over the network. Nicholas chose this bug to show that Claude Code isn&rsquo;t just finding obvious bugs or looking for common patterns. This bug required the AI model to understand intricate details of how the NFS protocol works. The attack requires an attacker to use two cooperating NFS clients to attack a Linux NFS server: Client A NFS Server Client B | | | (1) |--- SETCLIENTID ---------------->| | |<-- clientid_a, confirm ---------| | |--- SETCLIENTID_CONFIRM -------->| | | | | (2) |--- OPEN &#34;lockfile&#34; ------------>| | |<-- open_stateid_a --------------| | |--- OPEN_CONFIRM --------------->| | | | | (3) |--- LOCK (1024-byte owner) ----->| lock_owner = 1024b buf | |<-- lock_stateid_a --------------| Lock granted | | | | (1) - Client A does a three-way handshake with the NFS server to begin NFS operations. (2) - Client A requests a lock file. The server accepts, and the client acknowledges the acceptance. (3) - Client A acquires the lock and declares a 1024-byte owner ID, which is an unusually long but legal value for the owner ID. The server grants the lock acquisition. The attacker then spins up a second NFS client, Client B, to talk to the server: Client A NFS Server Client B | | | (4) | |<-- SETCLIENTID -----------------| | |--- clientid_b, confirm -------->| | |<-- SETCLIENTID_CONFIRM ---------| | | | (5) | |<-- OPEN &#34;lockfile&#34; -------------| | |--- open_stateid_b ------------->| | |<-- OPEN_CONFIRM ----------------| | | | (6) | |<-- LOCK (same range) -----------| | | | | +-----------+-----------+ | | | LOCK DENIED! | | | | Encode response: | | | | offset: 8B | | | | length: 8B | | | | type: 4B | | | | clientid: 8B | | | | owner_len: 4B | | | | owner: 1024B | | | | TOTAL: 1056B | | | +-----------+-----------+ | | | | (4) Client B does a three-way handshake with the NFS server to begin NFS operations, same as (1) above. (5) Client B requests access to the same lock file as Client A from (2). The NFS server accepts, and the client acknowledges the acceptance. (6) Client B tries to acquire the lock, but the NFS server denies the request because client A already holds the lock. The problem is that at step (6), when the NFS server tries to generate a response to client B denying the lock request, it uses a memory buffer that&rsquo;s only 112 bytes. The denial message includes the owner ID, which can be up to 1024 bytes, bringing the total size of the message to 1056 bytes. The kernel writes 1056 bytes into a 112-byte buffer, meaning that the attacker can overwrite kernel memory with bytes they control in the owner ID field from step (3). Fun fact: Claude Code created the ASCII protocol diagrams above as part of its initial bug report. Undiscovered for 23 years 🔗&#xFE0E; This bug was introduced in the Linux kernel in March 2003 : ChangeSet@1.1388, 2003-09-22 19:22:37-07:00, neilb@cse.unsw.edu.au [PATCH] knfsd: idempotent replay cache for OPEN state This implements the idempotent replay cache need for NFSv4 OPEN state. each state owner (open owner or lock owner) is required to store the last sequence number mutating operation, and retransmit it when replayed sequence number is presented for the operation. I've implemented the cache as a static buffer of size 112 bytes (NFSD4_REPLAY_ISIZE) which is large enough to hold the OPEN, the largest of the sequence mutation operations. This implements the cache for OPEN, OPEN_CONFIRM, OPEN_DOWNGRADE, and CLOSE. LOCK and UNLOCK will be added when byte-range locking is done (soon!). The bug is so old, I can&rsquo;t even link directly to it because it predates git, which wasn&rsquo;t released until 2005. More bugs than he can even report 🔗&#xFE0E; Nicholas has found hundreds more potential bugs in the Linux kernel, but the bottleneck to fixing them is the manual step of humans sorting through all of Claude&rsquo;s findings: I have so many bugs in the Linux kernel that I can&rsquo;t report because I haven&rsquo;t validated them yet&mldr; I&rsquo;m not going to send [the Linux kernel maintainers] potential slop, but this means I now have several hundred crashes that they haven&rsquo;t seen because I haven&rsquo;t had time to check them. —Nicholas Carlini, speaking at [un]prompted 2026 I searched the Linux kernel and found a total of five Linux vulnerabilities so far that Nicholas either fixed directly or reported to the Linux kernel maintainers, some as recently as last week: nfsd: fix heap overflow in NFSv4.0 LOCK replay cache (described above) io_uring/fdinfo: fix OOB read in SQE_MIXED wrap check futex: Require sys_futex_requeue() to have identical flags ksmbd: fix share_conf UAF in tree_conn disconnect ksmbd: fix signededness bug in smb_direct_prepare_negotiation() There&rsquo;s a big wave coming 🔗&#xFE0E; What&rsquo;s striking about Nicholas&rsquo; talk was how rapidly large language models have improved at finding vulnerabilities. Nicholas found these bugs using Claude Opus 4.6, which Anthropic released less than two months ago . He tried to reproduce his results on older AI models, and discovered that Opus 4.1 (released eight months ago ) and Sonnet 4.5 (released six months ago ) could find only a small fraction of what Nicholas found using Opus 4.6: I expect to see an enormous wave of security bugs uncovered in the coming months, as researchers and attackers alike realize how powerful these AI models are at discovering security vulnerabilities. Original talk 🔗&#xFE0E; Nicholas Carlini - Black-hat LLMs at [un]prompted 2026 Discuss on Hacker News L Lobsters Reddit Read My Book I'm writing a book of simple techniques to help developers improve their writing. My book will teach you how to: Create clear and pleasant software tutorials Attract readers and customers through blogging Write effective emails Minimize pain in writing design documents Read Michael's Book Be the first to know when I post cool stuff Subscribe to get my latest posts by email. Only blog posts All posts (monthly retrospectives, book reports, etc.) Share on Twitter Facebook LinkedIn Please enable Javascript to