]> code.ossystems Code Review - openembedded-core.git/commitdiff
binutils: CVE-2017-9756
authorThiruvadi Rajaraman <trajaraman@mvista.com>
Thu, 21 Sep 2017 14:06:14 +0000 (19:36 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 7 Jan 2018 17:09:48 +0000 (17:09 +0000)
Source: binutils-gdb.git
MR: 73919
Type: Security Fix
Disposition: Backport from binutils-2_29
ChangeID: bd4a354c2a1bd14e26232fc88a736950aa19403a
Description:

    Prevent address violation problem when disassembling corrupt aarch64 binary.

        PR binutils/21595
        * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of
        range value.

Affects: <= 2.28
Author: Nick Clifton <nickc@redhat.com>
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
Reviewed-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-devtools/binutils/binutils-2.27.inc
meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch [new file with mode: 0644]

index 961364c81ce0790bfbf0fc4c1a3ff65770318241..70d4065a15e4aa388e407f74d90cf6b190233d64 100644 (file)
@@ -88,6 +88,7 @@ SRC_URI = "\
      file://CVE-2017-9753_9754.patch \
      file://CVE-2017-9755_1.patch \
      file://CVE-2017-9755_2.patch \
+     file://CVE-2017-9756.patch \
 "
 S  = "${WORKDIR}/git"
 
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch
new file mode 100644 (file)
index 0000000..e40a26e
--- /dev/null
@@ -0,0 +1,43 @@
+commit cd3ea7c69acc5045eb28f9bf80d923116e15e4f5
+Author: Nick Clifton <nickc@redhat.com>
+Date:   Thu Jun 15 13:26:54 2017 +0100
+
+    Prevent address violation problem when disassembling corrupt aarch64 binary.
+    
+       PR binutils/21595
+       * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of
+       range value.
+
+Upstream-Status: Backport
+
+CVE: CVE-2017-9756
+Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
+
+Index: git/opcodes/aarch64-dis.c
+===================================================================
+--- git.orig/opcodes/aarch64-dis.c     2017-09-21 15:48:27.154646380 +0530
++++ git/opcodes/aarch64-dis.c  2017-09-21 15:48:27.134646104 +0530
+@@ -381,6 +381,9 @@
+   info->reglist.first_regno = extract_field (FLD_Rt, code, 0);
+   /* opcode */
+   value = extract_field (FLD_opcode, code, 0);
++  /* PR 21595: Check for a bogus value.  */
++  if (value >= ARRAY_SIZE (data))
++    return 0;
+   if (expected_num != data[value].num_elements || data[value].is_reserved)
+     return 0;
+   info->reglist.num_regs = data[value].num_regs;
+Index: git/opcodes/ChangeLog
+===================================================================
+--- git.orig/opcodes/ChangeLog 2017-09-21 15:45:32.264491166 +0530
++++ git/opcodes/ChangeLog      2017-09-21 15:49:53.751803571 +0530
+@@ -1,3 +1,9 @@
++2017-06-15  Nick Clifton  <nickc@redhat.com>
++
++      PR binutils/21595
++      * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of
++      range value.
++
+ 2017-06-15  H.J. Lu  <hongjiu.lu@intel.com>
+       PR binutils/21594