Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monitor/ don't output anything #137

Open
Nicholas-wei opened this issue Mar 10, 2023 · 2 comments
Open

monitor/ don't output anything #137

Nicholas-wei opened this issue Mar 10, 2023 · 2 comments

Comments

@Nicholas-wei
Copy link

Hi, I am new to magma, and I want to use magma to test my own fuzzer. After successfully setting up the environment(build.sh && start.sh can run poperly) and 24 hours' fuzz testing, I got nothing under magma_shared/monitor/ except an enmpty file named 5. And I am confused by that.

I have read the source code of canary.c and debugged. The problem is shown below.

// data_ptr->consumed seems to be always false, and canaries.raw has never been modified
 if (data_ptr->consumed) {
        memcpy(data_ptr->consumer_buffer, data_ptr->producer_buffer, sizeof(data_t));
        // memory barrier
        __sync_synchronize();
        data_ptr->consumed = false;
    }

I am sure that the source code is built with canary(I have used the default setting).
Does that mean that I have never reached the target? Or maybe there are some other problems releating to that?
My target is libpng with the env args given in magma's website, and my fuzzer is very similar to aflgo, I have used https://github.com/usc-isi-bass/magma/tree/aflgo to build aflgo, and I am pretty sure the build process is right.
I will be really thankful if anyone can help me.

@adrianherrera
Copy link
Member

adrianherrera commented Mar 10, 2023 via email

@hazimeh
Copy link
Member

hazimeh commented Apr 4, 2023

I'd also suggest making sure that the monitoring loop is running throughout the lifetime of the campaign.

As you can see, if the monitor exits with a non-zero code, no logs are generated. In that case, you should check the campaign logs to see the monitor's error output and map it back to the root failure cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants