stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.3k stars 1.71k forks source link

Oss-fuzz initialize #651

Closed 0x34d closed 1 year ago

0x34d commented 1 year ago

For Everything related to oss-fuzz.

  1. create the project.
  2. create the fuzzer.
  3. run the fuzzer.
  4. reproduce bugs.
cla-bot[bot] commented 1 year ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

cla-bot[bot] commented 1 year ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

cla-bot[bot] commented 1 year ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

0x34d commented 1 year ago

Already signed it.

0x34d commented 1 year ago

@cla-bot check

cla-bot[bot] commented 1 year ago

The cla-bot has been summoned, and re-checked this pull request!

stephane commented 1 year ago

@0x34d thank you for the PR but I'm sure that this fuzzer code will be abandoned once merged. This code is only useful if maintained by people who know how to write fuzzing tests and it should be included in a CI.

0x34d commented 1 year ago

I do understand. Well, fuzzing of project can be done by oss-fuzz.  I will not give my words, but I can add some new targets.  Can you hold the PR merge?  These days I'm learning Autotools.  So, compiling fuzzing targets can be done in a much easier way.

Regards Arjun.

stephane commented 1 year ago

Hi @0x34d,

I merged #669 and now your work on libmodbus fuzzer is now part of your CI. The last run (https://github.com/stephane/libmodbus/actions/runs/3567020621/jobs/5994200530) raised an issue about a non-existing directory (fuzz from https://github.com/google/oss-fuzz/blob/master/projects/libmodbus/build.sh#L18).

Could you have a look at the issue, please?

0x34d commented 1 year ago

Yes, Fuzz is not available in the root dir of libmodbus.

There are two available fix:

  1. you merge the https://github.com/stephane/libmodbus/pull/658
  2. I make a New PR which have Fuzz dir init.

Update: It should have failed there.

Step 5/6 : COPY fuzz/ $SRC/libmodbus/fuzz/

Give me 1-2 days, let me see what I can do.

0x34d commented 1 year ago

well, my PR is working fine. https://github.com/google/oss-fuzz/pull/9131 Merge this, then we will see. https://github.com/stephane/libmodbus/pull/658

stephane commented 1 year ago

Sorry, I don't understand what you want to merge in libmodbus project between the closed PR and the external code :/

0x34d commented 1 year ago

Alright, Let's start it again.

  1. we merge https://github.com/stephane/libmodbus/pull/658 in libmodbus
  2. we merge https://github.com/google/oss-fuzz/pull/9131 with some fixes in oss-fuzz.

Possibly error that you are reporting will be gone. https://github.com/stephane/libmodbus/actions/runs/3567020621/jobs/5994200530

I don't see any other option rather than that.

Arjun.

stephane commented 1 year ago

Sorry but I don't want to merge code I'm not able to maintain (it contains zip files) and a different license. The second point seems to delete files added by #658 :/

My goal here was to only fix the CI that uses the oss-fuzz branch but not merge the fuzz programs.

0x34d commented 1 year ago

My goal here was to only fix the CI that uses the oss-fuzz branch but not merge the fuzz programs.

Well, in that case, open an issue in OSS-Fuzz. Sorry, I'm not understanding what's going on and I'm unable to fix it.

Regards Arjun.

0x34d commented 1 year ago

I hope this can help. https://github.com/stephane/libmodbus/pull/658/commits/5dbb49a3f46e3af5b632487862a16f1b63122955

0x34d commented 1 year ago

Hi, stephane

The bug is in:

when switching the branch. fuzz folder disappears.

 ---> 4be8994ab1eb
Step 5/6 : COPY fuzz/ $SRC/libmodbus/fuzz/

There are two way's to fix.

  1. merge https://github.com/stephane/libmodbus/pull/658
  2. Patch GitHub action.