diff options
| author | Sanjana <Sanjana.Venkatesh@windriver.com> | 2023-11-02 23:06:07 -0700 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-11-14 06:49:11 -1000 |
| commit | f9a95adda59c0a07b5c42af680d16185eb256959 (patch) | |
| tree | dae068413f6cee301386b918d66cef0916d55f71 | |
| parent | a171408008bfbb89446112f3dbc543f35f76b335 (diff) | |
| download | poky-f9a95adda59c0a07b5c42af680d16185eb256959.tar.gz | |
binutils: Fix CVE-2022-47010
(From OE-Core rev: 3fd5701a861aa263ad1d912bfd44d4d5826d11a1)
Signed-off-by: Sanjana <Sanjana.Venkatesh@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.38.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/0032-CVE-2022-47010.patch | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc index 60a0c04412..43cc97f1ef 100644 --- a/meta/recipes-devtools/binutils/binutils-2.38.inc +++ b/meta/recipes-devtools/binutils/binutils-2.38.inc | |||
| @@ -66,5 +66,6 @@ SRC_URI = "\ | |||
| 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 | file://CVE-2022-48063.patch \ |
| 69 | file://0032-CVE-2022-47010.patch \ | ||
| 69 | " | 70 | " |
| 70 | S = "${WORKDIR}/git" | 71 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-devtools/binutils/binutils/0032-CVE-2022-47010.patch b/meta/recipes-devtools/binutils/binutils/0032-CVE-2022-47010.patch new file mode 100644 index 0000000000..9648033e67 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0032-CVE-2022-47010.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From: Alan Modra <amodra@gmail.com> | ||
| 2 | Date: Mon, 20 Jun 2022 01:09:31 +0000 (+0930) | ||
| 3 | Subject: PR29262, memory leak in pr_function_type | ||
| 4 | X-Git-Tag: binutils-2_39~224 | ||
| 5 | X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab | ||
| 6 | |||
| 7 | PR29262, memory leak in pr_function_type | ||
| 8 | |||
| 9 | PR 29262 | ||
| 10 | * prdbg.c (pr_function_type): Free "s" on failure path. | ||
| 11 | |||
| 12 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab] | ||
| 13 | |||
| 14 | CVE: CVE-2022-47010 | ||
| 15 | |||
| 16 | Signed-off-by: Sanjana Venkatesh <Sanjana.Venkatesh@windriver.com> | ||
| 17 | |||
| 18 | --- | ||
| 19 | |||
| 20 | diff --git a/binutils/prdbg.c b/binutils/prdbg.c | ||
| 21 | index c1e41628d26..bb42a5b6c2d 100644 | ||
| 22 | --- a/binutils/prdbg.c | ||
| 23 | +++ b/binutils/prdbg.c | ||
| 24 | @@ -742,12 +742,9 @@ pr_function_type (void *p, int argcount, bool varargs) | ||
| 25 | |||
| 26 | strcat (s, ")"); | ||
| 27 | |||
| 28 | - if (! substitute_type (info, s)) | ||
| 29 | - return false; | ||
| 30 | - | ||
| 31 | + bool ret = substitute_type (info, s); | ||
| 32 | free (s); | ||
| 33 | - | ||
| 34 | - return true; | ||
| 35 | + return ret; | ||
| 36 | } | ||
| 37 | |||
| 38 | /* Turn the top type on the stack into a reference to that type. */ | ||
