From f48d4c21673c16760c5a9ff51934127339234f85 Mon Sep 17 00:00:00 2001 From: Thiruvadi Rajaraman Date: Thu, 21 Sep 2017 19:36:14 +0530 Subject: binutils: CVE-2017-9756 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 Signed-off-by: Thiruvadi Rajaraman Reviewed-by: Armin Kuster Signed-off-by: Armin Kuster Signed-off-by: Armin Kuster --- meta/recipes-devtools/binutils/binutils-2.27.inc | 1 + .../binutils/binutils/CVE-2017-9756.patch | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch diff --git a/meta/recipes-devtools/binutils/binutils-2.27.inc b/meta/recipes-devtools/binutils/binutils-2.27.inc index 961364c81c..70d4065a15 100644 --- a/meta/recipes-devtools/binutils/binutils-2.27.inc +++ b/meta/recipes-devtools/binutils/binutils-2.27.inc @@ -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 index 0000000000..e40a26eb3c --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch @@ -0,0 +1,43 @@ +commit cd3ea7c69acc5045eb28f9bf80d923116e15e4f5 +Author: Nick Clifton +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 + +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 ++ ++ PR binutils/21595 ++ * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of ++ range value. ++ + 2017-06-15 H.J. Lu + + PR binutils/21594 -- cgit 1.2.3-korg