diff options
author | van Hauser <vh@thc.org> | 2022-01-20 16:17:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 16:17:08 +0100 |
commit | 7aced239e8a0855d87ecc921ba5691b29202ec1e (patch) | |
tree | a8e877a149495ea4ec48723d8af57426f8322a3a /utils/afl_untracer/afl-untracer.c | |
parent | 9242e0db8ac8a0e82d78432af389108e74700f00 (diff) | |
parent | d1de12d6175cd84357eadbf204e15b184b22ae42 (diff) | |
download | afl++-7aced239e8a0855d87ecc921ba5691b29202ec1e.tar.gz |
Merge pull request #1294 from AFLplusplus/dev
Push to stable
Diffstat (limited to 'utils/afl_untracer/afl-untracer.c')
-rw-r--r-- | utils/afl_untracer/afl-untracer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/afl_untracer/afl-untracer.c b/utils/afl_untracer/afl-untracer.c index d2cb4bcf..fd4c3b8c 100644 --- a/utils/afl_untracer/afl-untracer.c +++ b/utils/afl_untracer/afl-untracer.c @@ -65,6 +65,7 @@ #elif defined(__FreeBSD__) #include <sys/sysctl.h> #include <sys/user.h> + #include <sys/procctl.h> #else #error "Unsupported platform" #endif @@ -685,6 +686,9 @@ int main(int argc, char *argv[]) { #if defined(__linux__) (void)personality(ADDR_NO_RANDOMIZE); // disable ASLR +#elif defined(__FreeBSD__) && __FreeBSD_version >= 1200000 + int no_randomize = PROC_ASLR_FORCE_DISABLE; + (void)procctl(P_PID, 0, PROC_ASLR_CTL, &no_randomize); #endif pid = getpid(); |