<div><br><div class="gmail_quote"><div dir="auto">On Wed, Nov 15, 2017 at 12:36 PM George McCollister <<a href="mailto:george.mccollister@gmail.com">george.mccollister@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Add backported patches from the upstream release/2.24/master branch to<br>
fix CVE-2017-1000366<br>
</blockquote><div dir="auto"><br></div><div dir="auto">This seems fine for morty</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Signed-off-by: George McCollister <<a href="mailto:george.mccollister@gmail.com" target="_blank">george.mccollister@gmail.com</a>><br>
---<br>
<br>
Changes in v2:<br>
- Fix commit message<br>
<br>
...00366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch | 71 +++++++<br>
...ject-overly-long-LD_PRELOAD-path-elements.patch | 145 +++++++++++++<br>
...Reject-overly-long-LD_AUDIT-path-elements.patch | 231 +++++++++++++++++++++<br>
meta/recipes-core/glibc/<a href="http://glibc_2.24.bb" rel="noreferrer" target="_blank">glibc_2.24.bb</a> | 3 +<br>
4 files changed, 450 insertions(+)<br>
create mode 100644 meta/recipes-core/glibc/glibc/0001-CVE-2017-1000366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch<br>
create mode 100644 meta/recipes-core/glibc/glibc/0002-ld.so-Reject-overly-long-LD_PRELOAD-path-elements.patch<br>
create mode 100644 meta/recipes-core/glibc/glibc/0003-ld.so-Reject-overly-long-LD_AUDIT-path-elements.patch<br>
<br>
diff --git a/meta/recipes-core/glibc/glibc/0001-CVE-2017-1000366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch b/meta/recipes-core/glibc/glibc/0001-CVE-2017-1000366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch<br>
new file mode 100644<br>
index 0000000000..78e9ea9e65<br>
--- /dev/null<br>
+++ b/meta/recipes-core/glibc/glibc/0001-CVE-2017-1000366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch<br>
@@ -0,0 +1,71 @@<br>
+From 400f170750a4b2c94a2670ca44de166cc5dd6e3b Mon Sep 17 00:00:00 2001<br>
+From: Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
+Date: Mon, 19 Jun 2017 18:33:26 +0200<br>
+Subject: [PATCH] CVE-2017-1000366: Ignore LD_LIBRARY_PATH for AT_SECURE=1<br>
+ programs [BZ #21624]<br>
+<br>
+LD_LIBRARY_PATH can only be used to reorder system search paths, which<br>
+is not useful functionality.<br>
+<br>
+This makes an exploitable unbounded alloca in _dl_init_paths unreachable<br>
+for AT_SECURE=1 programs.<br>
+<br>
+(cherry picked from commit f6110a8fee2ca36f8e2d2abecf3cba9fa7b8ea7d)<br>
+<br>
+Upstream-Status: Backport<br>
+<a href="https://sourceware.org/git/?p=glibc.git;a=commit;h=87bd4186da10371f46e2f1a7bf7c0a45bb04f1ac" rel="noreferrer" target="_blank">https://sourceware.org/git/?p=glibc.git;a=commit;h=87bd4186da10371f46e2f1a7bf7c0a45bb04f1ac</a><br>
+<a href="https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?h=stretch&id=2755c57269f24e9d59c22c49788f92515346c1bb" rel="noreferrer" target="_blank">https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?h=stretch&id=2755c57269f24e9d59c22c49788f92515346c1bb</a><br>
+<br>
+CVE: CVE-2017-1000366<br>
+<br>
+Signed-off-by: George McCollister <<a href="mailto:george.mccollister@gmail.com" target="_blank">george.mccollister@gmail.com</a>><br>
+---<br>
+ ChangeLog | 7 +++++++<br>
+ NEWS | 1 +<br>
+ elf/rtld.c | 3 ++-<br>
+ 3 files changed, 10 insertions(+), 1 deletion(-)<br>
+<br>
+diff --git a/ChangeLog b/ChangeLog<br>
+index 2bdaf69e43..7a999802dd 100644<br>
+--- a/ChangeLog<br>
++++ b/ChangeLog<br>
+@@ -1,3 +1,10 @@<br>
++2017-06-19 Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
++<br>
++ [BZ #21624]<br>
++ CVE-2017-1000366<br>
++ * elf/rtld.c (process_envvars): Ignore LD_LIBRARY_PATH for<br>
++ __libc_enable_secure.<br>
++<br>
+ 2016-12-31 Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
+<br>
+ [BZ #18784]<br>
+diff --git a/NEWS b/NEWS<br>
+index 4b1ca3cb65..66b49dbbc0 100644<br>
+--- a/NEWS<br>
++++ b/NEWS<br>
+@@ -17,6 +17,7 @@ using `glibc' in the "product" field.<br>
+ question type which is outside the range of valid question type values.<br>
+ (CVE-2015-5180)<br>
+<br>
++ [21624] Unsafe alloca allows local attackers to alias stack and heap (CVE-2017-1000366)<br>
+ Version 2.24<br>
+<br>
+ * The minimum Linux kernel version that this version of the GNU C Library<br>
+diff --git a/elf/rtld.c b/elf/rtld.c<br>
+index 647661ca45..215a9aec8f 100644<br>
+--- a/elf/rtld.c<br>
++++ b/elf/rtld.c<br>
+@@ -2437,7 +2437,8 @@ process_envvars (enum mode *modep)<br>
+<br>
+ case 12:<br>
+ /* The library search path. */<br>
+- if (memcmp (envline, "LIBRARY_PATH", 12) == 0)<br>
++ if (!__libc_enable_secure<br>
++ && memcmp (envline, "LIBRARY_PATH", 12) == 0)<br>
+ {<br>
+ library_path = &envline[13];<br>
+ break;<br>
+--<br>
+2.15.0<br>
+<br>
diff --git a/meta/recipes-core/glibc/glibc/0002-ld.so-Reject-overly-long-LD_PRELOAD-path-elements.patch b/meta/recipes-core/glibc/glibc/0002-ld.so-Reject-overly-long-LD_PRELOAD-path-elements.patch<br>
new file mode 100644<br>
index 0000000000..7f81ed1566<br>
--- /dev/null<br>
+++ b/meta/recipes-core/glibc/glibc/0002-ld.so-Reject-overly-long-LD_PRELOAD-path-elements.patch<br>
@@ -0,0 +1,145 @@<br>
+From 6d49272e6d6741496e3456f2cc22ebc2b9f7f989 Mon Sep 17 00:00:00 2001<br>
+From: Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
+Date: Mon, 19 Jun 2017 22:31:04 +0200<br>
+Subject: [PATCH] ld.so: Reject overly long LD_PRELOAD path elements<br>
+<br>
+(cherry picked from commit 6d0ba622891bed9d8394eef1935add53003b12e8)<br>
+<br>
+Upstream-Status: Backport<br>
+<a href="https://sourceware.org/git/?p=glibc.git;a=commit;h=aab04ca5d359150e17631e6a9b44b65e93bdc467" rel="noreferrer" target="_blank">https://sourceware.org/git/?p=glibc.git;a=commit;h=aab04ca5d359150e17631e6a9b44b65e93bdc467</a><br>
+<a href="https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?h=stretch&id=2755c57269f24e9d59c22c49788f92515346c1bb" rel="noreferrer" target="_blank">https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?h=stretch&id=2755c57269f24e9d59c22c49788f92515346c1bb</a><br>
+<br>
+CVE: CVE-2017-1000366<br>
+<br>
+Signed-off-by: George McCollister <<a href="mailto:george.mccollister@gmail.com" target="_blank">george.mccollister@gmail.com</a>><br>
+---<br>
+ ChangeLog | 7 ++++++<br>
+ elf/rtld.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++------------<br>
+ 2 files changed, 73 insertions(+), 16 deletions(-)<br>
+<br>
+diff --git a/ChangeLog b/ChangeLog<br>
+index 7a999802dd..ea5ecd4a1e 100644<br>
+--- a/ChangeLog<br>
++++ b/ChangeLog<br>
+@@ -1,3 +1,10 @@<br>
++2017-06-19 Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
++<br>
++ * elf/rtld.c (SECURE_NAME_LIMIT, SECURE_PATH_LIMIT): Define.<br>
++ (dso_name_valid_for_suid): New function.<br>
++ (handle_ld_preload): Likewise.<br>
++ (dl_main): Call it. Remove alloca.<br>
++<br>
+ 2017-06-19 Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
+<br>
+ [BZ #21624]<br>
+diff --git a/elf/rtld.c b/elf/rtld.c<br>
+index 215a9aec8f..1d8eab9fe2 100644<br>
+--- a/elf/rtld.c<br>
++++ b/elf/rtld.c<br>
+@@ -99,6 +99,35 @@ uintptr_t __pointer_chk_guard_local<br>
+ strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)<br>
+ #endif<br>
+<br>
++/* Length limits for names and paths, to protect the dynamic linker,<br>
++ particularly when __libc_enable_secure is active. */<br>
++#ifdef NAME_MAX<br>
++# define SECURE_NAME_LIMIT NAME_MAX<br>
++#else<br>
++# define SECURE_NAME_LIMIT 255<br>
++#endif<br>
++#ifdef PATH_MAX<br>
++# define SECURE_PATH_LIMIT PATH_MAX<br>
++#else<br>
++# define SECURE_PATH_LIMIT 1024<br>
++#endif<br>
++<br>
++/* Check that AT_SECURE=0, or that the passed name does not contain<br>
++ directories and is not overly long. Reject empty names<br>
++ unconditionally. */<br>
++static bool<br>
++dso_name_valid_for_suid (const char *p)<br>
++{<br>
++ if (__glibc_unlikely (__libc_enable_secure))<br>
++ {<br>
++ /* Ignore pathnames with directories for AT_SECURE=1<br>
++ programs, and also skip overlong names. */<br>
++ size_t len = strlen (p);<br>
++ if (len >= SECURE_NAME_LIMIT || memchr (p, '/', len) != NULL)<br>
++ return false;<br>
++ }<br>
++ return *p != '\0';<br>
++}<br>
+<br>
+ /* List of auditing DSOs. */<br>
+ static struct audit_list<br>
+@@ -730,6 +759,42 @@ static const char *preloadlist attribute_relro;<br>
+ /* Nonzero if information about versions has to be printed. */<br>
+ static int version_info attribute_relro;<br>
+<br>
++/* The LD_PRELOAD environment variable gives list of libraries<br>
++ separated by white space or colons that are loaded before the<br>
++ executable's dependencies and prepended to the global scope list.<br>
++ (If the binary is running setuid all elements containing a '/' are<br>
++ ignored since it is insecure.) Return the number of preloads<br>
++ performed. */<br>
++unsigned int<br>
++handle_ld_preload (const char *preloadlist, struct link_map *main_map)<br>
++{<br>
++ unsigned int npreloads = 0;<br>
++ const char *p = preloadlist;<br>
++ char fname[SECURE_PATH_LIMIT];<br>
++<br>
++ while (*p != '\0')<br>
++ {<br>
++ /* Split preload list at space/colon. */<br>
++ size_t len = strcspn (p, " :");<br>
++ if (len > 0 && len < sizeof (fname))<br>
++ {<br>
++ memcpy (fname, p, len);<br>
++ fname[len] = '\0';<br>
++ }<br>
++ else<br>
++ fname[0] = '\0';<br>
++<br>
++ /* Skip over the substring and the following delimiter. */<br>
++ p += len;<br>
++ if (*p != '\0')<br>
++ ++p;<br>
++<br>
++ if (dso_name_valid_for_suid (fname))<br>
++ npreloads += do_preload (fname, main_map, "LD_PRELOAD");<br>
++ }<br>
++ return npreloads;<br>
++}<br>
++<br>
+ static void<br>
+ dl_main (const ElfW(Phdr) *phdr,<br>
+ ElfW(Word) phnum,<br>
+@@ -1481,23 +1546,8 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",<br>
+<br>
+ if (__glibc_unlikely (preloadlist != NULL))<br>
+ {<br>
+- /* The LD_PRELOAD environment variable gives list of libraries<br>
+- separated by white space or colons that are loaded before the<br>
+- executable's dependencies and prepended to the global scope<br>
+- list. If the binary is running setuid all elements<br>
+- containing a '/' are ignored since it is insecure. */<br>
+- char *list = strdupa (preloadlist);<br>
+- char *p;<br>
+-<br>
+ HP_TIMING_NOW (start);<br>
+-<br>
+- /* Prevent optimizing strsep. Speed is not important here. */<br>
+- while ((p = (strsep) (&list, " :")) != NULL)<br>
+- if (p[0] != '\0'<br>
+- && (__builtin_expect (! __libc_enable_secure, 1)<br>
+- || strchr (p, '/') == NULL))<br>
+- npreloads += do_preload (p, main_map, "LD_PRELOAD");<br>
+-<br>
++ npreloads += handle_ld_preload (preloadlist, main_map);<br>
+ HP_TIMING_NOW (stop);<br>
+ HP_TIMING_DIFF (diff, start, stop);<br>
+ HP_TIMING_ACCUM_NT (load_time, diff);<br>
+--<br>
+2.15.0<br>
+<br>
diff --git a/meta/recipes-core/glibc/glibc/0003-ld.so-Reject-overly-long-LD_AUDIT-path-elements.patch b/meta/recipes-core/glibc/glibc/0003-ld.so-Reject-overly-long-LD_AUDIT-path-elements.patch<br>
new file mode 100644<br>
index 0000000000..b52b8a1fa7<br>
--- /dev/null<br>
+++ b/meta/recipes-core/glibc/glibc/0003-ld.so-Reject-overly-long-LD_AUDIT-path-elements.patch<br>
@@ -0,0 +1,231 @@<br>
+From c0b25407def32718147530da72959a034cd1318d Mon Sep 17 00:00:00 2001<br>
+From: Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
+Date: Mon, 19 Jun 2017 22:32:12 +0200<br>
+Subject: [PATCH] ld.so: Reject overly long LD_AUDIT path elements<br>
+<br>
+Also only process the last LD_AUDIT entry.<br>
+<br>
+(cherry picked from commit 81b82fb966ffbd94353f793ad17116c6088dedd9)<br>
+<br>
+Upstream-Status: Backport<br>
+<a href="https://sourceware.org/git/?p=glibc.git;a=commit;h=2febff860b31df3666bef5ade0d0744c93f76a74" rel="noreferrer" target="_blank">https://sourceware.org/git/?p=glibc.git;a=commit;h=2febff860b31df3666bef5ade0d0744c93f76a74</a><br>
+<a href="https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?h=stretch&id=2755c57269f24e9d59c22c49788f92515346c1bb" rel="noreferrer" target="_blank">https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?h=stretch&id=2755c57269f24e9d59c22c49788f92515346c1bb</a><br>
+<br>
+CVE: CVE-2017-1000366<br>
+<br>
+Signed-off-by: George McCollister <<a href="mailto:george.mccollister@gmail.com" target="_blank">george.mccollister@gmail.com</a>><br>
+---<br>
+ ChangeLog | 11 +++++++<br>
+ elf/rtld.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------<br>
+ 2 files changed, 106 insertions(+), 15 deletions(-)<br>
+<br>
+diff --git a/ChangeLog b/ChangeLog<br>
+index ea5ecd4a1e..638cb632b1 100644<br>
+--- a/ChangeLog<br>
++++ b/ChangeLog<br>
+@@ -1,3 +1,14 @@<br>
++2017-06-19 Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
++<br>
++ * elf/rtld.c (audit_list_string): New variable.<br>
++ (audit_list): Update comment.<br>
++ (struct audit_list_iter): Define.<br>
++ (audit_list_iter_init, audit_list_iter_next): New function.<br>
++ (dl_main): Use struct audit_list_iter to process audit modules.<br>
++ (process_dl_audit): Call dso_name_valid_for_suid.<br>
++ (process_envvars): Set audit_list_string instead of calling<br>
++ process_dl_audit.<br>
++<br>
+ 2017-06-19 Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>><br>
+<br>
+ * elf/rtld.c (SECURE_NAME_LIMIT, SECURE_PATH_LIMIT): Define.<br>
+diff --git a/elf/rtld.c b/elf/rtld.c<br>
+index 1d8eab9fe2..302bb63620 100644<br>
+--- a/elf/rtld.c<br>
++++ b/elf/rtld.c<br>
+@@ -129,13 +129,91 @@ dso_name_valid_for_suid (const char *p)<br>
+ return *p != '\0';<br>
+ }<br>
+<br>
+-/* List of auditing DSOs. */<br>
++/* LD_AUDIT variable contents. Must be processed before the<br>
++ audit_list below. */<br>
++const char *audit_list_string;<br>
++<br>
++/* Cyclic list of auditing DSOs. audit_list->next is the first<br>
++ element. */<br>
+ static struct audit_list<br>
+ {<br>
+ const char *name;<br>
+ struct audit_list *next;<br>
+ } *audit_list;<br>
+<br>
++/* Iterator for audit_list_string followed by audit_list. */<br>
++struct audit_list_iter<br>
++{<br>
++ /* Tail of audit_list_string still needing processing, or NULL. */<br>
++ const char *audit_list_tail;<br>
++<br>
++ /* The list element returned in the previous iteration. NULL before<br>
++ the first element. */<br>
++ struct audit_list *previous;<br>
++<br>
++ /* Scratch buffer for returning a name which is part of<br>
++ audit_list_string. */<br>
++ char fname[SECURE_NAME_LIMIT];<br>
++};<br>
++<br>
++/* Initialize an audit list iterator. */<br>
++static void<br>
++audit_list_iter_init (struct audit_list_iter *iter)<br>
++{<br>
++ iter->audit_list_tail = audit_list_string;<br>
++ iter->previous = NULL;<br>
++}<br>
++<br>
++/* Iterate through both audit_list_string and audit_list. */<br>
++static const char *<br>
++audit_list_iter_next (struct audit_list_iter *iter)<br>
++{<br>
++ if (iter->audit_list_tail != NULL)<br>
++ {<br>
++ /* First iterate over audit_list_string. */<br>
++ while (*iter->audit_list_tail != '\0')<br>
++ {<br>
++ /* Split audit list at colon. */<br>
++ size_t len = strcspn (iter->audit_list_tail, ":");<br>
++ if (len > 0 && len < sizeof (iter->fname))<br>
++ {<br>
++ memcpy (iter->fname, iter->audit_list_tail, len);<br>
++ iter->fname[len] = '\0';<br>
++ }<br>
++ else<br>
++ /* Do not return this name to the caller. */<br>
++ iter->fname[0] = '\0';<br>
++<br>
++ /* Skip over the substring and the following delimiter. */<br>
++ iter->audit_list_tail += len;<br>
++ if (*iter->audit_list_tail == ':')<br>
++ ++iter->audit_list_tail;<br>
++<br>
++ /* If the name is valid, return it. */<br>
++ if (dso_name_valid_for_suid (iter->fname))<br>
++ return iter->fname;<br>
++ /* Otherwise, wrap around and try the next name. */<br>
++ }<br>
++ /* Fall through to the procesing of audit_list. */<br>
++ }<br>
++<br>
++ if (iter->previous == NULL)<br>
++ {<br>
++ if (audit_list == NULL)<br>
++ /* No pre-parsed audit list. */<br>
++ return NULL;<br>
++ /* Start of audit list. The first list element is at<br>
++ audit_list->next (cyclic list). */<br>
++ iter->previous = audit_list->next;<br>
++ return iter->previous->name;<br>
++ }<br>
++ if (iter->previous == audit_list)<br>
++ /* Cyclic list wrap-around. */<br>
++ return NULL;<br>
++ iter->previous = iter->previous->next;<br>
++ return iter->previous->name;<br>
++}<br>
++<br>
+ #ifndef HAVE_INLINED_SYSCALLS<br>
+ /* Set nonzero during loading and initialization of executable and<br>
+ libraries, cleared before the executable's entry point runs. This<br>
+@@ -1322,11 +1400,13 @@ of this helper program; chances are you did not intend to run this program.\n\<br>
+ GL(dl_rtld_map).l_tls_modid = _dl_next_tls_modid ();<br>
+<br>
+ /* If we have auditing DSOs to load, do it now. */<br>
+- if (__glibc_unlikely (audit_list != NULL))<br>
++ bool need_security_init = true;<br>
++ if (__glibc_unlikely (audit_list != NULL)<br>
++ || __glibc_unlikely (audit_list_string != NULL))<br>
+ {<br>
+- /* Iterate over all entries in the list. The order is important. */<br>
+ struct audit_ifaces *last_audit = NULL;<br>
+- struct audit_list *al = audit_list->next;<br>
++ struct audit_list_iter al_iter;<br>
++ audit_list_iter_init (&al_iter);<br>
+<br>
+ /* Since we start using the auditing DSOs right away we need to<br>
+ initialize the data structures now. */<br>
+@@ -1337,9 +1417,14 @@ of this helper program; chances are you did not intend to run this program.\n\<br>
+ use different values (especially the pointer guard) and will<br>
+ fail later on. */<br>
+ security_init ();<br>
++ need_security_init = false;<br>
+<br>
+- do<br>
++ while (true)<br>
+ {<br>
++ const char *name = audit_list_iter_next (&al_iter);<br>
++ if (name == NULL)<br>
++ break;<br>
++<br>
+ int tls_idx = GL(dl_tls_max_dtv_idx);<br>
+<br>
+ /* Now it is time to determine the layout of the static TLS<br>
+@@ -1348,7 +1433,7 @@ of this helper program; chances are you did not intend to run this program.\n\<br>
+ no DF_STATIC_TLS bit is set. The reason is that we know<br>
+ glibc will use the static model. */<br>
+ struct dlmopen_args dlmargs;<br>
+- dlmargs.fname = al->name;<br>
++ dlmargs.fname = name;<br>
+ dlmargs.map = NULL;<br>
+<br>
+ const char *objname;<br>
+@@ -1361,7 +1446,7 @@ of this helper program; chances are you did not intend to run this program.\n\<br>
+ not_loaded:<br>
+ _dl_error_printf ("\<br>
+ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",<br>
+- al->name, err_str);<br>
++ name, err_str);<br>
+ if (malloced)<br>
+ free ((char *) err_str);<br>
+ }<br>
+@@ -1465,10 +1550,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",<br>
+ goto not_loaded;<br>
+ }<br>
+ }<br>
+-<br>
+- al = al->next;<br>
+ }<br>
+- while (al != audit_list->next);<br>
+<br>
+ /* If we have any auditing modules, announce that we already<br>
+ have two objects loaded. */<br>
+@@ -1732,7 +1814,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",<br>
+ if (tcbp == NULL)<br>
+ tcbp = init_tls ();<br>
+<br>
+- if (__glibc_likely (audit_list == NULL))<br>
++ if (__glibc_likely (need_security_init))<br>
+ /* Initialize security features. But only if we have not done it<br>
+ earlier. */<br>
+ security_init ();<br>
+@@ -2363,9 +2445,7 @@ process_dl_audit (char *str)<br>
+ char *p;<br>
+<br>
+ while ((p = (strsep) (&str, ":")) != NULL)<br>
+- if (p[0] != '\0'<br>
+- && (__builtin_expect (! __libc_enable_secure, 1)<br>
+- || strchr (p, '/') == NULL))<br>
++ if (dso_name_valid_for_suid (p))<br>
+ {<br>
+ /* This is using the local malloc, not the system malloc. The<br>
+ memory can never be freed. */<br>
+@@ -2429,7 +2509,7 @@ process_envvars (enum mode *modep)<br>
+ break;<br>
+ }<br>
+ if (memcmp (envline, "AUDIT", 5) == 0)<br>
+- process_dl_audit (&envline[6]);<br>
++ audit_list_string = &envline[6];<br>
+ break;<br>
+<br>
+ case 7:<br>
+--<br>
+2.15.0<br>
+<br>
diff --git a/meta/recipes-core/glibc/<a href="http://glibc_2.24.bb" rel="noreferrer" target="_blank">glibc_2.24.bb</a> b/meta/recipes-core/glibc/<a href="http://glibc_2.24.bb" rel="noreferrer" target="_blank">glibc_2.24.bb</a><br>
index 4c7d901149..4eba6aceb6 100644<br>
--- a/meta/recipes-core/glibc/<a href="http://glibc_2.24.bb" rel="noreferrer" target="_blank">glibc_2.24.bb</a><br>
+++ b/meta/recipes-core/glibc/<a href="http://glibc_2.24.bb" rel="noreferrer" target="_blank">glibc_2.24.bb</a><br>
@@ -46,6 +46,9 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \<br>
file://0005-Remove-__ASSUME_REQUEUE_PI.patch \<br>
file://0006-Fix-atomic_fetch_xor_release.patch \<br>
file://0001-CVE-2015-5180-resolv-Fix-crash-with-internal-QTYPE-B.patch \<br>
+ file://0001-CVE-2017-1000366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch \<br>
+ file://0002-ld.so-Reject-overly-long-LD_PRELOAD-path-elements.patch \<br>
+ file://0003-ld.so-Reject-overly-long-LD_AUDIT-path-elements.patch \<br>
"<br>
<br>
SRC_URI += "\<br>
--<br>
2.15.0<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>