1 |
williamh 12/10/29 15:57:40 |
2 |
|
3 |
Added: go-1.0.3-hardened.patch |
4 |
Log: |
5 |
version bump and sync live ebuild |
6 |
|
7 |
(Portage version: 2.2.0_alpha142/cvs/Linux i686, signed Manifest commit with key 0x30C46538) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-lang/go/files/go-1.0.3-hardened.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/files/go-1.0.3-hardened.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/files/go-1.0.3-hardened.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: go-1.0.3-hardened.patch |
16 |
=================================================================== |
17 |
Index: src/cmd/6l/asm.c |
18 |
=================================================================== |
19 |
--- a/src/cmd/6l/asm.c |
20 |
+++ b/src/cmd/6l/asm.c |
21 |
@@ -1082,6 +1082,11 @@ |
22 |
ph->type = PT_GNU_STACK; |
23 |
ph->flags = PF_W+PF_R; |
24 |
ph->align = 8; |
25 |
+ |
26 |
+ ph = newElfPhdr(); |
27 |
+ ph->type = PT_PAX_FLAGS; |
28 |
+ ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled |
29 |
+ ph->align = 8; |
30 |
|
31 |
sh = newElfShstrtab(elfstr[ElfStrShstrtab]); |
32 |
sh->type = SHT_STRTAB; |
33 |
Index: src/cmd/8l/asm.c |
34 |
=================================================================== |
35 |
--- a/src/cmd/8l/asm.c |
36 |
+++ b/src/cmd/8l/asm.c |
37 |
@@ -1127,6 +1127,11 @@ |
38 |
ph->flags = PF_W+PF_R; |
39 |
ph->align = 4; |
40 |
|
41 |
+ ph = newElfPhdr(); |
42 |
+ ph->type = PT_PAX_FLAGS; |
43 |
+ ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled |
44 |
+ ph->align = 8; |
45 |
+ |
46 |
sh = newElfShstrtab(elfstr[ElfStrShstrtab]); |
47 |
sh->type = SHT_STRTAB; |
48 |
sh->addralign = 1; |
49 |
Index: src/cmd/ld/elf.h |
50 |
=================================================================== |
51 |
--- a/src/cmd/ld/elf.h |
52 |
+++ b/src/cmd/ld/elf.h |
53 |
@@ -251,6 +251,7 @@ |
54 |
#define PT_LOPROC 0x70000000 /* First processor-specific type. */ |
55 |
#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ |
56 |
#define PT_GNU_STACK 0x6474e551 |
57 |
+#define PT_PAX_FLAGS 0x65041580 |
58 |
|
59 |
/* Values for p_flags. */ |
60 |
#define PF_X 0x1 /* Executable. */ |