AFLplusplus/LibAFL

Potential Undefined Behavior in Frida ASan

Aperta

#1862 aperta il 15 feb 2024

 (1 commento) (0 reazioni) (0 assegnatari)Rust (480 fork)github user discovery
bughelp wanted

Metriche repository

Star
 (2622 stelle)
Metriche merge PR
 (Merge medio 17g 22h) (10 PR mergiate in 30 g)

Descrizione

In asan_rt.rs, we're getting mutable references to self at various places, hereby creating aliases for mutable references. This is not permitted in Rust and may break in the future, see here: https://github.com/AFLplusplus/LibAFL/blob/97a83aba3bc6376786984efde3e4a968fe553068/libafl_frida/src/asan/asan_rt.rs#L1945C42-L1945C46 Instead, we probably need to store the runtime on the heap and keep a pointer to it (Rc, UnsafeCell, Pin, or something like that?)

Guida contributor