Page 1 of 1

Valgrind on stable grsec

PostPosted: Thu Oct 07, 2010 10:56 am
by cmouse
execve("/usr/lib/valgrind/memcheck-amd64-linux", ["/usr/bin/valgrind.bin"], [/*
39 vars */]) = 0
open("/proc/self/maps", O_RDONLY) = 3
read(3, "38000000-381f5000 r-xp 00000000 "..., 100000) = 549
read(3, "", 99451) = 0
close(3) = 0
mmap(0x402001000, 4194304, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = -1 EPERM (Operation not permitted)
getpid() = 27233

When trying to start valgrind on grsec enabled machine. Any ideas why this fails?

Re: Valgrind on stable grsec

PostPosted: Thu Oct 07, 2010 11:35 am
by spender
It's the new MPROTECT behavior to reject RWX mappings instead of silently demoting them to RW. You'll have to turn off mprotect on the valgrind binary.

-Brad