diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-17123.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2017-17123.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-17123.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-17123.patch new file mode 100644 index 0000000000..08412108da --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-17123.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 4581a1c7d304ce14e714b27522ebf3d0188d6543 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Clifton <nickc@redhat.com> | ||
3 | Date: Wed, 29 Nov 2017 17:12:12 +0000 | ||
4 | Subject: [PATCH] Check for a NULL symbol pointer when reading relocs from a | ||
5 | COFF based file. | ||
6 | |||
7 | PR 22509 | ||
8 | * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol | ||
9 | pointer when processing relocs. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | Affects: <= 2.29.1 | ||
13 | CVE: CVE-2017-17123 | ||
14 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
15 | |||
16 | --- | ||
17 | bfd/ChangeLog | 6 ++++++ | ||
18 | bfd/coffcode.h | 2 +- | ||
19 | 2 files changed, 7 insertions(+), 1 deletion(-) | ||
20 | |||
21 | Index: git/bfd/coffcode.h | ||
22 | =================================================================== | ||
23 | --- git.orig/bfd/coffcode.h | ||
24 | +++ git/bfd/coffcode.h | ||
25 | @@ -5326,7 +5326,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ | ||
26 | #else | ||
27 | cache_ptr->address = dst.r_vaddr; | ||
28 | |||
29 | - if (dst.r_symndx != -1) | ||
30 | + if (dst.r_symndx != -1 && symbols != NULL) | ||
31 | { | ||
32 | if (dst.r_symndx < 0 || dst.r_symndx >= obj_conv_table_size (abfd)) | ||
33 | { | ||