C reproducers for upstream Linux kernel crashes (from syzbot), for checking whether newer kernels still hit known bugs.
| Path | Purpose |
|---|---|
crepros/ |
C reproducer sources (tracked in git) |
compiled/ |
Optional host-side build output from ./compile.sh (not tracked) |
fetch.py |
Scrape new C repros from syzbot |
compile.sh |
Optional host-side compiler helper |
scripts/run-qemu-repros.sh |
Boot QEMU, ship sources, compile+run inside the guest |
scripts/guest-run-repros.sh |
In-guest compile/run loop |
# Optional: refresh sources from syzbot
python3 -m pip install beautifulsoup4 requests
python3 fetch.py
# Full suite inside QEMU — default KERNEL_MODE=kasan boots a *current*
# syzbot KASAN mainline bzImage (bug-finding / kernelCTF oriented) with
# panic_on_warn / oops=panic on a Debian cloud rootfs.
./scripts/run-qemu-repros.sh
# One shard of 32 (same partitioning as CI)
SHARD_INDEX=0 SHARD_COUNT=32 ./scripts/run-qemu-repros.sh
# Smoke: 20 sources, 5s timeout
LIMIT=20 RUN_TIMEOUT=5 ./scripts/run-qemu-repros.sh
# Stock distro kernel (weak signal, no KASAN)
KERNEL_MODE=distro LIMIT=10 ./scripts/run-qemu-repros.sh
# Optional host-side builds (not required for the QEMU path)
./compile.sh --limit 50Pinned kernel URLs live in scripts/kernel-assets.conf. Default is the
newest ci-upstream-kasan-gce
build we last verified (mainline KASAN — goal is finding bugs, not tracking a
stable branch). Bump the pin from that manager’s top “kernel image” row when
you want fresher coverage; override with BZIMAGE_URL=... anytime.
| Workflow | Trigger | What it does |
|---|---|---|
| Fetch Repros | Daily + changes to fetch.py |
Runs fetch.py, commits new files under crepros/; dispatches the QEMU job when something new landed |
| Run Tests in QEMU VM | Weekly + changes under crepros/ / scripts |
Partitions all crepros/*.c across parallel QEMU shards; each guest installs gcc, compiles every assigned repro, and runs it with a 5s timeout |
Pull requests use a small 2×20 smoke so review stays cheap. Push, schedule, and manual dispatch run the full sharded suite (default 32 shards).
GitHub disables scheduled workflows after ~60 days of repository inactivity. If schedules stop firing, open the Actions tab and click Enable workflow, or push any commit to the default branch.
Manual runs: Actions → workflow → Run workflow (optional shard_count,
run_timeout, limit_per_shard).
- Host selects a deterministic shard of
crepros/*.cand packs a tarball. - QEMU boots a Debian cloud rootfs with either:
KERNEL_MODE=kasan(default): current syzbot KASAN mainlinebzImage, cmdlineoops=panic panic_on_warn=1 panic=0, QEMU-no-reboot, 4G RAM — tuned for surfacing memory bugs (kernelCTF-style); orKERNEL_MODE=distro: stock cloud kernel (smoke only). Cloud-init injects an SSH key and installsgcc/gcc-multilib.
- For each source: compile (dynamic link, optional
-m32), run undertimeout -s KILL $RUN_TIMEOUT(default 5 seconds), stream aRESULTline to the host, delete the binary. - If the guest panics, SSH drops. The host attributes the crash to the repro
that last emitted
BEGIN/LKRT_BEGIN(also stamped on the QEMU serial console), scrapes the serial log for oops/panic text, and writescrashes/<repro>.mdwith the excerpt. Status isPANICwhen an oops signature is found, otherwiseGUEST_CRASH. The VM is rebooted and the suite resumes the remainder of the shard. - Results land in
repro-results.tsvpluspanics.tsvand per-crash markdown reports (uploaded as CI artifacts).
This is still a signal suite against a distro guest kernel, not a full
upstream bzImage + KASAN syzbot reproduction environment.