From 9fba95a0e8798ef4bcca3221123dc3985f8fcd48 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 26 Nov 2017 16:12:39 -0800 Subject: [PATCH] binutils: Security fix for CVE-2017-9742 Affects: <= 2.28 (From OE-Core rev: f8d6efda47b993e5e27631b9b7cd0a8638178e15) Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- .../binutils/binutils-2.28.inc | 1 + .../binutils/binutils/CVE-2017-9742.patch | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch diff --git a/meta/recipes-devtools/binutils/binutils-2.28.inc b/meta/recipes-devtools/binutils/binutils-2.28.inc index c376433564..946f16c1c0 100644 --- a/meta/recipes-devtools/binutils/binutils-2.28.inc +++ b/meta/recipes-devtools/binutils/binutils-2.28.inc @@ -54,6 +54,7 @@ SRC_URI = "\ file://CVE-2017-9038_9044.patch \ file://CVE-2017-9039.patch \ file://CVE-2017-9040_9042.patch \ + file://CVE-2017-9742.patch \ " S = "${WORKDIR}/git" diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch new file mode 100644 index 0000000000..0c9ed0d2af --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch @@ -0,0 +1,45 @@ +From e64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Wed, 14 Jun 2017 17:10:28 +0100 +Subject: [PATCH] Fix seg-fault when trying to disassemble a corrupt score + binary. + + PR binutils/21576 + * score7-dis.c (score_opcodes): Add sentinel. + +Upstream-Status: Backport +CVE: CVE-2017-9742 +Signed-off-by: Armin Kuster + +--- + opcodes/ChangeLog | 5 +++++ + opcodes/score7-dis.c | 3 ++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +Index: git/opcodes/score7-dis.c +=================================================================== +--- git.orig/opcodes/score7-dis.c ++++ git/opcodes/score7-dis.c +@@ -513,7 +513,8 @@ static struct score_opcode score_opcodes + {0x00000d05, 0x00007f0f, "tvc!"}, + {0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"}, + {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"}, +- {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"} ++ {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"}, ++ { 0, 0, NULL } + }; + + typedef struct +Index: git/opcodes/ChangeLog +=================================================================== +--- git.orig/opcodes/ChangeLog ++++ git/opcodes/ChangeLog +@@ -1,3 +1,8 @@ ++2017-06-14 Nick Clifton ++ ++ PR binutils/21576 ++ * score7-dis.c (score_opcodes): Add sentinel. ++ + 2017-03-07 Alan Modra + + Apply from master