Skip to content

Commit 542eb2c

Browse files
committed
fix: raise fuzz-smoke rss_limit_mb 512->2048 (mcb_libfuzzer OOM)
The Clang ASan+UBSan CI job's mcb_libfuzzer hit libFuzzer's OOM guard (550MB against a 512MB -rss_limit_mb) during the 20s corpus-seeded smoke run -- newly reached now that the tinyobjloader ODR violation no longer aborts the job earlier. Not a per-input security bug: replaying the exact CI-reported "oom-" artifact (a 172-byte MCB file) 2000x in a single process found no leak and no crash. Root cause is ordinary coverage-guided fuzzing growth -- libFuzzer retains every corpus entry that finds new coverage in memory for the whole run, and ASan adds its own instrumentation overhead on top, so RSS climbs steadily over a run with zero malicious input involved. Confirmed via local repro with the identical seed/params: peaked at 505MB and 822MB across two seeds in 20s runs, 668MB over a longer 40s run, all with zero crashes. mc3_xml_libfuzzer (365MB) and mc3_json_libfuzzer (282MB) in the same CI run were comfortably under 512MB already, so the shared ceiling only needed raising, not a per-target split. Raised the shared --rss-mib ceiling (run_fuzz_smoke.py's own default, and its explicit CI invocation) from 512 to 2048 -- comfortably above every local measurement, costs nothing during normal operation (an abort ceiling, not a reservation). Same fix pattern as mc3_json_document_budget's CTest TIMEOUT: raise the ceiling to match legitimate behavior rather than treating a calibration mismatch as a security finding.
1 parent 9342e4a commit 542eb2c

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ jobs:
214214
build-sanitize/mc3togltf/mc3togltf \
215215
mc3togltf/test/golden/basic_scene.mc3.xml \
216216
build-sanitize/fuzz-corpus/glb/basic_scene.glb
217-
python3 test/run_fuzz_smoke.py --seconds 20 --rss-mib 512 \
217+
python3 test/run_fuzz_smoke.py --seconds 20 --rss-mib 2048 \
218218
--work-dir build-sanitize/fuzz-work \
219219
--target build-sanitize/mc3/mc3_xml_libfuzzer mc3/test/fuzz/corpus/xml \
220220
--target build-sanitize/mc3/mc3_json_libfuzzer mc3/test/fuzz/corpus/json \

test/run_fuzz_smoke.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@ def main() -> int:
1515
parser = argparse.ArgumentParser()
1616
parser.add_argument("--seconds", type=int, default=20,
1717
help="maximum libFuzzer run time per target")
18-
parser.add_argument("--rss-mib", type=int, default=512,
18+
# 512 (the original default) is too tight: a normal, non-malicious ASan
19+
# run legitimately grows RSS well past it just from libFuzzer's own
20+
# retained in-memory corpus (it keeps every input that finds new
21+
# coverage) plus ASan's own instrumentation overhead -- confirmed via
22+
# local repro (peaked at 505MB/20s and 822MB/20s across two seeds, 668MB
23+
# over a longer 40s run, zero crashes/leaks in any of them), matching a
24+
# CI run that hit 550MB and got killed by the old 512MB ceiling. Not a
25+
# per-input security bug (replaying the exact CI-reported "oom-" input
26+
# 2000x in one process found no leak). 2048 leaves real headroom above
27+
# the highest local measurement rather than just clearing one observed
28+
# number -- raise the ceiling, don't shrink real fuzzing coverage, same
29+
# fix pattern as mc3_json_document_budget's CTest TIMEOUT.
30+
parser.add_argument("--rss-mib", type=int, default=2048,
1931
help="libFuzzer resident-memory ceiling per target")
2032
parser.add_argument("--work-dir", type=Path, required=True,
2133
help="generated working corpora and crash artifacts; never a source corpus")

0 commit comments

Comments
 (0)