Gentoo Archives: gentoo-hardened

From: Christian Heim <phreak@g.o>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] valgrind on hardened sources
Date: Wed, 14 Nov 2007 16:52:52
Message-Id: 20071114165052.GA28702@woodpecker.gentoo.org
In Reply to: [gentoo-hardened] valgrind on hardened sources by Christian Parpart
1 On 14/11/07 17:42 +0100, Christian Parpart wrote:
2 > hi all,
3 >
4 > when executing a really very simple hello world (or let's say: any program)
5 > on a hardened-sources gentoo host, the application gets killed and i receive
6 > the following in the logs:
7 >
8 > Nov 14 17:39:02 leibniz PAX: From 192.168.2.230: execution attempt
9 > in: <anonymous mapping>, 4023ac000-403c6e000 4023ac000
10 > Nov 14 17:39:02 leibniz PAX: terminating task:
11 > /usr/lib64/valgrind/amd64-linux/memcheck(memcheck):13484,
12 > uid/euid: 1002/1002, PC: 00000004023ac008, SP: 00000004023a9d70
13 > Nov 14 17:39:02 leibniz PAX: bytes at PC: 4c 8b a5 68 02 00 00
14 > 4c 8b 6d 20 4c 89 a5 80 02 00 00 4c 89
15 > Nov 14 17:39:02 leibniz PAX: bytes at SP-8: 0000000000001f80
16 > 00000000000186a0 000000003916c0e8 000000003916c0d8 000000003916c0d8
17 > 0000000000000000 00000004023a9f80 000000003916c0d8 000000003916cde8
18 > 00000000000186a1 0000000000000000
19 > Nov 14 17:39:02 leibniz grsec: From 192.168.2.230: denied resource overstep
20 > by requesting 4096 for RLIMIT_CORE against limit 0 for
21 > /usr/lib64/valgrind/amd64-linux/memcheck[memcheck:13484]
22 > uid/euid:1002/1002 gid/egid:1005/1005, parent /bin/bash[bash:7907]
23 > uid/euid:1002/1002 gid/egid:1005/1005
24
25 That sounds like PAX_MPROTECT (the anonymous memory part especially).
26 Try disabling it and recompile your kernel. As the PAX options ain't
27 sysctl-able, that's the only way.
28
29 Otherwise you could try marking the executeable with chpax/paxctl.
30 --
31 gentoo-hardened@g.o mailing list