summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2023-10-17 13:36:54 -0400
committerSteve Sakoman <steve@sakoman.com>2023-10-21 05:21:36 -1000
commitf550a6316167d86ca401fa8e22baf316b5548ffd (patch)
tree8d35528009c81db7f0809348b1c3c385fc80133e
parent8391218990b33b8018687892a9533751070a980b (diff)
downloadpoky-f550a6316167d86ca401fa8e22baf316b5548ffd.tar.gz
binutils: CVE-2022-48063
Source: Binutils MR: 128800 Type: Security Fix Disposition: Backport from https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=75393a2d54bcc40053e5262a3de9d70c5ebfbbfd ChangeID: ab04e4ec62d054c90d94f82230adb2342ce1ee1b Description: Affects binutils < 2.40 (From OE-Core rev: 80a8d16a4038868469b4583404b6f73e12bae0f1) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.38.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2022-48063.patch48
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc
index c25b49f8b0..60a0c04412 100644
--- a/meta/recipes-devtools/binutils/binutils-2.38.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.38.inc
@@ -65,5 +65,6 @@ SRC_URI = "\
65 file://0031-CVE-2022-45703-1.patch \ 65 file://0031-CVE-2022-45703-1.patch \
66 file://0031-CVE-2022-45703-2.patch \ 66 file://0031-CVE-2022-45703-2.patch \
67 file://0031-CVE-2022-47695.patch \ 67 file://0031-CVE-2022-47695.patch \
68 file://CVE-2022-48063.patch \
68" 69"
69S = "${WORKDIR}/git" 70S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2022-48063.patch b/meta/recipes-devtools/binutils/binutils/CVE-2022-48063.patch
new file mode 100644
index 0000000000..ea2e030503
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2022-48063.patch
@@ -0,0 +1,48 @@
1From 75393a2d54bcc40053e5262a3de9d70c5ebfbbfd Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Wed, 21 Dec 2022 11:51:23 +0000
4Subject: [PATCH] Fix an attempt to allocate an unreasonably large amount of
5 memory when parsing a corrupt ELF file.
6
7 PR 29924
8 * objdump.c (load_specific_debug_section): Check for excessively
9 large sections.
10
11Upstream-Status: Backport
12CVE: CVE-2022-48063
13Signed-off-by: Armin Kuster <akuster@mvista.com>
14
15---
16 binutils/ChangeLog | 6 ++++++
17 binutils/objdump.c | 4 +++-
18 2 files changed, 9 insertions(+), 1 deletion(-)
19
20Index: git/binutils/objdump.c
21===================================================================
22--- git.orig/binutils/objdump.c
23+++ git/binutils/objdump.c
24@@ -3768,7 +3768,9 @@ load_specific_debug_section (enum dwarf_
25 section->size = bfd_section_size (sec);
26 /* PR 24360: On 32-bit hosts sizeof (size_t) < sizeof (bfd_size_type). */
27 alloced = amt = section->size + 1;
28- if (alloced != amt || alloced == 0)
29+ if (alloced != amt
30+ || alloced == 0
31+ || (bfd_get_size (abfd) != 0 && alloced >= bfd_get_size (abfd)))
32 {
33 section->start = NULL;
34 free_debug_section (debug);
35Index: git/binutils/ChangeLog
36===================================================================
37--- git.orig/binutils/ChangeLog
38+++ git/binutils/ChangeLog
39@@ -1,3 +1,9 @@
40+2022-12-21 Nick Clifton <nickc@redhat.com>
41+
42+ PR 29924
43+ * objdump.c (load_specific_debug_section): Check for excessively
44+ large sections.
45+
46 2022-03-23 Nick Clifton <nickc@redhat.com>
47
48 Import patch from mainline: