Skip to content
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

Add fuzzer for core helper functions #1153

Merged
merged 2 commits into from Jun 10, 2022
Merged

Conversation

dthaler
Copy link
Collaborator

@dthaler dthaler commented May 27, 2022

Description

  • Add fuzzer for core helper functions

Fixes #620

Testing

This PR adds tests.

Documentation

Updated

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #1153 (6b69c4a) into main (25abe8f) will increase coverage by 10.61%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##             main    #1153       +/-   ##
===========================================
+ Coverage   77.57%   88.18%   +10.61%     
===========================================
  Files          91       99        +8     
  Lines       14593    17255     +2662     
===========================================
+ Hits        11321    15217     +3896     
+ Misses       3272     2038     -1234     
Impacted Files Coverage Δ
libs/execution_context/ebpf_maps.c 89.66% <50.00%> (-0.50%) ⬇️
libs/platform/user/ebpf_handle_user.c 76.71% <0.00%> (-17.41%) ⬇️
libs/platform/ebpf_trampoline.c 78.48% <0.00%> (-14.25%) ⬇️
libs/platform/ebpf_object.c 88.88% <0.00%> (-9.42%) ⬇️
tests/libs/common/common_tests.cpp 92.92% <0.00%> (-7.08%) ⬇️
libs/execution_context/ebpf_core.c 91.97% <0.00%> (-6.66%) ⬇️
tests/end_to_end/helpers.h 91.37% <0.00%> (-6.40%) ⬇️
libs/ebpfnetsh/links.cpp 94.73% <0.00%> (-5.27%) ⬇️
libs/ebpfnetsh/pins.cpp 95.00% <0.00%> (-5.00%) ⬇️
libs/ebpfnetsh/maps.cpp 95.45% <0.00%> (-4.55%) ⬇️
... and 59 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25abe8f...6b69c4a. Read the comment docs.

@dthaler dthaler changed the title Helper function fuzzer Core helper function fuzzer May 27, 2022
@dthaler dthaler changed the title Core helper function fuzzer Add fuzz tests for core helper functions May 27, 2022
@dthaler dthaler mentioned this pull request May 28, 2022
3 tasks
@dthaler dthaler added the tests label May 28, 2022
@dthaler dthaler marked this pull request as ready for review May 31, 2022 15:13
dthaler added a commit that referenced this pull request Jun 2, 2022
This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
@dthaler dthaler marked this pull request as draft June 2, 2022 20:45
@dthaler dthaler changed the title Add fuzz tests for core helper functions Add fuzzer for core helper functions Jun 2, 2022
@dthaler dthaler marked this pull request as ready for review June 2, 2022 21:20
@dthaler
Copy link
Collaborator Author

dthaler commented Jun 3, 2022

Filed ossf/scorecard-action#329 to track potential bug in scorecard action resulting in the check failure.

dthaler added a commit that referenced this pull request Jun 6, 2022
This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
@dthaler dthaler added the security Related to security hardening label Jun 6, 2022
Alan-Jowett
Alan-Jowett previously approved these changes Jun 7, 2022
dthaler added a commit that referenced this pull request Jun 7, 2022
This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
dthaler added a commit that referenced this pull request Jun 8, 2022
This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
@dthaler dthaler force-pushed the helper-fuzzer branch 2 times, most recently from 49cd613 to 76e8cc5 Compare June 8, 2022 17:05
@dthaler dthaler requested a review from Alan-Jowett June 8, 2022 17:06
Alan-Jowett
Alan-Jowett previously approved these changes Jun 8, 2022
@dthaler dthaler force-pushed the helper-fuzzer branch 2 times, most recently from 37375cb to 14afe1f Compare June 9, 2022 18:36
dthaler added a commit that referenced this pull request Jun 9, 2022
This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
dthaler added a commit that referenced this pull request Jun 9, 2022
This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
@dthaler dthaler force-pushed the helper-fuzzer branch 2 times, most recently from 2326644 to 33e5dae Compare June 9, 2022 20:06
Alan-Jowett
Alan-Jowett previously approved these changes Jun 9, 2022
Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Initial chunk of business logic

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

More business logic

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Add initial helper fuzzer corpus

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Fix code analysis warning

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Update docs and CI/CD

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Update README.md

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Fix analysis warning

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Add verifier_fuzzer step to github CI/CD

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Add core helper and bpf2c fuzzers to CI/CD

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Fix fuzzers in CI/CD

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Remove changes for other fuzzers from cicd file

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Cleanup

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
@Alan-Jowett Alan-Jowett merged commit 8bc456b into microsoft:main Jun 10, 2022
Alan-Jowett added a commit that referenced this pull request Jun 14, 2022
* Enable verifier fuzzer in github CI/CD

This is another piece split out from PR #1153

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Add -artifact_prefix=Artifacts\

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Co-authored-by: Alan Jowett <alanjo@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Related to security hardening tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate fuzz testing
3 participants