-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ci: run the fuzz target on PRs #4378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4378 +/- ##
==========================================
- Coverage 81.46% 81.46% -0.01%
==========================================
Files 353 353
Lines 84477 84477
==========================================
- Hits 68821 68818 -3
- Misses 15656 15659 +3
|
5e247e7
to
6558716
Compare
000abd7
to
954523e
Compare
54319af
to
c7b066e
Compare
8b2b098
to
a1f6988
Compare
using https://google.github.io/oss-fuzz/getting-started/continuous-integration/ It downloads the corpus OSS-Fuzz has accumulated so far (including the test cases that triggered issues in the past) and runs the fuzz target with it. It should help to catch most regressions when PRs are opened. Prompted by secdev#4373.
to make it possible to turn it off with logging.disable(). (it should help to make the fuzz target less chatty among other things because it seems to be the only dissector (covered by the fuzz target) printing messages like that directly)
Currently CIFuzz triggers AttributeError: 'NoneType' object has no attribute 'val'
Traceback (most recent call last):
File "pcap_fuzzer.py", line 31, in TestOneInput
File "scapy/packet.py", line 1688, in summary
File "scapy/packet.py", line 1662, in _do_summary
File "scapy/packet.py", line 1662, in _do_summary
File "scapy/packet.py", line 1662, in _do_summary
File "scapy/packet.py", line 1665, in _do_summary
File "scapy/layers/ldap.py", line 736, in mysummary
AttributeError: 'NoneType' object has no attribute 'val' but since it's reproducible with the master branch it's ignored and the CI is green here as expected because it isn't introduced in this PR: 2024-07-01 07:43:55,579 - root - INFO - Done downloading latest build.
2024-07-01 07:43:55,580 - root - INFO - Trying to reproduce crash using: /tmp/tmpmj6t60wr/crash-32c922e403e265577a7a671701c4a984f455c808.
2024-07-01 07:44:44,733 - root - INFO - Reproduce command returned: 1. Reproducible on /github/workspace/cifuzz-prev-build/pcap_fuzzer.
2024-07-01 07:44:44,734 - root - INFO - The crash is reproducible on previous build. Code change (pr/commit) did not introduce crash. All in all I think in its current form it can catch shallow issues when PRs are opened. (Also google/oss-fuzz#12074 was merged so CIFuzz should be more or less in sync with the scapy repository) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this work !
using https://google.github.io/oss-fuzz/getting-started/continuous-integration/
It downloads the corpus OSS-Fuzz has accumulated so far (including the test cases that triggered issues in the past) and runs the fuzz target with it. It should help to catch most regressions when PRs are opened.
Prompted by #4373.
It's a draft because to make it more useful in terms of testing
the dissectors should probably be covered first(The dissectors were (partly) covered in google/oss-fuzz#11912).As expected it triggered
https://github.com/secdev/scapy/actions/runs/8941500042/job/24561958924?pr=4378