From: Armin Kuster <akuster808@gmail.com>
To: akuster@mvista.com, openembedded-core@lists.openembedded.org
Subject: [SUMO][PATCH 02/12] binutls: Security fix CVE-2018-7643
Date: Mon, 6 Aug 2018 07:29:08 -0700 [thread overview]
Message-ID: <1533565758-2467-2-git-send-email-akuster808@gmail.com> (raw)
In-Reply-To: <1533565758-2467-1-git-send-email-akuster808@gmail.com>
From: Armin Kuster <akuster@mvista.com>
Affects <= 2.30
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
meta/recipes-devtools/binutils/binutils-2.30.inc | 1 +
.../binutils/binutils/CVE-2018-7643.patch | 102 +++++++++++++++++++++
2 files changed, 103 insertions(+)
create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2018-7643.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.30.inc b/meta/recipes-devtools/binutils/binutils-2.30.inc
index 349fa5a..1952d46 100644
--- a/meta/recipes-devtools/binutils/binutils-2.30.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.30.inc
@@ -36,6 +36,7 @@ SRC_URI = "\
file://0014-Detect-64-bit-MIPS-targets.patch \
file://0015-sync-with-OE-libtool-changes.patch \
file://CVE-2018-8945.patch \
+ file://CVE-2018-7643.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2018-7643.patch b/meta/recipes-devtools/binutils/binutils/CVE-2018-7643.patch
new file mode 100644
index 0000000..2a2dec3
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2018-7643.patch
@@ -0,0 +1,102 @@
+From d11ae95ea3403559f052903ab053f43ad7821e37 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Thu, 1 Mar 2018 16:14:08 +0000
+Subject: [PATCH] Prevent illegal memory accesses triggerd by intger overflow
+ when parsing corrupt DWARF information on a 32-bit host.
+
+ PR 22905
+ * dwarf.c (display_debug_ranges): Check that the offset loaded
+ from the range_entry structure is valid.
+
+Upstream-Status: Backport
+Affects: Binutils <= 2.30
+CVE: CVE-2018-7643
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ binutils/ChangeLog | 6 ++++++
+ binutils/dwarf.c | 15 +++++++++++++++
+ 2 files changed, 21 insertions(+)
+
+Index: git/binutils/dwarf.c
+===================================================================
+--- git.orig/binutils/dwarf.c
++++ git/binutils/dwarf.c
+@@ -387,6 +387,9 @@ read_uleb128 (unsigned char * data,
+ } \
+ while (0)
+
++/* Read AMOUNT bytes from PTR and store them in VAL as an unsigned value.
++ Checks to make sure that the read will not reach or pass END
++ and that VAL is big enough to hold AMOUNT bytes. */
+ #define SAFE_BYTE_GET(VAL, PTR, AMOUNT, END) \
+ do \
+ { \
+@@ -415,6 +418,7 @@ read_uleb128 (unsigned char * data,
+ } \
+ while (0)
+
++/* Like SAFE_BYTE_GET, but also increments PTR by AMOUNT. */
+ #define SAFE_BYTE_GET_AND_INC(VAL, PTR, AMOUNT, END) \
+ do \
+ { \
+@@ -423,6 +427,7 @@ read_uleb128 (unsigned char * data,
+ } \
+ while (0)
+
++/* Like SAFE_BYTE_GET, but reads a signed value. */
+ #define SAFE_SIGNED_BYTE_GET(VAL, PTR, AMOUNT, END) \
+ do \
+ { \
+@@ -441,6 +446,7 @@ read_uleb128 (unsigned char * data,
+ } \
+ while (0)
+
++/* Like SAFE_SIGNED_BYTE_GET, but also increments PTR by AMOUNT. */
+ #define SAFE_SIGNED_BYTE_GET_AND_INC(VAL, PTR, AMOUNT, END) \
+ do \
+ { \
+@@ -6543,6 +6549,7 @@ display_debug_ranges_list (unsigned char
+ break;
+ SAFE_SIGNED_BYTE_GET_AND_INC (end, start, pointer_size, finish);
+
++
+ printf (" %8.8lx ", offset);
+
+ if (begin == 0 && end == 0)
+@@ -6810,6 +6817,13 @@ display_debug_ranges (struct dwarf_secti
+ continue;
+ }
+
++ if (next < section_begin || next >= finish)
++ {
++ warn (_("Corrupt offset (%#8.8lx) in range entry %u\n"),
++ (unsigned long) offset, i);
++ continue;
++ }
++
+ if (dwarf_check != 0 && i > 0)
+ {
+ if (start < next)
+@@ -6825,6 +6839,7 @@ display_debug_ranges (struct dwarf_secti
+ (unsigned long) (next - section_begin), section->name);
+ }
+ }
++
+ start = next;
+ last_start = next;
+
+Index: git/bfd/ChangeLog
+===================================================================
+--- git.orig/bfd/ChangeLog
++++ git/bfd/ChangeLog
+@@ -1,3 +1,9 @@
++2018-03-01 Nick Clifton <nickc@redhat.com>
++
++ PR 22905
++ * dwarf.c (display_debug_ranges): Check that the offset loaded
++ from the range_entry structure is valid.
++
+ 2018-05-08 Nick Clifton <nickc@redhat.com>
+
+ PR 22809
--
2.7.4
next prev parent reply other threads:[~2018-08-06 14:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 14:29 [SUMO][PATCH 01/12] binutils: Security fix CVE-2018-8945 Armin Kuster
2018-08-06 14:29 ` Armin Kuster [this message]
2018-08-06 14:29 ` [SUMO][PATCH 03/12] binutls: Security fix CVE-2018-6872 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 04/12] binutls: Security fix CVE-2018-6759 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 05/12] binutls: Security fix CVE-2018-7642 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 06/12] binutls: Security fix CVE-2018-7208 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 07/12] binutls: Security fix CVE-2018-7569 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 08/12] binutls: Security fix CVE-2018-7568 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 09/12] binutls: Security fix CVE-2018-10373 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 10/12] binutls: Security fix CVE-2018-10372 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 11/12] binutls: Security fix CVE-2018-10535 Armin Kuster
2018-08-06 14:29 ` [SUMO][PATCH 12/12] binutls: Security fix CVE-2018-10534 Armin Kuster
2018-08-06 15:06 ` ✗ patchtest: failure for "[SUMO] binutils: Security fix ..." and 11 more Patchwork
2018-08-06 17:27 ` [SUMO][PATCH 01/12] binutils: Security fix CVE-2018-8945 Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1533565758-2467-2-git-send-email-akuster808@gmail.com \
--to=akuster808@gmail.com \
--cc=akuster@mvista.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.