diff options
| author | Sona Sarmadi <sona.sarmadi@enea.com> | 2017-09-08 07:34:19 +0200 |
|---|---|---|
| committer | Martin Borg <martin.borg@enea.com> | 2017-09-11 15:14:56 +0200 |
| commit | dd30c9d0cab364eecd2ad387817568f699231733 (patch) | |
| tree | 38eb14e0aa023c8eb629e4b9052d0b99b8ae7dc2 | |
| parent | f51f71b2da372e3eaaa1d47c7e01724b2b8867ed (diff) | |
| download | meta-el-common-dd30c9d0cab364eecd2ad387817568f699231733.tar.gz | |
glibc: CVE-2017-1000366
glibc contains a vulnerability that allows specially crafted
LD_LIBRARY_PATH values to manipulate the heap/stack, causing
them to alias, potentially resulting in arbitrary code execution.
Reference:
https://security-tracker.debian.org/tracker/CVE-2017-1000366
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Martin Borg <martin.borg@enea.com>
| -rw-r--r-- | recipes-core/glibc/glibc/CVE-2017-1000366.patch | 53 | ||||
| -rw-r--r-- | recipes-core/glibc/glibc_%.bbappend | 6 |
2 files changed, 59 insertions, 0 deletions
diff --git a/recipes-core/glibc/glibc/CVE-2017-1000366.patch b/recipes-core/glibc/glibc/CVE-2017-1000366.patch new file mode 100644 index 0000000..8ba9c5c --- /dev/null +++ b/recipes-core/glibc/glibc/CVE-2017-1000366.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | From f6110a8fee2ca36f8e2d2abecf3cba9fa7b8ea7d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Florian Weimer <fweimer@redhat.com> | ||
| 3 | Date: Mon, 19 Jun 2017 17:09:55 +0200 | ||
| 4 | Subject: [PATCH] CVE-2017-1000366: Ignore LD_LIBRARY_PATH for AT_SECURE=1 | ||
| 5 | programs [BZ #21624] | ||
| 6 | |||
| 7 | LD_LIBRARY_PATH can only be used to reorder system search paths, which | ||
| 8 | is not useful functionality. | ||
| 9 | |||
| 10 | This makes an exploitable unbounded alloca in _dl_init_paths unreachable | ||
| 11 | for AT_SECURE=1 programs. | ||
| 12 | |||
| 13 | CVE: CVE-2017-1000366 | ||
| 14 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=3c7cd21290cabdadd72984fb69bc51e64ff1002d] | ||
| 15 | |||
| 16 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
| 17 | --- | ||
| 18 | ChangeLog | 7 +++++++ | ||
| 19 | elf/rtld.c | 3 ++- | ||
| 20 | 2 files changed, 9 insertions(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/ChangeLog b/ChangeLog | ||
| 23 | index f140ee6..7bfdf45 100644 | ||
| 24 | --- a/ChangeLog | ||
| 25 | +++ b/ChangeLog | ||
| 26 | @@ -1,3 +1,10 @@ | ||
| 27 | +2017-06-19 Florian Weimer <fweimer@redhat.com> | ||
| 28 | + | ||
| 29 | + [BZ #21624] | ||
| 30 | + CVE-2017-1000366 | ||
| 31 | + * elf/rtld.c (process_envvars): Ignore LD_LIBRARY_PATH for | ||
| 32 | + __libc_enable_secure. | ||
| 33 | + | ||
| 34 | 2017-02-05 Siddhesh Poyarekar <siddhesh@sourceware.org> | ||
| 35 | |||
| 36 | * version.h (RELEASE): Set to "stable" | ||
| 37 | diff --git a/elf/rtld.c b/elf/rtld.c | ||
| 38 | index a036ece..2fc33a6 100644 | ||
| 39 | --- a/elf/rtld.c | ||
| 40 | +++ b/elf/rtld.c | ||
| 41 | @@ -2418,7 +2418,8 @@ process_envvars (enum mode *modep) | ||
| 42 | |||
| 43 | case 12: | ||
| 44 | /* The library search path. */ | ||
| 45 | - if (memcmp (envline, "LIBRARY_PATH", 12) == 0) | ||
| 46 | + if (!__libc_enable_secure | ||
| 47 | + && memcmp (envline, "LIBRARY_PATH", 12) == 0) | ||
| 48 | { | ||
| 49 | library_path = &envline[13]; | ||
| 50 | break; | ||
| 51 | -- | ||
| 52 | 1.9.1 | ||
| 53 | |||
diff --git a/recipes-core/glibc/glibc_%.bbappend b/recipes-core/glibc/glibc_%.bbappend new file mode 100644 index 0000000..1ef0688 --- /dev/null +++ b/recipes-core/glibc/glibc_%.bbappend | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | # look for files in the layer first | ||
| 2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
| 3 | |||
| 4 | SRC_URI += "file://CVE-2017-1000366.patch \ | ||
| 5 | " | ||
| 6 | |||
