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

Add support for fuzzing pure Ruby code on Mac #11

Open
mschwager opened this issue Feb 14, 2024 · 0 comments
Open

Add support for fuzzing pure Ruby code on Mac #11

mschwager opened this issue Feb 14, 2024 · 0 comments

Comments

@mschwager
Copy link
Member

Adding support for fuzzing pure Ruby code on Macs shouldn't be too heavy of a lift. Atheris supports it. Fuzzing Ruby C extensions on Mac may theoretically be possible, but it's not clear to me how we'd accomplish that. Atheris does not support this type of fuzzing.

So, perhaps we can add support for fuzzing Ruby C extensions on Mac someday, but for now let's start with pure Ruby code and go from there. Here's a rough implementation plan:

  • Fuzzing pure Ruby code on Mac should not require LD_PRELOAD tricks.
    • Make the cruzzy extconf.rb handle not needing to merge ASAN and libFuzzer.
    • May need to address the following warnings when fuzzing pure Ruby code when LD_PRELOAD isn't present:
WARNING: Failed to find function "__sanitizer_acquire_crash_state".
WARNING: Failed to find function "__sanitizer_print_stack_trace".
WARNING: Failed to find function "__sanitizer_set_death_callback".
  • Handle dylibs in addition to .so and .a in extconf.rb
  • Add automated CI testing for fuzzing pure Ruby code on Mac systems

All in all, this can wait until some kind of V2 release after we make Ruzzy public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant