Agents find unknown bugs in root-of-trust firmware
Reviewing Mjolnir: Finding and Reproducing Vulnerabilities in Root-of-Trust Firmware and RTL with Project-Grounded Agents · Collin MacDonald, Carl Lundin, Stephen Herwig et al.

Researchers give AI agents each project's threat model and design rules, then make them prove findings with tests in the project's own toolchain. The approach uncovers previously unknown, maintainer-confirmed bugs in root-of-trust firmware and hardware designs, the kind of flaw that never crashes and may be unfixable once silicon ships.
Maintainers of three open root-of-trust projects have confirmed 64 security bugs they did not know about. An AI agent pipeline found them. Many are the kind of bug that never crashes anything.
That is what makes this interesting. A root of trust is the small piece of firmware and hardware that anchors secure boot and attestation. Everything above it believes what it says. A flaw in the boot code burned permanently into the chip, or in the chip design itself, may be unfixable once the silicon ships.
Most automated bug hunting leans on crashes. A fuzzer throws inputs until something falls over. Root-of-trust bugs often do not fall over. A missing check at a trust boundary, or a fault-injection countermeasure that one function forgets, runs quietly. Nothing generic flags it, because the rule only exists in that project's design.
So the researchers, with a system called Mjolnir, gave the agents the rules. One agent first summarises the project: its architecture, where its trust boundaries sit, and which odd-looking code is a deliberate defence. Per-file auditors hunt with that context. A separate reviewer then reads every candidate sceptically and tries to close it. On one model, it threw out most of what the auditors proposed.
The clever part is the proof. Without real hardware, a finding has to be exercised through the project's own hardware models, mocks or chip-design simulation testbenches. The pipeline writes proof-of-concept tests in the project's normal build tooling, against unmodified production code. A diff check allows only test changes. A final review rejects tests that mock out the very logic under suspicion. That turns a plausible claim into something a maintainer can run.
It works. On one firmware target, a smaller Gemini Flash model produced 24 findings that experts labelled blind, and all 24 held up. Single agents on the same model managed roughly two thirds to four fifths.
The researchers are plain about the limits. The pipeline cannot do fault injection or measure side channels, so bugs that need a glitch on real hardware stay unproven. The diff check is coarse: a build-file change could mask production behaviour, so a human still reads the test. File-by-file auditors can miss invariants spread across several files. Runs are unstable too. Across five runs on one model, fewer than half the issues recurred. If you use something like this, run it more than once and with more than one model.
What I find notable is that none of this needed a special model. It needed the project's threat model and its own test harness. An attacker controlling root-of-trust inputs could use the same class of bugs to bypass secure boot, forge attestation or leak keys. Some of those bugs cannot be patched later. The time to find them is before the chip ships.
Further analysis
Problem
Root of trust (RoT) firmware and RTL anchor secure boot and attestation, so defects there can invalidate every layer that depends on them and in some cases cannot be fixed after fabrication. Existing LLM-based vulnerability finders struggle with RoT code because many security-relevant flaws arise from project-specific trust boundaries or required countermeasures rather than generic bug patterns, and logic flaws often produce no crash. In addition, exercising RoT inputs requires the project's hardware models, mocks, or RTL testbenches; generic harnesses and crash-based evidence are insufficient.
Approach
Mjolnir is a multi-stage, project-grounded agent pipeline that integrates a concise per-project threat model and an automated Project Expert summary into discovery, skeptical review, deduplication, and native reproduction. The stages are: a Project Expert agent that summarises architecture, trust boundaries and intentional countermeasures; per-file Source File Auditor agents that propose candidate findings; a Deduplicator that collapses shared root causes; an Adversarial Reviewer that sceptically audits candidates; and a PoC Exploit Generator that produces tests running in the project's own toolchain (Cargo, Bazel, Verilator) and hardware models or testbenches. PoCs must run against unmodified production code and the system enforces a diff check that allows only test-only changes; a final review rejects PoCs that mock the target logic or weaken production checks. The pipeline is model-agnostic, packaged with Nix, and applies unchanged to C and Rust firmware and SystemVerilog RTL.
Key Findings
- Precision on Caliptra runtime firmware ranged from 83.3% to 100% across three models; Gemini 3.8 Flash produced 100% precision (24 of 24 expert-labelled open findings) versus 66.7%–78.6% for four single-agent baselines on the same model.
- On 34 known security-relevant bugs in Caliptra core firmware fixed after the models' training cutoffs, Mjolnir found 10 with Gemini 3.8 Flash (baseline best: 7) and 17 with Gemini 4 Argon (baseline best: 12).
- Across evaluation scans maintainers confirmed 64 previously unknown security-relevant bugs: 37 from Caliptra runtime runs across three models and 27 from single scans of five other targets spanning Caliptra, OpenTitan and OpenPRoT.
- Review stages substantially reduce false positives: the initial Adversarial Reviewer closed the majority of candidates (for example 71.4% on Gemini 3.8 Flash), and most surviving findings received PoCs that ran in the project's native harness.
- Stability is imperfect: repeated runs and multiple models increase coverage; across five Gemini Flash runs Mjolnir reported 25 distinct issues, of which 9 recurred across runs, indicating single runs miss some findings.
- Per-run cost varied widely by model and configuration ($7.62–$180.03); simple single-agent baselines cost far less ($3.50–$4.60) but produce no PoCs or staged review.
Limitations
Mjolnir cannot perform physical attacks such as fault injection or side-channel measurement and therefore cannot verify bugs that require those capabilities; such findings remain open as harness limitations. The PoC diff check is conservative but coarse: it may accept inline test edits or build-file changes that mask production behaviour, so final human review remains necessary. Per-file auditors may miss multi-file invariants unless connected code is discovered via tools or the Project Expert. Evaluation measures recall only on bugs fixed after model cutoffs to avoid training-data contamination; repeated runs and multiple models broaden coverage.
Implications
Offensively, an adversary controlling RoT inputs can exploit the class of bugs Mjolnir finds to bypass secure boot or anti-rollback, extract or leak device secrets and derived keys, forge attestation evidence, escalate privileges across trust boundaries, cause arbitrary DMA or denial-of-service, or otherwise violate platform security objectives. Some vulnerable components, notably boot ROM or RTL errors, may be unfixable in deployed silicon, making pre-release discovery essential. The results show that attacker-capable agentic systems grounded in project context and native harnesses can systematically discover and reproduce such logic and countermeasure omissions, increasing the practical attack surface when flaws exist.
The paper title, authors and abstract
Mjolnir: Finding and Reproducing Vulnerabilities in Root-of-Trust Firmware and RTL with Project-Grounded Agents
A root of trust (RoT) anchors secure boot and attestation for the system above it, so a bug in RoT firmware or hardware undermines every layer that trusts it. LLM agents now find real vulnerabilities in general-purpose software, but RoT code presents two challenges. First, many security-relevant bugs depend on project-specific trust boundaries and fault-injection countermeasures rather than generic vulnerability patterns, and may cause no crash. Second, without RoT hardware, agents must exercise RoT inputs through the project's own hardware model, mocks, or RTL testbenches. We present Mjolnir, an agentic pipeline that supplies each project's threat model and design conventions to discovery and skeptical review agents, and reproduces surviving findings as proof-of-concept tests in the project's own toolchain. We evaluate Mjolnir on six firmware and RTL targets in Caliptra, OpenTitan, and OpenPRoT. On Caliptra's runtime firmware, it reaches 83.3%-100% precision across three models under blind expert labeling, including 100% on Gemini 3.8 Flash versus 66.7%-78.6% for four single-agent baselines on the same model. On 34 known security-relevant bugs in Caliptra's core firmware fixed after the models' training cutoffs, it finds 10 with Gemini 3.8 Flash versus 7 for the best baseline, and 17 with Gemini 4 Argon versus 12. Across our evaluation scans, maintainers have confirmed 64 of Mjolnir's findings as previously unknown security-relevant bugs: 37 across three models on Caliptra's runtime firmware and 27 across single scans of the other five targets.


