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 fuzzing test for libhttpserver and submit to oss-fuzz #213

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sgbhat2
Copy link

@sgbhat2 sgbhat2 commented Nov 29, 2020

Requirements for Adding the fuzzing test

Fuzzing is a well-known technique to unravel security vulnerabilities and programming errors in the code.

This PR is aimed to add fuzz tests to libhttpserver using LLVM's LibFuzzer with a goal to integrate libhttpserver to oss-fuzz.

Issue or RFC Endorsed by Maintainers

bcd12d3 --> This bug was found from the fuzz testing.

Description of the Change

Following changes are made following the oss-fuzz guide

  • Add a fuzz target to test the HTTP server
  • Add seed corpus to help LibFuzzer generate meaningful inputs

The fuzz targets are not integrated with the build system of the library. Instructions to build and run the fuzz targets are mentioned in the README.md

Alternate Designs

N/A

Possible Drawbacks

N/A

Verification Process

The fuzz target is locally built and verified to run by following these steps

Release Notes

  • N/A

Add fuzz target for HTTP server using libFuzzer. The fuzz target
sends HTTP request to server using the fuzzed input from libFuzzer.
@codecov
Copy link

codecov bot commented Dec 6, 2020

Codecov Report

Merging #213 (aa058fe) into master (7cb4eb8) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   95.60%   95.62%   +0.01%     
==========================================
  Files          35       35              
  Lines        3233     3246      +13     
==========================================
+ Hits         3091     3104      +13     
  Misses        142      142              
Impacted Files Coverage Δ
test/unit/http_utils_test.cpp 100.00% <0.00%> (ø)
src/http_utils.cpp 99.17% <0.00%> (+<0.01%) ⬆️

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 7cb4eb8...aa058fe. Read the comment docs.

Add fuzz target and corpus for testing ip_representation() API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant