AFLplusplus / LibAFL

Advanced Fuzzing Library - Slot your Fuzzer together in Rust! Scales across cores and machines. For Windows, Android, MacOS, Linux, no_std, ...
Other
2.03k stars 319 forks source link

Add Intel PT tracing support #2471

Closed Marcondiro closed 6 days ago

Marcondiro commented 3 months ago

WIP, any feedback is welcome

addisoncrump commented 3 months ago

I'll rebase on this before making libafl_qemu changes in #2438.

domenukk commented 3 months ago

What's the benefit of the perf-event-open-sys crate thingy over bindgen? Just double checking / asking stupid questions :)

Marcondiro commented 3 months ago

No worries :) It has a couple of syscall/ioctl wrappers already available and it addresses an issue I had with Bindgen and #defines. They solved it already in their wrapper.h adding an enum. Let me know if you want me to go deeper than this answer :D

domenukk commented 3 months ago

Nah sounds good, it's just always good to double-check if new crates are necessary. If it solves issues let's gooo

domenukk commented 3 weeks ago

If we're to release 0.14 soon, can we merge (part of) this PR already? At least the stuff that changes existing APIs would probably be good to have

Marcondiro commented 3 weeks ago

@domenukk yep sure, I will clean up the code a bit and let you know when it is reviewable

Marcondiro commented 3 weeks ago

Hello @rmalmain @domenukk, if you wish you could start to have a look at the new code in libafl_bolts (interface to intelPT usable in both libafl and libafl_qemu) and at the IntelPT executor hook. Also the babyfuzzer should be kinda ready.

I'm still working on cleaning the commandExecutor (and the fuzzer built on top of it), it might be removed from this PR depending on the 0.14 cutoff date thanks!

domenukk commented 1 week ago

Can you merge main?

Marcondiro commented 1 week ago

I am waiting for this https://github.com/AFLplusplus/LibAFL/pull/2652 to be reverted...

domenukk commented 1 week ago

Also, any chance we can merge this today or tomorrow for 0.14?

Marcondiro commented 1 week ago

@domenukk I think I've addressed every comment

rmalmain commented 1 week ago

ok on my side. let's merge @domenukk ?

domenukk commented 6 days ago

Again to the bitbybit, I am not against it at all, but we shoudn't have two dependencies for the same use case - so we need to change the other usage to bitbybit

domenukk commented 6 days ago

Great work btw! :)