Repository navigation
ci(fuzz): the nightly runs each target for its whole time budget and fails on a crash (#187) - #232
Merged
Merged
Conversation
…fails on a crash (#187)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 26, 2026
DrunkOnJava
enabled auto-merge (squash)
October 26, 2026 10:30
4 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
…ile, not a panic (#271) The fuzz nightly (#187, made able to fail by #232) found it on its first strict run: dwg_file_open panicked at src/r2007.rs:353 with 'attempt to add with overflow'. load_system_page computed span with saturating multiplies, then sliced bytes[offset..offset + span]; a hostile header makes span usize::MAX, so the sum overflows (a panic in debug and fuzz builds, a silent wrap in release). The same unchecked offset + length pattern sat at four more places that take both values from the file: the file-header payload (0x20 + stored), section-map names (pos + name_len) and data pages (base + span, base + compressed). All five now build their range with checked_range(start, len), which is None on overflow, so each falls into the Truncated or SectionMap error it already reported. align_up saturates instead of overflowing. The crash input is committed as a dwg_file_open fuzz seed. On it, a debug dwg-info built from main exits 101 with the panic; built from this branch, it exits 0 and reports the container as _R2007_UNREADABLE, the reader's existing fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The nightly fuzz workflow could not fail and did not fuzz for its budget. Each target's run step had
continue-on-error: trueand ended in2>&1 | head -n 500 || true, and-runs=100000stopped libFuzzer after about 11 seconds of the documented 300. This removes all three, so the time budget alone ends a clean run and a crash, leak or timeout fails that target's job. Refs #187.Spec reference
No spec section. Fuzzing: #187 (every target run for an hour with no findings; durations recorded).
Changes, all in
.github/workflows/fuzz-nightly.yml:continue-on-error, no| head -n 500 || true: libFuzzer's exit status reaches the job.headclosing early could also SIGPIPE the fuzzer once its output passed 500 lines.-runs=100000:-max_total_timegoverns, as the header comment always said.-print_final_stats=1, so every run records executions and peak RSS (Every fuzz target run for an hour with no findings #187 asks for recorded durations).env:instead of${{ }}insiderun:.timeout-minutes10 → 15, room for a cold-cache release build (the first nightly after deps(deps): bump libfuzzer-sys from 0.4.12 to 0.4.13 in /fuzz in the fuzz group #200 changes the fuzz lockfile) before the 300 s budget starts.Test plan
Dispatched on this branch with a 60 s budget, run 40296541245 (before the timeout change, which no 60 s run approaches):
Done ... in 61 second(s)src/handle_map.rs:102:33, "slice index starts at 2 but ends at 1", inputAAEABAoAAAA=AAEAAAAQEjQAAA==The last scheduled nightly on
main(run 40277371843, 2026-10-26 06:00 UTC) reported all nine green, each having stopped atDone 100000 runs in ~11 second(s); the same panic is reachable from both targets' seeds within seconds, and the old step could not have reported it.After this merges the nightly is red until the handle-map fix lands (#231). A red nightly is then a real finding, not a workflow regression; land #231 first or together.
actionlintclean. No code or tests change.Source-provenance declaration
By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:
CI configuration only; libFuzzer flags from its own documentation.
Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.