all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 4beef780b9a884d0575789a04fa76b61a2d3a328 2289 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0015.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
 
From 6043d77a47de297b62084c1c261cdada082bf09c Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 28 Aug 2017 19:49:18 +0200
Subject: [PATCH 15/90] ldd: never run file directly

(cherry picked from commit eedca9772e99c72ab4c3c34e43cc764250aa3e3c)

diff --git a/ChangeLog b/ChangeLog
index ad05da8ade..fa27c6f66f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-16  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #16750]
+	CVE-2009-5064
+	* elf/ldd.bash.in: Never run file directly.
+
 2017-08-10  Florian Weimer  <fweimer@redhat.com>
 
 	* inet/net-internal.h (__inet6_scopeid_pton): Remove
diff --git a/NEWS b/NEWS
index 0534c5296e..756e849643 100644
--- a/NEWS
+++ b/NEWS
@@ -7,8 +7,17 @@ using `glibc' in the "product" field.
 \f
 Version 2.26.1
 
+Security related changes:
+
+  CVE-2009-5064: The ldd script would sometimes run the program under
+  examination directly, without preventing code execution through the
+  dynamic linker.  (The glibc project disputes that this is a security
+  vulnerability; only trusted binaries must be examined using the ldd
+  script.)
+
 The following bugs are resolved with this release:
 
+  [16750] ldd: Never run file directly.
   [21242] assert: Suppress pedantic warning caused by statement expression
   [21780] posix: Set p{read,write}v2 to return ENOTSUP
   [21871] x86-64: Use _dl_runtime_resolve_opt only with AVX512F
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 7dd1fccf24..686785e235 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -164,18 +164,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
       fi
     done
     case $ret in
-    0)
-      # If the program exits with exit code 5, it means the process has been
-      # invoked with __libc_enable_secure.  Fall back to running it through
-      # the dynamic linker.
-      try_trace "$file"
-      rc=$?
-      if [ $rc = 5 ]; then
-	try_trace "$RTLD" "$file"
-	rc=$?
-      fi
-      [ $rc = 0 ] || result=1
-      ;;
     1)
       # This can be a non-ELF binary or no binary at all.
       nonelf "$file" || {
@@ -183,7 +171,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
 	result=1
       }
       ;;
-    2)
+    0|2)
       try_trace "$RTLD" "$file" || result=1
       ;;
     *)

debug log:

solving 4beef780b ...
found 4beef780b in https://yhetil.org/guix/87ine0pjiu.fsf@fastmail.com/ ||
	https://yhetil.org/guix/87d148pe57.fsf@fastmail.com/

applying [1/1] https://yhetil.org/guix/87ine0pjiu.fsf@fastmail.com/
diff --git a/gnu/packages/patches/glibc-2-26-0015.patch b/gnu/packages/patches/glibc-2-26-0015.patch
new file mode 100644
index 000000000..4beef780b

1:26: trailing whitespace.
 
1:27: space before tab in indent.
 	* inet/net-internal.h (__inet6_scopeid_pton): Remove
1:35: trailing whitespace.
 
1:45: trailing whitespace.
 
1:74: space before tab in indent.
 	result=1
Checking patch gnu/packages/patches/glibc-2-26-0015.patch...
Applied patch gnu/packages/patches/glibc-2-26-0015.patch cleanly.
warning: 5 lines add whitespace errors.

skipping https://yhetil.org/guix/87d148pe57.fsf@fastmail.com/ for 4beef780b
index at:
100644 4beef780b9a884d0575789a04fa76b61a2d3a328	gnu/packages/patches/glibc-2-26-0015.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.