Repository navigation
Closed
Description
The machine carries 22 patches in C: kernel 10, QEMU 7 (0007 is #652), qboot 4, systemd 1 and OpenSSH 1. Nothing analyses or fuzzes them. Read 2026-11-23 at origin/main:
- Fuzzing: none. There is no
func Fuzzin the Go tree, no QEMU fuzz target (tests/qtest/fuzz) and no syzkaller. The "fuzz" in the Dockerfiles ispatch --fuzz=0, the context a patch is applied with. - Static analysis of C: none. No Coverity, CodeQL, scan-build, GCC
-fanalyzer, cppcheck, sparse or smatch runs. kernel/Dockerfile says the kernel patches arecheckpatch.pl --strictclean, but no build checks it. - Sanitizers: none. QEMU and qboot are never built with ASan or UBSan.
- The patched packages' own tests are off. image/openssh/Dockerfile and image/systemd/Dockerfile build with
DEB_BUILD_OPTIONS=nocheck. OpenSSH's regress suite never runs overuserauth-delay-failures.patch, which is in the authentication path, and systemd's tests never run over0001-dropin-derive-candidate-names-once.patch. - What does run: the functional probes (
boot:record,boot:compat, the release's pause checks, the lab), osv.yml over the image's packages, and for Gogofmt,go vet, go-tools' linters and mutation testing.
Where the risk is, by what an attacker reaches
The trust boundary is the host. A guest is the tenant's, so a QEMU patch that a guest can drive is the first priority.
| patch | reached by | priority |
|---|---|---|
OpenSSH userauth-delay-failures |
anyone who reaches the guest's sshd, the auth path | high |
| QEMU 0005, an incoming machine's TSC from its migration | a state file (spin's, but stored and copied) | high |
QEMU 0002 virtio-scsi max_target, 0003, 0004, 0007 |
the guest (0002, its SCSI scan), QMP (0003, 0004), the host's kernel file (0007) | medium |
| qboot's 4 patches | the guest's own firmware, inside the guest | medium |
| kernel 0012 and 0013, BPF and BTF | a process in the guest loading BPF: the verifier path | medium (in-guest privilege) |
| kernel 0001-0010, ftrace, PCI, ORC | the guest's own boot | low |
| systemd 0001 | unit files in the guest | low |
Proposal, cheapest first, each a step in the build that carries the patch ("fail where the cause is")
- Turn the packages' tests back on for what we patch. Run OpenSSH's
make tests(or at leastregress/for auth) and systemd's meson tests for the unit-loading code in their Dockerfiles. This is the cheapest and the most important item. - Enforce checkpatch, and add sparse. Run
checkpatch.pl --stricton kernel/patches andmake C=2(sparse) on the files they touch, in kernel/Dockerfile. Also run the BPF selftests (test_verifier,test_progs) on a kernel with 0012 and 0013, in a guest on the bench. - CodeQL for C/C++, scoped to the patched files. The repository is public, so it is free. It is GitHub's own action and needs no account outside, unlike Coverity Scan.
- A QEMU built with ASan and UBSan, as a lab tree, running
boot:record,boot:compat,checkpoint-pauseand a restore. 0005's migration path and 0002's SCSI scan run under the sanitizers. - Fuzzing, where input crosses a boundary:
- QEMU's generic-fuzz on virtio-scsi with
max_target(0002). - A fuzzer over a state's TSC section (0005).
- Go
func Fuzzfor what the machine parses from outside:Savedand the machine record (CanResume), and QMP replies.
- QEMU's generic-fuzz on virtio-scsi with
How to settle: steps 1-2 land as build checks. Step 3 is a workflow. Steps 4-5 are lab trees and a scheduled run, each with its finding filed or "nothing found" recorded here.
Metadata
Metadata
Assignees
Labels
No labels
Activity
codeql: analyse the files the patches touch, and fail on a result in …
image: run the rebuilt packages' tests over what they patch (#653)
kernel: enforce checkpatch --strict on kernel/patches and fail on new…
codeql: fail on a touched C file the analysis did not read; trace the…
codeql: fail on a touched C file the analysis did not read; trace the…
machine, qmp: fuzz the record, CanResume and QMP's replies; refuse a …
ci: fuzz each Go target for a minute on every change (#653)
qemu: the patches under ASan and UBSan, booted and fuzzed (#653)
qemu: the patches under ASan and UBSan, booted and fuzzed (#653)
qemu: the patches under ASan and UBSan, booted and fuzzed (#653)
qemu: the patches under ASan and UBSan, booted and fuzzed (#653)
aledbf commentedon Nov 23, 2026
Steps 4 and 5. What runs where:
FuzzARecordReadBack,FuzzCanResumeandFuzzWhatQEMUSaysrun for 60 s each in ci.yml'sfuzzjob on every change (task fuzz). FuzzCanResume found that a record whose machine names a fact with no name was read, and that a refusal of it then named nothing.newHardwarenow refuses an empty name, and the input is kept inmachine/testdata/fuzz.bootsruns on the KVM fleet: the release's QEMU_FLAGS built from the patched tree under both sanitizers, then boot:record, boot:patches, checkpoint-pause, lab compat, and 3 ssh-first and 3 restore-first.patched reportsfails on any report, names the patch whose file holds the innermost frame (or upstream), and fails on logs that record no process. Run 45239239212: every step passed, and the verb said "49 sanitized QEMU processes, no report" (measured).max_target=15: 5 min on a change, 30 min weekly. Run 45235332661 did 79194 inputs in 301 s and run 45239239212 did 80347, with no report in either (measured). A weekly report opens an issue once for each kind and place.Nothing found in QEMU's patches. This closes once #678 merges.
qemu: the patches under ASan and UBSan, booted and fuzzed (#653)
aledbf commentedon Nov 23, 2026
All five steps are in: the patched packages' own tests (#655), checkpatch and sparse (#656), CodeQL on the patched files with an extraction guard and our own Go and workflows, daily on main (#657, #659, #668), ASan/UBSan QEMU booted and fuzzed over virtio-scsi on a QEMU change and weekly (#678), and Go fuzz targets over the record, CanResume and QMP replies, daily on main (#670, #688). Findings: one, a record with a nameless hardware fact, fixed in #670. #677 (0005's TSC) decided not worth a fuzzer.