hn.today

Finding logic bugs without general-purpose bug oracles

anthropic.com14 points3 comments
Screenshot of Finding logic bugs without general-purpose bug oracles

Logic bugs violate a program’s intended rules without necessarily causing crashes or memory errors, so conventional fuzzers and static analyzers often lack a general way to recognize them. The study tests whether language models can infer those rules from code and find violations. Researchers built a benchmark of 21 previously fixed bugs from SQLite, zstd, brotli, and image-png. Models received unpatched code and had to produce inputs that caused behavior to differ from the patched version. Some runs were blind, with no description of the bug; others were given the violated invariant.

The strongest methods were straightforward agentic code review and informal correctness proofs. In blind testing, an agent using Claude Code rediscovered 11 of 21 bugs, while LLM-generated fuzzing assertions and LLM-guided symbolic execution found none. Even when given bug-specific information, the more elaborate methods mainly succeeded because the model had spotted the bug during code review, not because fuzzing or symbolic execution added much. The researchers also tested newer models, accounting for possible recall of public bugs, and used these methods to find previously unknown logic bugs in Caliptra, macOS, eBPF, and the Rust compiler. The results suggest that models can independently reason about code invariants and generate test cases, and that teams should try agentic review before investing in specialized bug-finding machinery.

Read on anthropic.com3 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

Tailscale: Post-Quantum Cryptography

Tailscale: Post-Quantum Cryptography

Post-quantum cryptography protects key exchange from future quantum attacks, including “harvest now, decrypt later” attempts; hybrid exchange combines classical and post-quantum algorithms for protection if either remains secure. WireGuard uses fixed handshake algorithms, so adding post-quantum protection requires protocol changes and endpoint updates. (tailscale.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.