AFL cannot run /path/to./default/.cur_input

43 views
Skip to first unread message

Xaqan Kerimov

unread,
Mar 21, 2023, 12:42:17 AM3/21/23
to afl-users

I have build wasmer with:


```

CC=afl-gcc CXX=afl-g++ make


```

when I run `afl-fuzz` on the target like this:


```

afl-fuzz -i input/ -o . ../wasmer/target/release/wasmer run @@


```


it gives the following error (with AFL_DEBUG=1):


```

error: failed to run `/path/to/test/./default/.cur_input`

│   1: module instantiation failed (compiler: cranelift)

╰─▶ 2: WebAssembly translation error: Error when converting wat: expected at least one module field

            --> <anon>:1:1

             |

           1 | 

             | ^


[-] Hmm, looks like the target binary terminated before we could complete a

handshake with the injected code. You can try the following:


    - The target binary crashes because necessary runtime conditions it needs

      are not met. Try to:

      1. Run again with AFL_DEBUG=1 set and check the output of the target

         binary for clues.

      2. Run again with AFL_DEBUG=1 and 'ulimit -c unlimited' and analyze the

         generated core dump.


    - Possibly the target requires a huge coverage map and has CTORS.

      Retry with setting AFL_MAP_SIZE=10000000.


Otherwise there is a horrible bug in the fuzzer.

Poke <afl-...@googlegroups.com> for troubleshooting tips.

```

P.S. I have changed parent directories to "/path/to" that is not so important


Nikolay Shaplov

unread,
Mar 22, 2023, 11:39:20 AM3/22/23
to afl-users, Xaqan Kerimov
В письме от вторник, 21 марта 2023 г. 07:42:16 MSK пользователь Xaqan Kerimov
написал:
> afl-fuzz -i input/ -o . ../wasmer/target/release/wasmer run @@
>
> it gives the following error (with AFL_DEBUG=1):
>
> error: failed to run `/path/to/test/./default/.cur_input`

I guess it is error message from the program you are trying to fuzz, not from
AFL++

try to create file /path/to/test/./default/.cur_input, put some valid input
data there (Or invalid may be)
and try to run

../wasmer/target/release/wasmer run /path/to/test/./default/.cur_input

Does it work as expected?

--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su
signature.asc
Reply all
Reply to author
Forward
0 new messages