From a49531faac36473c728b6e505b17e30347093e46 Mon Sep 17 00:00:00 2001 From: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com> Date: Tue, 21 Nov 2023 12:38:20 +0100 Subject: [PATCH] fix dockerfile, add retry for fuzzserver and add dictionary for fuzzserver Signed-off-by: Sepehrdad Sh <26747519+sepehrdaddev@users.noreply.github.com> --- fuzz/Dockerfile | 7 +- fuzz/dictionaries/FuzzServer.dict | 217 ++++++++++++++++++++++++++++++ fuzz/fuzz_targets/FuzzServer.go | 17 ++- 3 files changed, 236 insertions(+), 5 deletions(-) create mode 100644 fuzz/dictionaries/FuzzServer.dict diff --git a/fuzz/Dockerfile b/fuzz/Dockerfile index 5df35c3b5c..474d24dc57 100644 --- a/fuzz/Dockerfile +++ b/fuzz/Dockerfile @@ -4,14 +4,13 @@ WORKDIR /workspace COPY . . -ENV DEBIAN_FRONTEND=noninteractive \ - CC=clang +ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y make clang && \ +RUN apt-get update && apt-get install -y make clang-11 && \ go install github.com/mdempsky/go114-fuzz-build@latest && \ apt-get autoremove --purge -y && apt-get autoclean && \ go mod init fuzz && go mod tidy && \ - /usr/bin/make all + make all CC=clang-11 -j $(nproc) ENTRYPOINT [ "/usr/bin/make" ] diff --git a/fuzz/dictionaries/FuzzServer.dict b/fuzz/dictionaries/FuzzServer.dict new file mode 100644 index 0000000000..203226c193 --- /dev/null +++ b/fuzz/dictionaries/FuzzServer.dict @@ -0,0 +1,217 @@ +# Sources: https://github.com/google/fuzzing/blob/master/dictionaries/http.dict +" *" +" -" +" \"" +"../" +"/.." +"/./" +"//" +"///" +": " +":/" +"; " +"" +"" +"html" +"http" +"HTTP/1.0" +"HTTP/1.1" +"HTTP2-Settings" +"https" +"If-Match" +"If-Modified-Since" +"If-None-Match" +"If-Range" +"If-Unmodified-Since" +"IM" +"keep-alive" +"LABEL" +"Last-Modified" +"Link" +"LINK" +"Location" +"LOCK" +"lockinfo" +"lockscope" +"locktype" +"Lynx" +"Max-Forwards" +"me" +"MERGE" +"mi" +"MKACTIVITY" +"MKCALENDAR" +"MKCOL" +"MKREDIRECTREF" +"MKWORKSPACE" +"MOVE" +"Negotiate" +"nokeepalive" +"only-if-cached" +"OPTIONS" +"ORDERPATCH" +"Origin" +"owner" +"P3P " +"P3P" +"pa" +"PATCH" +"POST" +"Pragma" +"PRI" +"private area" +"PROPFIND" +"PROPPATCH" +"Proxy-Authenticate" +"Proxy-Authorization" +"Proxy-Connection" +"Public-Key-Pins" +"PUT" +"q=0.000" +"Range" +"re" +"REBIND" +"Referer" +"Refresh" +"REPORT" +"Retry-After" +"Save-Data" +"SEARCH" +"secret" +"Server" +"session=" +"Set-Cookie" +"shared" +"Status" +"Strict-Transport-Security" +"TE" +"test" +"Timing-Allow-Origin" +"Tk" +"TRACE" +"Trailer" +"trans" +"Transfer-Encoding" +"UNBIND" +"UNCHECKOUT" +"UNLINK" +"UNLOCK" +"UPDATE" +"UPDATEREDIRECTREF" +"Upgrade" +"Upgrade-Insecure-Requests" +"us" +"User-Agent" +"Vary" +"VERSION-CONTROL" +"Via" +"Warning" +"write" +"WWW-Authenticate" +"*\x00" +"\x0D\x0A" +"\x1F\x8B" +"X-ATT-DeviceId" +"X-Content-Duration" +"X-Content-Security-Policy" +"X-Content-Type-Options" +"X-Correlation-ID" +"X-Csrf-Token" +"X-Forwarded-For" +"X-Forwarded-Host" +"X-Forwarded-Proto" +"X-Frame-Options" +"x-gzip" +"X-Http-Method-Override" +"