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

tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals #17996

Merged
merged 4 commits into from
Mar 5, 2020

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Jan 24, 2020

Add simple fuzzing harness for functions with floating-point parameters (such as ser_double_to_uint64(double), etc.).

Add serialization/deserialization fuzzing for integral types.

Add missing includes.

To test this PR:

$ make distclean
$ ./autogen.sh
$ CC=clang CXX=clang++ ./configure --enable-fuzz \
      --with-sanitizers=address,fuzzer,undefined
$ make
$ src/test/fuzz/float
…

@practicalswift practicalswift changed the title tests: Add fuzzing harness for functions with floating-point parameters tests: Add fuzzing harness for functions with floating-point parameters. Update FuzzedDataProvider.h. Jan 24, 2020
@practicalswift practicalswift changed the title tests: Add fuzzing harness for functions with floating-point parameters. Update FuzzedDataProvider.h. tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals. Update FuzzedDataProvider.h. Jan 24, 2020
@practicalswift practicalswift changed the title tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals. Update FuzzedDataProvider.h. tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals Jan 31, 2020
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 11, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

src/test/fuzz/integer.cpp Show resolved Hide resolved
@maflcko maflcko merged commit a2b5aae into bitcoin:master Mar 5, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 7, 2020
…erialization of floating-points and integrals

9ff41f6 tests: Add float to FUZZERS_MISSING_CORPORA (temporarily) (practicalswift)
8f6fb0a tests: Add serialization/deserialization fuzzing for integral types (practicalswift)
3c82b92 tests: Add fuzzing harness for functions taking floating-point types as input (practicalswift)
c2bd588 Add missing includes (practicalswift)

Pull request description:

  Add simple fuzzing harness for functions with floating-point parameters (such as `ser_double_to_uint64(double)`, etc.).

  Add serialization/deserialization fuzzing for integral types.

  Add missing includes.

  To test this PR:

  ```
  $ make distclean
  $ ./autogen.sh
  $ CC=clang CXX=clang++ ./configure --enable-fuzz \
        --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/float
  …
  ```

Top commit has no ACKs.

Tree-SHA512: 9b5a0c4838ad18d715c7398e557d2a6d0fcc03aa842f76d7a8ed716170a28f17f249eaede4256998aa3417afe2935e0ffdfaa883727d71ae2d2d18a41ced24b5
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request May 7, 2020
Summary:
As per title, needed for coming changes.

They are fixed by core in commit
bitcoin/bitcoin@c2bd588
from the very unrelated [[bitcoin/bitcoin#17996 | PR17996]], but since this PR has an infinite depth
of dependencies I just cherry pick this commit for now.

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5990
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
Summary:
As per title, needed for coming changes.

They are fixed by core in commit
bitcoin/bitcoin@c2bd588
from the very unrelated [[bitcoin/bitcoin#17996 | PR17996]], but since this PR has an infinite depth
of dependencies I just cherry pick this commit for now.

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5990
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 3, 2020
…ing-points and integrals

Summary:
```
Add simple fuzzing harness for functions with floating-point parameters
(such as ser_double_to_uint64(double), etc.).

Add serialization/deserialization fuzzing for integral types.
```

Backport of core [[bitcoin/bitcoin#17996 | PR17996]].

The first and last commit are not relevant to us.

Test Plan:
  ninja bitcoin-fuzzers
  ./test/fuzz/test_runner.py <path_to_corpus>

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8249
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
…erialization of floating-points and integrals

9ff41f6 tests: Add float to FUZZERS_MISSING_CORPORA (temporarily) (practicalswift)
8f6fb0a tests: Add serialization/deserialization fuzzing for integral types (practicalswift)
3c82b92 tests: Add fuzzing harness for functions taking floating-point types as input (practicalswift)
c2bd588 Add missing includes (practicalswift)

Pull request description:

  Add simple fuzzing harness for functions with floating-point parameters (such as `ser_double_to_uint64(double)`, etc.).

  Add serialization/deserialization fuzzing for integral types.

  Add missing includes.

  To test this PR:

  ```
  $ make distclean
  $ ./autogen.sh
  $ CC=clang CXX=clang++ ./configure --enable-fuzz \
        --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/float
  …
  ```

Top commit has no ACKs.

Tree-SHA512: 9b5a0c4838ad18d715c7398e557d2a6d0fcc03aa842f76d7a8ed716170a28f17f249eaede4256998aa3417afe2935e0ffdfaa883727d71ae2d2d18a41ced24b5
@practicalswift practicalswift deleted the fuzzers-float branch April 10, 2021 19:39
kwvg added a commit to kwvg/dash that referenced this pull request Feb 27, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Feb 27, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Feb 28, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Feb 28, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Feb 28, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Mar 13, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Mar 24, 2022
kwvg added a commit to kwvg/dash that referenced this pull request Mar 24, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants