From 0fe8192976ffc6a35210c24c5069596e028760d3 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 5 Sep 2022 00:39:17 +0100 Subject: [PATCH] Enable memset_patter ASan hooks for Apple on libafl_frida (#763) --- libafl_frida/src/asan/asan_rt.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libafl_frida/src/asan/asan_rt.rs b/libafl_frida/src/asan/asan_rt.rs index 3cc734810a..471922687d 100644 --- a/libafl_frida/src/asan/asan_rt.rs +++ b/libafl_frida/src/asan/asan_rt.rs @@ -865,6 +865,27 @@ impl AsanRuntime { *mut wchar_t ); hook_func!(None, wcscmp, (s1: *const wchar_t, s2: *const wchar_t), i32); + #[cfg(target_vendor = "apple")] + hook_func!( + None, + memset_pattern4, + (s: *mut c_void, c: *const c_void, n: usize), + () + ); + #[cfg(target_vendor = "apple")] + hook_func!( + None, + memset_pattern8, + (s: *mut c_void, c: *const c_void, n: usize), + () + ); + #[cfg(target_vendor = "apple")] + hook_func!( + None, + memset_pattern16, + (s: *mut c_void, c: *const c_void, n: usize), + () + ); } #[cfg(target_arch = "x86_64")]