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 a way to save hard crashes #10

Open
jvoisin opened this issue Dec 18, 2019 · 5 comments
Open

Add a way to save hard crashes #10

jvoisin opened this issue Dec 18, 2019 · 5 comments

Comments

@jvoisin
Copy link
Contributor

@jvoisin jvoisin commented Dec 18, 2019

While fuzzing some python stuff, I've found several heap-corruption issues. Unfortunately, since the whole Python thingy is crashing in a weird way, the crashing input isn't saved, and this is annoying.

It would be nice to have a way (maybe hidden behind a flag) to keep this kind of crashes.

@yevgenypats
Copy link
Contributor

@yevgenypats yevgenypats commented Dec 18, 2019

heap-corruption issues in the runtime itself? this is cool!(would love to see that when possible/fixed). The only way I can think of saving those kind of crashes are saving each time the last input on disk but that will kind of slow the whole thing down. Do you have some kind of reproduction for this? maybe it's just running out of memory?

@jvoisin
Copy link
Contributor Author

@jvoisin jvoisin commented Dec 18, 2019

I thought about keeping everything, but it would murder the performances.
A better way would be to have a better monitoring of the fuzzee's process, to detect this kind of issues, and dump the input.

I'm currently trying to run my fuzzer in an ASAN environment, to see if I can reproduce this.

@yevgenypats
Copy link
Contributor

@yevgenypats yevgenypats commented Dec 18, 2019

If you have a reproduction you can share I'll be happy to take a look at this. sounds like an interesting case-study.

@jvoisin
Copy link
Contributor Author

@jvoisin jvoisin commented Dec 18, 2019

You can always use something like this I guess:

import ctypes

i = ctypes.c_char(b'a')
j = ctypes.pointer(i)
c = 0
while True:
    j[c] = b'a'
    c += 1
@yevgenypats
Copy link
Contributor

@yevgenypats yevgenypats commented Dec 19, 2019

Ah got it, you meant code that uses cbindings. That makes more sense now.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.