eBPF Verifier Repair
Repariert eBPF-Verifier-Ablehnungen aus dem rohen ausführlichen Ladelog, zuerst der Beweis
Getestet · Funktioniert
Was es kann
Ein repair workflow für eBPF programs, die der kernel verifier refuses to load: it reads the verbose verifier log, maps the rejected instruction back to the value that lost the required proof, and makes the smallest source change that restores it without altering program semantics. Covers packet bounds, nullable pointers, uninitialized stack, reference lifetime, scalar range und pointer provenance across libbpf C, Rust/Aya, libbpf-rs und BCC. Wird bei verifier errors, -EACCES load failures, BPFix diagnostics und CI load logs ausgelöst.
Testbericht
Getestet against the repo's own benchmark case packet_checked_wrong_base_001, reading only the buggy source and the verifier log. Without the skill the obvious repair ist to widen the guard from data+14 to data+15, which silences the error and keeps the wrong-header read; the case README calls that out as the wrong answer and the bundled test would fail its 14-byte-frame check. Following the skill's raw-log-triage and Bounds rules produced the maintainer's fixed.bpf.c almost verbatim - typed ethhdr base, guard on the same pointer that is later used - and passed all three of the bench oracle's source predicates that the baseline failed 0-for-3. Das bundled extract_verifier_failure.py lief auch clean on a real 3.2KB log, slicing the libbpf preamble down to the actual PROG LOAD region. Die bpfix binary itself ist optional and never needed for this path, but the clone pulls about 200MB.
Getestet am: 2026-07-30 · Claude Code 2.x (agent harness)
Installation
git clone --depth 1 https://github.com/eunomia-bpf/bpfix.git mkdir -p ~/.claude/skills cd bpfix && cp -r skills/ebpf-verifier-repair ~/.claude/skills/ebpf-verifier-repair
Befehle & Beispiel-Prompts
/ebpf-verifier-repairRepariert eBPF-Verifier-Ablehnungen aus dem rohen ausführlichen Ladelog, zuerst der Beweis
Skills reagieren auf normale Anfragen — keine Slash-Befehle nötig. Nach der Installation aktivieren Prompts wie diese den Skill (auf Englisch):
My XDP program won't load, verifier says R1 offset is outside of the packetlibbpf gives -EACCES on prog load, here's the verbose verifier log, fix itAya program rejected with "Unreleased reference id=2", help me repair it