Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add graceful handling of expected exceptions in fuzz_submodule.py#1922

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

DaveLak
Copy link
Contributor

Fixes:https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69350 (See7b684cd)

Also:

  • Improves file name generation to prevent "File name too long" OSError's (6c00ce6)
  • Improvesfuzz_submodule.py coverage & efficacy (2a2294f)

Fixes:https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69350**`IsADirectoryError`**Fuzzer provided input data can sometimes produce filenames that looklike directories and raise `IsADirectoryError` exceptions which crashthe fuzzer. This commit catches those cases and returns -1 to instructlibfuzzer that the inputs are not valuable to add to the corpus.**`FileExistsError`**Similar to the above, this is a possible exception case produced by thefuzzed data and not a bug so its handled the same.
Adds a utility function to limit the maximum file name legnth producedby the fuzzer to a max size dictated by the host its run on.
The fuzzer was having trouble analyzing `fuzz_submodule.py` when usingthe `atheris.instrument_imports()` context manager. Switching to`atheris.instrument_all()` instead slightly increases the startup timefor the fuzzer, but significantly improves the fuzzing engines abilityto identify new coverage.The changes here also disable warnings that are logged to `stdout` fromthe SUT. These warnings are expected to happen with some inputs andclutter the fuzzer output logs. They can be optionally re-enabled fordebugging by passing a flag o the Python interpreter command line orsetting the `PYTHONWARNINGS` environment variable.
Copy link
Member

@ByronByron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the swift fix, it's much appreciated!

@ByronByron merged commit8502efe intogitpython-developers:mainMay 31, 2024
26 checks passed
@DaveLakDaveLak deleted the fix-fuzz-submodule-expected-exceptions-handling branchMay 31, 2024 05:16
DaveLak added a commit to DaveLak/GitPython that referenced this pull requestAug 9, 2024
Fixes a bug in the `fuzz_submodule` harness where the fuzzed data canproduce file names that exceed the maximum size allowed byt the OS. Thisissue came up previously and was fixed ingitpython-developers#1922, but the submodule filename fixed here was missed in that PR.Fixes:https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69456
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ByronByronByron approved these changes

Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@DaveLak@Byron

[8]ページ先頭

©2009-2025 Movatter.jp