Skip to content

Commit ec1ded6

Browse files
committed
fix(json): Phase 3 — fuzz the JSON decoder; fix two heap-overflows + a map-free leak
make fuzz-json (the agent-facing input boundary: every LLM tool-call response / parsed HTTP body flows through sw_lang_json_decode) found two real heap-buffer-overflows on its first run, both OOB reads on malformed JSON: 1. _jd_parse number path: when a value was expected but the char was unparseable, it force-advanced (*pp)++ to guarantee progress WITHOUT checking for the NUL terminator — at end-of-input (e.g. `{"a":` then EOF) it stepped past `\0`, and the next _jd_skip_ws read past the buffer. Now it never steps past NUL; the enclosing array/object loops gate on **pp and terminate. 2. _jd_parse_string escape path: a string whose last byte is a backslash (`\` then NUL) consumed the backslash, then the switch's default case copied the NUL and (*pp)++ stepped past the terminator. Now a trailing backslash at EOF stops the loop. Both are OOB READS on untrusted input — exactly the class Phase-3 fuzzing exists to catch. The recursion-depth guards (SW_JD_MAX_DEPTH etc.) were already correct; these were pointer-advance-past-NUL bugs. Also fixed a latent leak surfaced while making the fuzz harness free its output: sw_val_free's MAP case freed the key/val arrays but not the element nodes (the tuple/list case already recursed). Now it recurses — safe (all callers free fully-owned trees; none alias map sub-values) and it plugs a real runtime leak anywhere maps are sw_val_free'd. - tests/fuzz/fuzz_json.c + corpus (incl. a 5000-deep array): 20k mutations, clean. Wired into make fuzz and the CI fuzz leg (parser / JSON / distribution-unmarshal / HTTP, all under ASAN+UBSAN). Verified: all 4 fuzz targets clean, test-sw + conformance, gc-stress, lsan-gate, 28 doc programs — green. https://claude.ai/code/session_01G7WBQwXWk9ggdbnoMDtuTW
1 parent a72e32a commit ec1ded6

11 files changed

Lines changed: 105 additions & 12 deletions

File tree

.github/workflows/linux-quickstart.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,11 @@ jobs:
148148
# counters + ctx_lock; the later spawn-storm crash cleared on
149149
# native Linux x86_64 May 29, so any miss here is a regression.
150150
run: make stress
151+
152+
- name: Fuzz (Phase 3 — untrusted-input boundaries under ASAN/UBSAN)
153+
# 20k mutations per target over parser, JSON decoder (agent-facing
154+
# boundary), distribution unmarshal, and HTTP header parser. Every
155+
# external-input surface must be memory-safe on arbitrary bytes.
156+
# fuzz-json found two real heap-overflows (number force-advance past
157+
# NUL, backslash-at-EOF) on the first run — so this gate earns its keep.
158+
run: make fuzz

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,21 @@ FUZZ_RT := $(SRC_DIR)/swarmrt_native.c $(SRC_DIR)/swarmrt_asm.S $(SRC_DIR)/swarm
268268
$(SRC_DIR)/swarmrt_http.c $(SRC_DIR)/swarmrt_pdf.c $(SRC_DIR)/swarmrt_varena.c
269269
ASAN_FUZZ_ENV := ASAN_OPTIONS=detect_leaks=0:abort_on_error=1
270270

271-
.PHONY: fuzz fuzz-parse fuzz-marshal fuzz-http
271+
.PHONY: fuzz fuzz-parse fuzz-marshal fuzz-http fuzz-json
272272
fuzz-parse: dirs
273273
$(FUZZ_CC) $(CFLAGS) $(SAN) -DSW_FUZZ_STANDALONE -Itests/fuzz \
274274
tests/fuzz/fuzz_parse.c $(FUZZ_RT) -o $(BIN_DIR)/fuzz_parse $(LDFLAGS)
275275
@$(ASAN_FUZZ_ENV) $(BIN_DIR)/fuzz_parse tests/fuzz/corpus/parse
276276

277+
# JSON decoder — the agent-facing input boundary (every LLM tool-call
278+
# response / parsed HTTP body). Proves no crash/over-read/stack-overflow
279+
# on malformed or adversarially-nested input (the corpus includes a
280+
# 5000-deep array; g_jd_depth must bound it).
281+
fuzz-json: dirs
282+
$(FUZZ_CC) $(CFLAGS) $(SAN) -DSW_FUZZ_STANDALONE -Itests/fuzz \
283+
tests/fuzz/fuzz_json.c $(FUZZ_RT) -o $(BIN_DIR)/fuzz_json $(LDFLAGS)
284+
@$(ASAN_FUZZ_ENV) $(BIN_DIR)/fuzz_json tests/fuzz/corpus/json
285+
277286
fuzz-marshal: dirs
278287
$(FUZZ_CC) $(CFLAGS) $(SAN) -DSW_FUZZ_STANDALONE -Itests/fuzz \
279288
tests/fuzz/fuzz_marshal.c $(FUZZ_RT) -o $(BIN_DIR)/fuzz_marshal $(LDFLAGS)
@@ -287,7 +296,7 @@ fuzz-http: dirs
287296
tests/fuzz/fuzz_http.c $(FUZZ_RT) -o $(BIN_DIR)/fuzz_http $(LDFLAGS)
288297
@$(ASAN_FUZZ_ENV) $(BIN_DIR)/fuzz_http tests/fuzz/corpus/http
289298

290-
fuzz: fuzz-parse fuzz-marshal fuzz-http
299+
fuzz: fuzz-parse fuzz-json fuzz-marshal fuzz-http
291300

292301
# GC v1 correctness gate: the copy-on-escape stress harness compiled with ASAN +
293302
# SW_ARENA_POISON. Workers build compound values in their per-process arenas,

docs/PRODUCTION_ROADMAP.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ captures what shipped, what's pending, the gate philosophy, and the landmines.
2626
|------:|-------|--------|
2727
| 1 | Close correctness blockers (ownership + isolation) |**DONE** (audit-confirmed) |
2828
| 2 | Runtime hardening (race detection, atomics, alloc-failure, soak) |**DONE** (2.1–2.6); full 24h run pending a host |
29-
| 3 | Security & fault isolation (fuzzing, limits) | ⬜ pending |
29+
| 3 | Security & fault isolation (fuzzing, limits) | ⏳ fuzz boundaries ✅ (parser/JSON/dist/HTTP, depth-guarded); quotas/backpressure remain |
3030
| 4 | Operational readiness (observability, graceful shutdown, docs) | ⬜ pending |
3131
| 5 | Release discipline (multi-platform CI, gates, semver, independent review) | ⬜ pending |
3232

@@ -215,14 +215,25 @@ Do these in roughly this order. Each is "verify locally, then branch → ff-merg
215215
full day. This is a sign-off that requires a sustained host run; the harness is ready.
216216
---
217217

218-
## Phase 3 — SECURITY & FAULT ISOLATION
219-
- Fuzz every external-input boundary: parser/compiler, JSON, distribution protocol, HTTP/WebSocket,
220-
node unmarshalling, database + file builtins. (`make fuzz` already covers parse/marshal/http —
221-
extend it.)
222-
- Harden limits: max message size, mailbox limits + backpressure, process + memory quotas,
223-
recursion/decode depth (JSON depth guard `g_json_depth` exists — audit the rest), connection +
224-
request timeouts.
225-
- Prove malformed input cannot crash the runtime or another process.
218+
## Phase 3 — SECURITY & FAULT ISOLATION ⏳ (fuzz + depth limits DONE; quotas/backpressure remain)
219+
220+
**Done (Round-7 continuation):**
221+
- Fuzz every external-input boundary under ASAN/UBSAN, 20k mutations each, wired into CI
222+
(`make fuzz`): parser, **JSON decoder** (the agent-facing boundary), distribution
223+
`sw_unmarshal`, HTTP header parser. fuzz-json found and fixed **two real heap-buffer-overflows**
224+
on its first run (number force-advance past NUL; backslash-as-last-byte in a string), plus a
225+
latent incomplete-free in `sw_val_free`'s map case.
226+
- Recursion/decode-depth guards verified on every recursive decoder: parser
227+
(`SW_PARSE_MAX_DEPTH` + node budget + stack-headroom probe), JSON (`SW_JD_MAX_DEPTH` /
228+
compiled `SW_JSON_MAX_DEPTH`), distribution unmarshal (`SW_UNMARSH_MAX_DEPTH`).
229+
- Parser can't OOM swc (the receive-clause spin fix + per-parse node budget, Phase-3 fuzz item).
230+
231+
**Remaining (feature work, mostly product decisions):**
232+
- Limits/quotas: max message size, mailbox depth limit + backpressure, per-node process +
233+
memory quotas, connection/request timeouts. (`SW_MAX_PROCS` process ceiling exists; the rest
234+
are policy knobs to design.)
235+
- Extend fuzz to the WebSocket frame parser + the `db_*`/SQLite arg path.
236+
- Prove malformed input cannot crash another process (cross-process isolation under fuzz).
226237

227238
## Phase 4 — OPERATIONAL READINESS
228239
- Observability: per-process memory / mailbox depth / reductions, spawn/crash/restart counters,

src/swarmrt_lang.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,14 @@ void sw_val_free(sw_val_t *v) {
25572557
free(v->v.tuple.items); break;
25582558
case SW_VAL_FUN: /* don't free closure env -- owned by interpreter */ break;
25592559
case SW_VAL_MAP:
2560+
/* Recurse into key/val nodes (mirrors the tuple/list case) — the
2561+
* arrays alone left every entry's value node leaked. Safe: all
2562+
* callers free fully-owned trees (json_decode output, test args);
2563+
* none alias map sub-values. */
2564+
for (int i = 0; i < v->v.map.count; i++) {
2565+
sw_val_free(v->v.map.keys[i]);
2566+
sw_val_free(v->v.map.vals[i]);
2567+
}
25602568
free(v->v.map.keys); free(v->v.map.vals); break;
25612569
case SW_VAL_BYTES: free(v->v.bytes.data); break; /* always own a block (len>=1 alloc) */
25622570
default: break;
@@ -5620,6 +5628,11 @@ static sw_val_t *_jd_parse_string(const char **pp) {
56205628
while (**pp && **pp != '"' && len < (int)sizeof(buf) - 5) {
56215629
if (**pp == '\\') {
56225630
(*pp)++;
5631+
/* A backslash as the last byte before the NUL: stop. Otherwise
5632+
* the switch's default/simple cases copy the NUL and (*pp)++
5633+
* step PAST the terminator → heap-buffer-overflow on the next
5634+
* loop read (found by fuzz-json). The while gate ends the loop. */
5635+
if (**pp == '\0') break;
56235636
switch (**pp) {
56245637
case 'n': buf[len++] = '\n'; (*pp)++; break;
56255638
case 't': buf[len++] = '\t'; (*pp)++; break;
@@ -5716,7 +5729,15 @@ static sw_val_t *_jd_parse_inner(const char **pp) {
57165729
while (**pp >= '0' && **pp <= '9') (*pp)++;
57175730
if (**pp == '.') { is_float = 1; (*pp)++; while (**pp >= '0' && **pp <= '9') (*pp)++; }
57185731
if (**pp == 'e' || **pp == 'E') { is_float = 1; (*pp)++; if (**pp == '+' || **pp == '-') (*pp)++; while (**pp >= '0' && **pp <= '9') (*pp)++; }
5719-
if (*pp == start) { (*pp)++; return sw_val_nil(); }
5732+
if (*pp == start) {
5733+
/* Unparseable char where a value was expected. Force progress so
5734+
* callers' loops can't spin — but NEVER past the NUL terminator:
5735+
* at end-of-input (e.g. `{"a":` then EOF) stepping past `\0` is a
5736+
* heap-buffer-overflow (found by fuzz-json). The enclosing array/
5737+
* object loops gate on `**pp`, so leaving pp at the NUL ends them. */
5738+
if (**pp != '\0') (*pp)++;
5739+
return sw_val_nil();
5740+
}
57205741
char tmp[64];
57215742
size_t numlen = *pp - start;
57225743
if (numlen > 63) numlen = 63;

tests/fuzz/corpus/json/bad.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"unterminated

tests/fuzz/corpus/json/deep.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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/corpus/json/nested.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[1,2,[3,[4,[5]]]]

tests/fuzz/corpus/json/obj.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"a":1,"b":[1,2,3],"c":{"d":"e"}}

tests/fuzz/corpus/json/str.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"a string with \"quotes\" and \n"

0 commit comments

Comments
 (0)