diff options
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.38.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/0028-CVE-2022-47011.patch | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc index 125af13d74..c25b49f8b0 100644 --- a/meta/recipes-devtools/binutils/binutils-2.38.inc +++ b/meta/recipes-devtools/binutils/binutils-2.38.inc | |||
| @@ -57,6 +57,7 @@ SRC_URI = "\ | |||
| 57 | file://0026-CVE-2023-1972.patch \ | 57 | file://0026-CVE-2023-1972.patch \ |
| 58 | file://0025-CVE-2023-25588.patch \ | 58 | file://0025-CVE-2023-25588.patch \ |
| 59 | file://0027-CVE-2022-47008.patch \ | 59 | file://0027-CVE-2022-47008.patch \ |
| 60 | file://0028-CVE-2022-47011.patch \ | ||
| 60 | file://0029-CVE-2022-48065-1.patch \ | 61 | file://0029-CVE-2022-48065-1.patch \ |
| 61 | file://0029-CVE-2022-48065-2.patch \ | 62 | file://0029-CVE-2022-48065-2.patch \ |
| 62 | file://0029-CVE-2022-48065-3.patch \ | 63 | file://0029-CVE-2022-48065-3.patch \ |
diff --git a/meta/recipes-devtools/binutils/binutils/0028-CVE-2022-47011.patch b/meta/recipes-devtools/binutils/binutils/0028-CVE-2022-47011.patch new file mode 100644 index 0000000000..73ae46e218 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0028-CVE-2022-47011.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From: Alan Modra <amodra@gmail.com> | ||
| 2 | Date: Mon, 20 Jun 2022 01:09:13 +0000 (+0930) | ||
| 3 | Subject: PR29261, memory leak in parse_stab_struct_fields | ||
| 4 | X-Git-Tag: binutils-2_39~225 | ||
| 5 | X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8a24927bc8dbf6beac2000593b21235c3796dc35 | ||
| 6 | |||
| 7 | PR29261, memory leak in parse_stab_struct_fields | ||
| 8 | |||
| 9 | PR 29261 | ||
| 10 | * stabs.c (parse_stab_struct_fields): Free "fields" on failure path. | ||
| 11 | |||
| 12 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8a24927bc8dbf6beac2000593b21235c3796dc35] | ||
| 13 | |||
| 14 | CVE: CVE-2022-47011 | ||
| 15 | |||
| 16 | Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com> | ||
| 17 | |||
| 18 | --- | ||
| 19 | |||
| 20 | diff --git a/binutils/stabs.c b/binutils/stabs.c | ||
| 21 | index 796ff85b86a..bf3f578cbcc 100644 | ||
| 22 | --- a/binutils/stabs.c | ||
| 23 | +++ b/binutils/stabs.c | ||
| 24 | @@ -2367,7 +2367,10 @@ parse_stab_struct_fields (void *dhandle, | ||
| 25 | |||
| 26 | if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c, | ||
| 27 | staticsp, p_end)) | ||
| 28 | - return false; | ||
| 29 | + { | ||
| 30 | + free (fields); | ||
| 31 | + return false; | ||
| 32 | + } | ||
| 33 | |||
| 34 | ++c; | ||
| 35 | } | ||
