Gentoo Archives: gentoo-hardened

From: Mivz <mivz@×××××××××××××.net>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] SELinux:after latest update every binary needs the execmod permission to execute
Date: Thu, 13 Apr 2006 17:57:42
Message-Id: 443E90C3.5000504@alpha.spugium.net
In Reply to: Re: [gentoo-hardened] SELinux:after latest update every binary needs the execmod permission to execute by pageexec@freemail.hu
1 pageexec@××××××××.hu wrote:
2
3 >On 13 Apr 2006 at 14:46, Mivz wrote:
4 >
5 >
6 >>Without enforcing ping works just fine:
7 >>
8 >>
9 >
10 >this is good enough to tell the story.
11 >
12 >
13 >
14 >>brk(0) = 0x8001e320
15 >>
16 >>
17 >
18 >that address looks interesting, you'll see why.
19 >
20 >
21 >
22 >
23 >>mprotect(0x80000000, 40960, PROT_READ|PROT_WRITE) = 0
24 >>mprotect(0x80000000, 40960, PROT_READ|PROT_EXEC) = 0
25 >>
26 >>
27 >
28 >and this is where the PROT_WRITE->PROT_EXEC transition happens,
29 >a strong indication of text relocations. comparing it to the
30 >above brk address, we can be quite sure that it is in fact the
31 >main application itself being subject to such torture (brk always
32 >follows the main app in memory). noting the unusual start address
33 >of the main app (it'd be 0x08048000 for ET_EXEC), we can conclude
34 >that your ping executable is a PIE that is not fully PIC. run
35 >scanelf -T on it to see where the problem is.
36 >
37 >
38 >
39 Aaahh... I updated my use flags. I did not find the pie use flag in
40 use.desc, so I removed it and emerged -NuDe.
41 In the pax quick start it says under "5. Building a PIE/SSP Enabled
42 Userland" to only enable pic and hardened as use flag.
43 After adding pie as use flag again and reemerging iputils ping worked
44 fine. So I will emerge -NuDe again with pie and it will probably be solved.
45 Is the pie use flag still in use? I could only find it in the wiki, not
46 on the gentoo.org documentation.
47
48 --
49 gentoo-hardened@g.o mailing list