oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

infra: add support for netdriver fuzzing with honggfuzz

Open DavidKorczynski opened this issue 3 years ago • 3 comments

Adds an example with the mongoose webserver

DavidKorczynski avatar Mar 02 '22 14:03 DavidKorczynski

I think this could face some of the issues mentioned in https://github.com/google/oss-fuzz/issues/7347

DavidKorczynski avatar Mar 02 '22 16:03 DavidKorczynski

Sorry for late response, I think this can be useful

/* HF NetDriver signature - if found within file, it means it's a NetDriver-based binary */
#define _HF_NETDRIVER_SIG "\x01_LIBHFUZZ_NETDRIVER_BINARY_SIGNATURE_\x02\xFF"

https://github.com/google/honggfuzz/blob/623d8bb620c0d8ca8ac67a0dea8ab4cf835ea706/honggfuzz.h#L56

robertswiecki avatar Mar 03 '22 09:03 robertswiecki

@jonathanmetzman -- you approved this but I wanted to double check if it's ready before merging it in?

DavidKorczynski avatar Mar 04 '22 14:03 DavidKorczynski

/gcbrun trial_build.py mongoose --sanitizer address coverage memory undefined --fuzzing-engine libfuzzer afl honggfuzz

jonathanmetzman avatar Sep 08 '22 15:09 jonathanmetzman

Trial builds don't work here because they don't work on forked repos :-(

jonathanmetzman avatar Sep 08 '22 22:09 jonathanmetzman

Trial builds don't work here because they don't work on forked repos :-(

Do I need to do something to make this work, or how do you prefer to move forward?

DavidKorczynski avatar Sep 09 '22 15:09 DavidKorczynski

Trial builds don't work here because they don't work on forked repos :-(

Do I need to do something to make this work, or how do you prefer to move forward?

The changes look relatively self contained, so let's merge.

Going forward, for infra-related PRs like these, can you create them off a branch on the main repo instead?

oliverchang avatar Sep 12 '22 01:09 oliverchang

Trial builds don't work here because they don't work on forked repos :-(

Do I need to do something to make this work, or how do you prefer to move forward?

The changes look relatively self contained, so let's merge.

Going forward, for infra-related PRs like these, can you create them off a branch on the main repo instead?

It shouldn't be too hard to support forks, I'm just avoiding implementing this to reduce bus factor: https://github.com/google/oss-fuzz/issues/8273

jonathanmetzman avatar Sep 12 '22 12:09 jonathanmetzman