1 |
commit: 5bd65cd07e1d72c1a5e3cb12453ac2077425842e |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 27 00:02:44 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 27 23:17:45 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd65cd0 |
7 |
|
8 |
pax-utils.eclass: do not attempt to create/convert a PT_PAX_FLAGS program header |
9 |
|
10 |
Support for the creation of PT_PAX_FLAGS program headers in ELF objects is being |
11 |
dropped in >=sys-devel/binutils-2.26.1. Running paxctl -C or -c either to create |
12 |
a PT_PAX_FLAGS header or to convert a PT_GNU_STACK header on such ELF objects |
13 |
results in broken executables. For backwards compatibility we continue to support |
14 |
PT_PAX_FLAGS markings with paxctl but remove these unsafe methods from the eclass. |
15 |
|
16 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=590422 |
17 |
|
18 |
eclass/pax-utils.eclass | 18 ++++++++---------- |
19 |
1 file changed, 8 insertions(+), 10 deletions(-) |
20 |
|
21 |
diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass |
22 |
index 9ed1170..137f3efe 100644 |
23 |
--- a/eclass/pax-utils.eclass |
24 |
+++ b/eclass/pax-utils.eclass |
25 |
@@ -1,4 +1,4 @@ |
26 |
-# Copyright 1999-2015 Gentoo Foundation |
27 |
+# Copyright 1999-2016 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
# $Id$ |
30 |
|
31 |
@@ -6,8 +6,8 @@ |
32 |
# @MAINTAINER: |
33 |
# The Gentoo Linux Hardened Team <hardened@g.o> |
34 |
# @AUTHOR: |
35 |
-# Original Author: Kevin F. Quinn <kevquinn@g.o> |
36 |
-# Modifications for bugs #365825, #431092, #520198, @ ECLASS markup: Anthony G. Basile <blueness@g.o> |
37 |
+# Author: Kevin F. Quinn <kevquinn@g.o> |
38 |
+# Author: Anthony G. Basile <blueness@g.o> |
39 |
# @BLURB: functions to provide PaX markings for hardened kernels |
40 |
# @DESCRIPTION: |
41 |
# |
42 |
@@ -77,16 +77,14 @@ pax-mark() { |
43 |
# _pax_list_files einfo "$@" |
44 |
for f in "$@"; do |
45 |
|
46 |
- # First try paxctl -> this might try to create/convert program headers. |
47 |
+ # First try paxctl |
48 |
if type -p paxctl >/dev/null; then |
49 |
einfo "PT_PAX marking -${flags} ${f} with paxctl" |
50 |
- # First, try modifying the existing PAX_FLAGS header. |
51 |
+ # We try modifying the existing PT_PAX_FLAGS header. |
52 |
paxctl -q${flags} "${f}" >/dev/null 2>&1 && continue |
53 |
- # Second, try creating a PT_PAX header (works on ET_EXEC). |
54 |
- # Even though this is less safe, most exes need it. #463170 |
55 |
- paxctl -qC${flags} "${f}" >/dev/null 2>&1 && continue |
56 |
- # Third, try stealing the (unused under PaX) PT_GNU_STACK header |
57 |
- paxctl -qc${flags} "${f}" >/dev/null 2>&1 && continue |
58 |
+ # We no longer try to create/convert a PT_PAX_FLAGS header, bug #590422 |
59 |
+ # paxctl -qC${flags} "${f}" >/dev/null 2>&1 && continue |
60 |
+ # paxctl -qc${flags} "${f}" >/dev/null 2>&1 && continue |
61 |
fi |
62 |
|
63 |
# Next try paxctl-ng -> this will not create/convert any program headers. |