clixon/test/fuzz/backend
Olof hagsand d358387d39 * Fixed: [State XML validation error when CLICON_MODULE_LIBRARY_RFC7895=true and ietf-yang-libra$
* Removed obsolete option: `CLICON_MODULE_LIBRARY_RFC7895'
  * Obsolete config options given in the confi file are considered an error
* Added section in CONTRIBUTING relating to optimzation
* Changed reset merge to implicit default values.
  * This avoids a potential overwriting of explicitly set default values in the existing config
* Adapted some code to [Make cligen_* functions const ](https://github.com/clicon/cligen/pull/83)
* Test: fixed test for * Fixed: [datamodel tree generated from basemodel tree is not proper when a list has more than one key and key is of enum type](https://github.com/clicon/clixon/issues/417)
2023-02-12 16:19:27 +01:00
..
input Moved fuzz dir to test/fuzz 2021-10-10 18:05:45 +02:00
README.md * HTTP/1 native parser as part of the RESTCONF client 2022-02-08 16:59:08 +01:00
runfuzz.sh * Fixed: [State XML validation error when CLICON_MODULE_LIBRARY_RFC7895=true and ietf-yang-libra$ 2023-02-12 16:19:27 +01:00

Clixon fuzzing

This dir contains code for fuzzing clixon backend. (NOTE DOES NOT WORK)

It requires the preeny package to change sockets to stdio.

Plugins do not work

Prereqs

Install AFL and preeny, see ..

Build

Make a modification to how Clixon sends internal messages in include/clixon_custom.h:

  #define CLIXON_PROTO_PLAIN

(Note this is obsolete)

Build clixon statically with the afl-clang compiler:

  CC=/usr/bin/afl-clang-fast LINKAGE=static ./configure --with-restconf=native
  make clean
  make
  sudo make install

Run tests

Populate the input/ dir with input usecases, there are two examples already in this dir that can be modified. Use the script runfuzz.sh to run one test:

  ./runfuzz.sh

After (or during) the test, investigate results in the output dir.