Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

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 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

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 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

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 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

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

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

No branches or pull requests

2 participants