Mayhem Error - Please ensure this target was in fact compiled with libFuzzer, and that it runs correctly

I was able to build the fuzz targets successfully but I am getting this error for the package GitHub - apollographql/router: 馃 Rust Graph Routing runtime for Apollo Federation 馃殌. As far as I know, the repo does use libFuzzer. Search 路 libFuzzer 路 GitHub

Hi @prateekvishnu,

I found your run and attempted to run it locally. This is what I discovered:

docker run -it --entrypoint /bin/bash ghcr.io/prateekvishnu/router@sha256:9966f0e46ff2db2cdc7d4d5f01b2b824b234533d0160754162f151ac7f287263   
Unable to find image 'ghcr.io/prateekvishnu/router@sha256:9966f0e46ff2db2cdc7d4d5f01b2b824b234533d0160754162f151ac7f287263' locally
ghcr.io/prateekvishnu/router@sha256:9966f0e46ff2db2cdc7d4d5f01b2b824b234533d0160754162f151ac7f287263: Pulling from prateekvishnu/router
d5fd17ec1767: Already exists 
c68dfdb7cd09: Pull complete 
b8ec9d63f616: Pull complete 
Digest: sha256:9966f0e46ff2db2cdc7d4d5f01b2b824b234533d0160754162f151ac7f287263
Status: Downloaded newer image for ghcr.io/prateekvishnu/router@sha256:9966f0e46ff2db2cdc7d4d5f01b2b824b234533d0160754162f151ac7f287263
root@7574ee1af98a:/# /federation 
/federation: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Looking into your binary, it seems you are missing some libraries:

root@7574ee1af98a:/# ldd ./federation 
        linux-vdso.so.1 (0x00007fff4c7f1000)
        libssl.so.1.1 => not found
        libcrypto.so.1.1 => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f48f356d000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f48f3552000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f48f352f000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f48f33e0000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f48f33d8000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f48f31e6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f48f98a5000)

Installing these libraries into the image seems to resolve the issue.

root@7574ee1af98a:/# apt update -y && apt install -y libssl-dev
[output...]
root@7574ee1af98a:/# ldd federation 
        linux-vdso.so.1 (0x00007ffc23a3b000)
        libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f84de03b000)
        libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f84ddd65000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f84ddb83000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f84ddb68000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f84ddb45000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f84dd9f6000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f84dd9ee000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f84dd7fc000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f84e4224000)

This is super weird I did install libssl-dev, I installed it again and it works. But I get different errors, might be the repository too.