diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2022-47007.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2022-47007.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2022-47007.patch b/meta/recipes-devtools/binutils/binutils/CVE-2022-47007.patch new file mode 100644 index 0000000000..ddb564bc8c --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2022-47007.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 0ebc886149c22aceaf8ed74267821a59ca9d03eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Modra <amodra@gmail.com> | ||
3 | Date: Fri, 17 Jun 2022 09:00:41 +0930 | ||
4 | Subject: [PATCH] PR29254, memory leak in stab_demangle_v3_arg | ||
5 | |||
6 | PR 29254 | ||
7 | * stabs.c (stab_demangle_v3_arg): Free dt on failure path. | ||
8 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb] | ||
9 | CVE: CVE-2022-47007 | ||
10 | Signed-off-by: Virendra Thakur <virendrak@kpit.com> | ||
11 | Comment: Patch refreshed based on codebase. | ||
12 | --- | ||
13 | binutils/stabs.c | 5 ++++- | ||
14 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/binutils/stabs.c b/binutils/stabs.c | ||
17 | index 2b5241637c1..796ff85b86a 100644 | ||
18 | --- a/binutils/stabs.c | ||
19 | +++ b/binutils/stabs.c | ||
20 | @@ -5476,7 +5476,10 @@ | ||
21 | dc->u.s_binary.right, | ||
22 | &varargs); | ||
23 | if (pargs == NULL) | ||
24 | - return NULL; | ||
25 | + { | ||
26 | + free (dt); | ||
27 | + return NULL; | ||
28 | + } | ||
29 | |||
30 | return debug_make_function_type (dhandle, dt, pargs, varargs); | ||
31 | } | ||
32 | |||