Skip to content

Continuous fuzzing by way of OSS-Fuzz #191

Closed

Description

@DavidKorczynski

Hi,

I was wondering if you would like to integrate continuous fuzzing by way of OSS-Fuzz? Fuzzing is a way to automate test-case generation and has been heavily used for memory unsafe languages. Recently efforts have been put into fuzzing memory safe languages and Python, and the bugs fuzzing can currently help find is uncaught exceptions. Down the line more bug oracles will hopefully come.

In this PR google/oss-fuzz#8131 I did an initial integration into OSS-Fuzz. OSS-Fuzz is a free service run by Google that performs continuous fuzzing of important open source projects.

If you would like to integrate, the only thing I need is a list of email(s) that will get access to the data produced by OSS-Fuzz, such as bug reports, coverage reports and more stats. Notice the emails affiliated with the project will be public in the OSS-Fuzz repo, as they will be part of a configuration file.

Activity

  1. astanin commented on Oct 6, 2022

    @astanin
    Owner

    Hi David, I don't have experience with the fuzzing tools. It would be interesting to see what it can find.

    You can commit this email: 7u7lt5pnx 😉 mozmail.com

  2. added a commit that references this issue on Oct 7, 2022
  3. added a commit that references this issue on Oct 7, 2022
  4. astanin commented on Oct 10, 2022

    @astanin
    Owner

    @AdamKorcz Hi, I'm receiving mails like

    Updates:
    Cc: 7u7lt...@mozmail.com
    Labels: Reported-2022-10-07

    Comment #3 on issue 50322 by ClusterFuzz-External: python-tabulate:fuzz_tabulate: Uncaught exception in ...
    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=...

    This bug is subject to a 90 day disclosure deadline. If 90 days elapse
    without an upstream patch, then the bug report will automatically
    become visible to the public.

    But when I follow the bugs.chromium link, I get "Permission denied.".
    Should my contact email be the same as my google account to get access to the fuzzer results?

  5. DavidKorczynski commented on Oct 12, 2022

    @DavidKorczynski
    Author

    Apologies for not mentioning this @astanin -- the email should be affiliated with a Google account and must be the primary email of that Google account. This due to some limitations in Google's appengine (https://google.github.io/oss-fuzz/faq/#why-do-you-require-a-google-account-for-authentication)

  6. astanin commented on Oct 13, 2022

    @astanin
    Owner

    @DavidKorczynski Then I suppose we should change it to the email used in this repo: s.astanin 🙂 gmail.com.

  7. DavidKorczynski commented on Oct 14, 2022

    @DavidKorczynski
    Author

    Fixed it up @astanin

    The fuzzer (linked in the initial message too) is here: https://github.com/google/oss-fuzz/blob/master/projects/python-tabulate/fuzz_tabulate.py

    I'm curious to hear your views on whether the reports are false positives/useful/useless! I see that the only exception raised in https://github.com/astanin/python-tabulate/blob/master/tabulate/__init__.py are ValueErrors so I should update the fuzzer to catch those -- you can also comment on the individual test cases (the ones on bugs.chromium.org/... that are being emailed) and then I will see the comment and adjust the fuzzer accordingly.

  8. astanin commented on Oct 19, 2022

    @astanin
    Owner

    @DavidKorczynski Now I can access the issues. Though I'm puzzled how I should address some of these issues.

    Let say, the first issue seems to be passing a number as the first parameter.

    >>> tabulate(42)
    Traceback ...
    TypeError: 'int' object is not iterable

    In this case it's correct that library throws an exception ("function is applied to an object of inappropriate type"). But it seems it blocks the fuzzer. What should be done about that?

  9. DavidKorczynski commented on Oct 20, 2022

    @DavidKorczynski
    Author

    The fuzzer itself is here: https://github.com/google/oss-fuzz/blob/master/projects/python-tabulate/fuzz_tabulate.py

    The logic of the fuzzer is "create a random dictionary and pass it to tabulate". In other words, the assumption is that tabulate accepts any arbitrary dictionary and won't throw an exception but rather just return on error. Is this assumption false? If so, what's the specific format tabulate accepts and are meant to not throw any issues for (or, throw issues that are expected and then we can catch those)?

    In the first issue (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50080) the input passed to tabulate is a dictionary: {'': 5} and not just a pure int.

  10. astanin commented on Mar 5, 2026

    @astanin
    Owner

    Pull request #233 nicely addressed the issue. Nothing else to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions