summary refs log tree commit diff
path: root/ripple
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2021-12-28 17:54:26 +0000
committeredef <edef@unfathomable.blue>2021-12-28 18:01:27 +0000
commit7fb6436182fa6fa7b34422172f2171e2be2cd86e (patch)
treef53111bdb44e047b0416fb2c84329aea1c621df8 /ripple
parentc8205431af0d67086ad11878f73465f525f4e751 (diff)
downloadunf-legacy-7fb6436182fa6fa7b34422172f2171e2be2cd86e.tar.zst
ripple/minitrace: disable ASLR
Change-Id: I7e34fd965b46f33a38821bca196c8774206ee037
Diffstat (limited to 'ripple')
-rw-r--r--ripple/minitrace/src/main.rs6
1 files changed, 6 insertions, 0 deletions
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();