summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2019-14444.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2019-14444.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2019-14444.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2019-14444.patch b/meta/recipes-devtools/binutils/binutils/CVE-2019-14444.patch
new file mode 100644
index 0000000000..499cf0e046
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2019-14444.patch
@@ -0,0 +1,33 @@
1From e17869db99195849826eaaf5d2d0eb2cfdd7a2a7 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Mon, 5 Aug 2019 10:40:35 +0100
4Subject: [PATCH] Catch potential integer overflow in readelf when processing
5 corrupt binaries.
6
7 PR 24829
8 * readelf.c (apply_relocations): Catch potential integer overflow
9 whilst checking reloc location against section size.
10
11Upstream-Status: Backport
12https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e17869db99195849826eaaf5d2d0eb2cfdd7a2a7
13CVE: CVE-2019-14444
14Dropped changelog
15Signed-off-by: Armin Kuster <akuster@mvista.com>
16
17---
18 binutils/readelf.c | 2 +-
19 2 files changed, 7 insertions(+), 1 deletion(-)
20
21Index: git/binutils/readelf.c
22===================================================================
23--- git.orig/binutils/readelf.c
24+++ git/binutils/readelf.c
25@@ -13113,7 +13113,7 @@ apply_relocations (Filedata *
26 }
27
28 rloc = start + rp->r_offset;
29- if ((rloc + reloc_size) > end || (rloc < start))
30+ if (rloc >= end || (rloc + reloc_size) > end || (rloc < start))
31 {
32 warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
33 (unsigned long) rp->r_offset,