summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-11-27 11:29:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-29 17:43:40 +0000
commit591856a8909279961c6c3db6f69e9144e42eccec (patch)
tree43626e6417506105bb4007917e56d94f95c7e42d /meta/recipes-core
parent6253eece9e0b832652e0a831e1a4391569bd6f65 (diff)
downloadpoky-591856a8909279961c6c3db6f69e9144e42eccec.tar.gz
glibc: fix CVE-2019-19126
Backport from 2.30 stable branch and drop NEWS section. (From OE-Core rev: b4d4f70380c100d8ab06557237d8d5649a885e30) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2019-19126.patch32
-rw-r--r--meta/recipes-core/glibc/glibc_2.30.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch b/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch
new file mode 100644
index 0000000000..aead04c485
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2019-19126.patch
@@ -0,0 +1,32 @@
1From 37c90e117310728a4ad1eb998c0bbe7d79c4a398 Mon Sep 17 00:00:00 2001
2From: =?utf8?q?Marcin=20Ko=C5=9Bcielnicki?= <mwk@0x04.net>
3Date: Thu, 21 Nov 2019 00:20:15 +0100
4Subject: [PATCH] rtld: Check __libc_enable_secure before honoring
5 LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) [BZ #25204]
6
7The problem was introduced in glibc 2.23, in commit
8b9eb92ab05204df772eb4929eccd018637c9f3e9
9("Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT").
10
11(cherry picked from commit d5dfad4326fc683c813df1e37bbf5cf920591c8e)
12
13Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=37c90e117310728a4ad1eb998c0bbe7d79c4a398]
14CVE: CVE-2019-19126
15Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
16---
17diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
18index 975cbe2..df2cdfd 100644
19--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
20+++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
21@@ -31,7 +31,8 @@
22 environment variable, LD_PREFER_MAP_32BIT_EXEC. */
23 #define EXTRA_LD_ENVVARS \
24 case 21: \
25- if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
26+ if (!__libc_enable_secure \
27+ && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \
28 GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \
29 |= bit_arch_Prefer_MAP_32BIT_EXEC; \
30 break;
31--
322.9.3
diff --git a/meta/recipes-core/glibc/glibc_2.30.bb b/meta/recipes-core/glibc/glibc_2.30.bb
index 03add3363c..7913bc2812 100644
--- a/meta/recipes-core/glibc/glibc_2.30.bb
+++ b/meta/recipes-core/glibc/glibc_2.30.bb
@@ -41,6 +41,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
41 file://0026-intl-Emit-no-lines-in-bison-generated-files.patch \ 41 file://0026-intl-Emit-no-lines-in-bison-generated-files.patch \
42 file://0027-inject-file-assembly-directives.patch \ 42 file://0027-inject-file-assembly-directives.patch \
43 file://0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ 43 file://0028-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
44 file://CVE-2019-19126.patch \
44 " 45 "
45S = "${WORKDIR}/git" 46S = "${WORKDIR}/git"
46B = "${WORKDIR}/build-${TARGET_SYS}" 47B = "${WORKDIR}/build-${TARGET_SYS}"