Darkkey / erlamsa

Erlang port of famous radamsa fuzzzer.
MIT License
66 stars 10 forks source link

UDP proxy hangs often #12

Closed ghost closed 3 years ago

ghost commented 5 years ago

Erlamsa very often hangs when being used in UDP proxy mode. Setup: Ubuntu 18.04 x64 VM, 8GB, 4 cores Steps to reproduce (ncat is needed to help with port forwarding): Open 4 terminals, in which do:

  1. Create an erlamsa proxy from port A to port B: erlamsa -i udp://55545:127.0.0.1:55546 -P 0.1,0.1 -L - -O -cm:port=51235
  2. create a loopback from port B to port A to get enough traffic
    1. I use another erlamsa erlamsa -i udp://55546:127.0.0.1:55545 -P 0.1,0.1 -L - -O -cm:port=51236 to generate a larger amount of diverse traffic and make the problem appear faster.
    2. Or, an ncat pipe should also suffice: while true; do ncat -u -l localhost 55546 --sh-exec "ncat -u localhost 55545"; done;. In my setup, it takes approx. a minute to reach the error.
  3. top / htop or other activity monitor to validate that the system is operational
  4. Inject some traffic into the feedback loop by doing echo | ncat --send-only -u 127.0.0.1 55545. Using yes or similar commands might also work. Repeat step 4 in this terminal until the error appears in one of the erlamsas:
    2019-06-24 16:21:42.778 <<0.67.0>> [info]: from udp client(c->s {127,0,0,1}:40267) [data_len = 1]: <<"\n">>
    2019-06-24 16:21:42.778 <<0.181.0>> [info]: starting fuzzer main (parent = <0.67.0>), random seed is: {20456,41723,59679}
    Stopped possibly bugged process: <0.181.0> (launched @ 1561393302, now is 1561393335)
ghost commented 5 years ago

After some testing, it seems that the most hangups come from erlamsa_mutations:mutate_a_num/2

Darkkey commented 3 years ago

Should have been fixed some time ago, please notify if it still exists.