binutils: Fix CVE-2022-47007
PATCH v2 1/2 binutils: Fix CVE-2022-47007
From: Deepthi Hemraj <[email protected]>
Signed-off-by Deepthi Hemraj <[email protected]>
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0033-CVE-2022-47007.patch | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0033-CVE-2022-47007.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -67,5 +67,6 @@ SRC_URI = "\ file://0031-CVE-2022-47695.patch \ file://CVE-2022-48063.patch \ file://0032-CVE-2022-47010.patch \ + file://0033-CVE-2022-47007.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0033-CVE-2022-47007.patch new file +34 -0
@@ -0,0 +1,34 @@ +From: Alan Modra <[email protected]> +Date: Thu, 16 Jun 2022 23:30:41 +0000 (+0930) +Subject: PR29254, memory leak in stab_demangle_v3_arg +X-Git-Tag: binutils-2_39~237 +X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb + +PR29254, memory leak in stab_demangle_v3_arg + + PR 29254 + * stabs.c (stab_demangle_v3_arg): Free dt on failure path. + +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb] + +CVE: CVE-2022-47007 + +Signed-off-by: Deepthi Hemraj <[email protected]> +--- + +diff --git a/binutils/stabs.c b/binutils/stabs.c +index 2b5241637c1..796ff85b86a 100644 +--- a/binutils/stabs.c ++++ b/binutils/stabs.c +@@ -5467,7 +5467,10 @@ stab_demangle_v3_arg (void *dhandle, struct stab_handle *info, + dc->u.s_binary.right, + &varargs); + if (pargs == NULL) +- return NULL; ++ { ++ free (dt); ++ return NULL; ++ } + + return debug_make_function_type (dhandle, dt, pargs, varargs); + }
Signature · 1 line
2.42.0
PATCH v2 2/2 binutils: Fix CVE-2022-48064
From: Deepthi Hemraj <[email protected]>
Signed-off-by Deepthi Hemraj <[email protected]>
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0034-CVE-2022-48064.patch | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0034-CVE-2022-48064.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -68,5 +68,6 @@ SRC_URI = "\ file://CVE-2022-48063.patch \ file://0032-CVE-2022-47010.patch \ file://0033-CVE-2022-47007.patch \ + file://0034-CVE-2022-48064.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0034-CVE-2022-48064.patch new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
2.42.0