From 7fb6436182fa6fa7b34422172f2171e2be2cd86e Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 28 Dec 2021 17:54:26 +0000 Subject: ripple/minitrace: disable ASLR Change-Id: I7e34fd965b46f33a38821bca196c8774206ee037 --- ripple/minitrace/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 9868f6f..425824f 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -5,6 +5,7 @@ use { nix::{ libc, sys::{ + personality::{self, Persona}, ptrace, wait::{waitpid, WaitPidFlag, WaitStatus}, }, @@ -75,6 +76,11 @@ enum EntryExit { } fn main() -> anyhow::Result<()> { + // disable ASLR + let mut persona = personality::get()?; + persona.insert(Persona::ADDR_NO_RANDOMIZE); + personality::set(persona)?; + let process = Process::spawn(&mut { let mut args = env::args(); -- cgit 1.4.1