On 3/18/20 1:24 PM, habib dan aouta wrote:
So I installed Libnbd which worked fined and then I was trying to run
Libnbd-fuzz-wrapper.c and with afl using :
afl-fuzz -i fuzzing/testcase_dir -o fuzzing/sync_dir -M fuzz01
\./fuzzing/libnbd-fuzz-wrapper @@
when I try that command it gives me an error saying Libnbd-fuzz-wrapper.c is not an EFL
binary. Then I tried to compile Libnbd-fuzz-wrapper.c first into an executable file and
then I get the following error:
libnbd-fuzz-wrapper.c:130:3: warning: implicit declaration of function
'nbd_connect_socket' [-Wimplicit-function-declaration]
nbd_connect_socket (nbd, sock);
I also added the #include<libnbd.h> into the Libnbd-fuzz-wrapper.c but still
getting the same error.
Finally I ran this command : ld -lnbd —verbose and I found out libnbd library is missing
attempt to open //usr/local/lib/x86_64-linux-gnu/libnbd.so failed
Hmm. That does not happen on Linux, but IS a typical error message on
Cygwin. POSIX says that file names beginning with //name are
implementation-defined; Linux defines them to resolve to /name, Cygwin
defines them to be access to a file on the remote machine 'name' (as a
nod to Windows \\server\share\file). If there is no remote machine
named //usr in your network, that would explain not only this message,
but also the message about libnbd-fuzz-wrapper not being an ELF binary
(Windows uses pe-coff rather than ELF file format for its binaries, and
I have no idea if afl can even begin to work with pe-coff).
But since you didn't give us details about your platform, I'm shooting
in the dark.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org