libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

fuzz_options.dict (2102B)


      1 # libFuzzer dictionary for fuzz_options (GNU libmicrohttpd).
      2 #
      3 # The first 16 bytes of the input configure the daemon -- the MHD_FLAG
      4 # combination, the MHD_OPTION values and which callbacks are installed --
      5 # and the rest is fuzz_request's segment stream, "(op << 14) | length"
      6 # followed by that many bytes of wire data.
      7 #
      8 # So the useful tokens are of two kinds: request fragments for the segment
      9 # stream, and the two-byte segment headers that frame them.  The daemon
     10 # configuration itself is a dense bit field and needs no dictionary: every
     11 # byte value means something, which is exactly the case a mutator handles
     12 # well on its own.
     13 
     14 # --- segment headers: (op << 14) | length, little endian ---------------
     15 # op 0 "send", short payloads
     16 seg_send_16="\x10\x00"
     17 seg_send_32="\x20\x00"
     18 seg_send_64="\x40\x00"
     19 # op 2 "send and pump extra rounds"
     20 seg_pump_0="\x00\x80"
     21 seg_pump_16="\x10\x80"
     22 # op 3 "close, reopen, send"
     23 seg_newconn_16="\x10\xc0"
     24 seg_newconn_32="\x20\xc0"
     25 
     26 # --- request lines -----------------------------------------------------
     27 get="GET / HTTP/1.1\x0d\x0a"
     28 post="POST / HTTP/1.1\x0d\x0a"
     29 head="HEAD / HTTP/1.1\x0d\x0a"
     30 options_star="OPTIONS * HTTP/1.1\x0d\x0a"
     31 http10="GET / HTTP/1.0\x0d\x0a"
     32 
     33 # --- headers that interact with daemon options -------------------------
     34 host="Host: x\x0d\x0a"
     35 conn_close="Connection: close\x0d\x0a"
     36 conn_keepalive="Connection: keep-alive\x0d\x0a"
     37 conn_upgrade="Connection: Upgrade\x0d\x0a"
     38 upgrade="Upgrade: fuzz-protocol\x0d\x0a"
     39 cl0="Content-Length: 0\x0d\x0a"
     40 cl_big="Content-Length: 1048576\x0d\x0a"
     41 te_chunked="Transfer-Encoding: chunked\x0d\x0a"
     42 expect100="Expect: 100-continue\x0d\x0a"
     43 ctype_form="Content-Type: application/x-www-form-urlencoded\x0d\x0a"
     44 ctype_multipart="Content-Type: multipart/form-data; boundary=b\x0d\x0a"
     45 cookie="Cookie: a=b\x0d\x0a"
     46 auth_basic="Authorization: Basic dXNlcjpwYXNz\x0d\x0a"
     47 auth_digest="Authorization: Digest username=\"user\"\x0d\x0a"
     48 crlf="\x0d\x0a"
     49 
     50 # --- bodies ------------------------------------------------------------
     51 chunk_end="0\x0d\x0a\x0d\x0a"
     52 chunk_4="4\x0d\x0aabcd\x0d\x0a"
     53 form="a=1&b=2"