| Mode | Name | Size | |
|---|---|---|---|
| -rw-r--r-- | .gitignore | 325 | logstatsplainblame |
| -rw-r--r-- | Makefile | 2494 | logstatsplainblame |
| -rw-r--r-- | README.md | 1758 | logstatsplainblame |
| d--------- | corpus | 193 | logstatsplain |
| -rw-r--r-- | fuzz_expr.c | 1992 | logstatsplainblame |
| -rw-r--r-- | fuzz_input.c | 1397 | logstatsplainblame |
| -rw-r--r-- | fuzz_jsonval.c | 1339 | logstatsplainblame |
| -rw-r--r-- | fuzz_kdl.c | 1375 | logstatsplainblame |
| -rw-r--r-- | fuzz_osc5577.c | 2789 | logstatsplainblame |
| -rw-r--r-- | fuzz_proto.c | 1043 | logstatsplainblame |
| -rw-r--r-- | standalone_main.c | 1346 | logstatsplainblame |
Fuzz harness
libFuzzer + ASan + UBSan targets for every self-contained parser surface in
slosh. Each target compiles only its own .c against its header — no vendor
libraries, no libghostty-vt linking — so the build is fast and the coverage
is tight.
Targets
| target | source | attack surface |
|---|---|---|
kdl |
src/kdl.c |
config and layout files |
jsonval |
src/jsonval.c |
control-API JSON (MSG_CMD on the socket) |
expr |
src/expr.c |
shader expression compiler + evaluator |
proto |
src/proto.c |
client↔server wire framing |
osc5577 |
src/osc5577.c |
pane status-bar escape sequences |
input |
src/input.c |
outer-terminal keyboard/mouse/paste |
Quick start
cd tests/fuzz
make # build libFuzzer binaries
make run-kdl TIME=30 # fuzz one target for 30 seconds
make run-all TIME=15 # fuzz all targets, 15 seconds each
make replay # build file-replay binaries (no libFuzzer)
make corpus # replay seed corpora (CI gate, no fuzzing)
Crashes land in findings/<target>/; grown corpora stay in corpus/<target>/.
Reproducing a crash
./replay_kdl findings/kdl/crash-abc123 # under ASan, no fuzzer runtime
gdb --args ./replay_kdl findings/kdl/crash-abc123
Adding a target
- Write
fuzz_foo.cwithLLVMFuzzerTestOneInput. - Add
footoTARGETSin the Makefile. - Drop seed inputs in
corpus/foo/.
The Makefile convention is that fuzz_foo.c + src/foo.c compile together
with no other objects. If a new target needs more, add an explicit rule.
