[compiler-rt] [sanitizer_common] Intercept timespec_get except for hwasan (PR #117080)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 16:29:33 PST 2024


================
@@ -2389,6 +2389,24 @@ INTERCEPTOR(int, setitimer, int which, const void *new_value, void *old_value) {
 #define INIT_GETITIMER
 #endif
 
+#if SANITIZER_INTERCEPT_TIMESPEC_GET
+INTERCEPTOR(int, timespec_get, struct __sanitizer_timespec *ts, int base) {
+  void *ctx;
+  COMMON_INTERCEPTOR_ENTER(ctx, timespec_get, ts, base);
+  // FIXME: under ASan the call below may write to freed memory and corrupt
----------------
fmayer wrote:

confirming: if this is a uaf, then asan might corrupt the metadata? is that correct?

https://github.com/llvm/llvm-project/pull/117080


More information about the llvm-commits mailing list