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:02:59 +0000 |
| commit | f52aa251972cff1acbaf20295a1ce09a33c21010 (patch) | |
| tree | 7da9b8062e6738c0b6a0ae314d8e0607b9f3f12b | |
| parent | 4aff74cf1efaa18d0292644d7a3c71b98d03a549 (diff) | |
| download | poky-f52aa251972cff1acbaf20295a1ce09a33c21010.tar.gz | |
binutils: Security fix for CVE-2017-9954
Affects: <= 2.28
(From OE-Core rev: 85ad166e6487abcd6395569e71fa81e273d47a9d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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 = "\ | |||
| 67 | file://CVE-2017-9753.patch \ | 67 | file://CVE-2017-9753.patch \ |
| 68 | file://CVE-2017-9755.patch \ | 68 | file://CVE-2017-9755.patch \ |
| 69 | file://CVE-2017-9756.patch \ | 69 | file://CVE-2017-9756.patch \ |
| 70 | file://CVE-2017-9954.patch \ | ||
| 70 | " | 71 | " |
| 71 | S = "${WORKDIR}/git" | 72 | S = "${WORKDIR}/git" |
| 72 | 73 | ||
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 @@ | |||
| 1 | From 04e15b4a9462cb1ae819e878a6009829aab8020b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nick Clifton <nickc@redhat.com> | ||
| 3 | Date: Mon, 26 Jun 2017 15:46:34 +0100 | ||
| 4 | Subject: [PATCH] Fix address violation parsing a corrupt texhex format file. | ||
| 5 | |||
| 6 | PR binutils/21670 | ||
| 7 | * tekhex.c (getvalue): Check for the source pointer exceeding the | ||
| 8 | end pointer before the first byte is read. | ||
| 9 | |||
| 10 | Upstream-Status: Backport | ||
| 11 | CVE: CVE_2017-9954 | ||
| 12 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
| 13 | |||
| 14 | --- | ||
| 15 | bfd/ChangeLog | 6 ++++++ | ||
| 16 | bfd/tekhex.c | 6 +++++- | ||
| 17 | 2 files changed, 11 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | Index: git/bfd/tekhex.c | ||
| 20 | =================================================================== | ||
| 21 | --- git.orig/bfd/tekhex.c | ||
| 22 | +++ git/bfd/tekhex.c | ||
| 23 | @@ -273,6 +273,9 @@ getvalue (char **srcp, bfd_vma *valuep, | ||
| 24 | bfd_vma value = 0; | ||
| 25 | unsigned int len; | ||
| 26 | |||
| 27 | + if (src >= endp) | ||
| 28 | + return FALSE; | ||
| 29 | + | ||
| 30 | if (!ISHEX (*src)) | ||
| 31 | return FALSE; | ||
| 32 | |||
| 33 | @@ -514,9 +517,10 @@ pass_over (bfd *abfd, bfd_boolean (*func | ||
| 34 | /* To the front of the file. */ | ||
| 35 | if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) | ||
| 36 | return FALSE; | ||
| 37 | + | ||
| 38 | while (! is_eof) | ||
| 39 | { | ||
| 40 | - char src[MAXCHUNK]; | ||
| 41 | + static char src[MAXCHUNK]; | ||
| 42 | char type; | ||
| 43 | |||
| 44 | /* Find first '%'. */ | ||
| 45 | Index: git/bfd/ChangeLog | ||
| 46 | =================================================================== | ||
| 47 | --- git.orig/bfd/ChangeLog | ||
| 48 | +++ git/bfd/ChangeLog | ||
| 49 | @@ -1,3 +1,9 @@ | ||
| 50 | +2017-06-26 Nick Clifton <nickc@redhat.com> | ||
| 51 | + | ||
| 52 | + PR binutils/21670 | ||
| 53 | + * tekhex.c (getvalue): Check for the source pointer exceeding the | ||
| 54 | + end pointer before the first byte is read. | ||
| 55 | + | ||
| 56 | 2017-06-15 Nick Clifton <nickc@redhat.com> | ||
| 57 | |||
| 58 | PR binutils/21582 | ||
