From c7c20675f58e3edaa53538928c0963144fd524e5 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 2 Dec 2021 10:39:37 +0000 Subject: executor: reserve fds that will belong to kcov As now kcov instances may get set up during fuzzing, performing dup2 in cover_open is no longer safe as it may close some important resource. Prevent that by reserving most of fds that belong to the kcov fds range. Unfortunately we must duplicate the code because of the way kcov implementations are organized. --- executor/nocover.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'executor/nocover.h') diff --git a/executor/nocover.h b/executor/nocover.h index da0d0e2f7..e60d07fa9 100644 --- a/executor/nocover.h +++ b/executor/nocover.h @@ -21,6 +21,10 @@ static void cover_protect(cover_t* cov) { } +static void cover_reserve_fd(cover_t* cov) +{ +} + #if SYZ_EXECUTOR_USES_SHMEM static void cover_unprotect(cover_t* cov) { -- cgit mrf-deployment