diff options
author | Armin Kuster <akuster808@gmail.com> | 2017-11-26 16:34:10 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-11 22:01:57 +0000 |
commit | 85ad166e6487abcd6395569e71fa81e273d47a9d (patch) | |
tree | 8fead828a4b57c853b4831923c4310658ef3e907 /meta/recipes-devtools | |
parent | 59956de9ffd18d65c41697772e2b95da982cc803 (diff) | |
download | openembedded-core-contrib-85ad166e6487abcd6395569e71fa81e273d47a9d.tar.gz |
binutils: Security fix for CVE-2017-9954
Affects: <= 2.28
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.28.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.28.inc b/meta/recipes-devtools/binutils/binutils-2.28.inc index a2b2901b63..fe9059a514 100644 --- a/meta/recipes-devtools/binutils/binutils-2.28.inc +++ b/meta/recipes-devtools/binutils/binutils-2.28.inc @@ -67,6 +67,7 @@ SRC_URI = "\ file://CVE-2017-9753.patch \ file://CVE-2017-9755.patch \ file://CVE-2017-9756.patch \ + file://CVE-2017-9954.patch \ " S = "${WORKDIR}/git" diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch new file mode 100644 index 0000000000..8a9d7ebd9f --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch @@ -0,0 +1,58 @@ +From 04e15b4a9462cb1ae819e878a6009829aab8020b Mon Sep 17 00:00:00 2001 +From: Nick Clifton <nickc@redhat.com> +Date: Mon, 26 Jun 2017 15:46:34 +0100 +Subject: [PATCH] Fix address violation parsing a corrupt texhex format file. + + PR binutils/21670 + * tekhex.c (getvalue): Check for the source pointer exceeding the + end pointer before the first byte is read. + +Upstream-Status: Backport +CVE: CVE_2017-9954 +Signed-off-by: Armin Kuster <akuster@mvista.com> + +--- + bfd/ChangeLog | 6 ++++++ + bfd/tekhex.c | 6 +++++- + 2 files changed, 11 insertions(+), 1 deletion(-) + +Index: git/bfd/tekhex.c +=================================================================== +--- git.orig/bfd/tekhex.c ++++ git/bfd/tekhex.c +@@ -273,6 +273,9 @@ getvalue (char **srcp, bfd_vma *valuep, + bfd_vma value = 0; + unsigned int len; + ++ if (src >= endp) ++ return FALSE; ++ + if (!ISHEX (*src)) + return FALSE; + +@@ -514,9 +517,10 @@ pass_over (bfd *abfd, bfd_boolean (*func + /* To the front of the file. */ + if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) + return FALSE; ++ + while (! is_eof) + { +- char src[MAXCHUNK]; ++ static char src[MAXCHUNK]; + char type; + + /* Find first '%'. */ +Index: git/bfd/ChangeLog +=================================================================== +--- git.orig/bfd/ChangeLog ++++ git/bfd/ChangeLog +@@ -1,3 +1,9 @@ ++2017-06-26 Nick Clifton <nickc@redhat.com> ++ ++ PR binutils/21670 ++ * tekhex.c (getvalue): Check for the source pointer exceeding the ++ end pointer before the first byte is read. ++ + 2017-06-15 Nick Clifton <nickc@redhat.com> + + PR binutils/21582 |