diff options
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/0040-CVE-2025-1182.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0040-CVE-2025-1182.patch b/meta/recipes-devtools/binutils/binutils/0040-CVE-2025-1182.patch new file mode 100644 index 0000000000..682f633927 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0040-CVE-2025-1182.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From b425859021d17adf62f06fb904797cf8642986ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nick Clifton <nickc@redhat.com> | ||
| 3 | Date: Wed, 5 Feb 2025 16:27:38 +0000 | ||
| 4 | Subject: [PATCH] Fix another illegal memory access triggered by corrupt ELF | ||
| 5 | input files. | ||
| 6 | |||
| 7 | PR 32644 | ||
| 8 | |||
| 9 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b425859021d17adf62f06fb904797cf8642986ad] | ||
| 10 | |||
| 11 | CVE: CVE-2025-1182 | ||
| 12 | |||
| 13 | Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> | ||
| 14 | --- | ||
| 15 | bfd/elflink.c | 4 ++++ | ||
| 16 | 1 file changed, 4 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
| 19 | --- a/bfd/elflink.c | ||
| 20 | +++ b/bfd/elflink.c | ||
| 21 | @@ -14711,6 +14711,10 @@ | ||
| 22 | } | ||
| 23 | else | ||
| 24 | { | ||
| 25 | + if (r_symndx >= rcookie->locsymcount) | ||
| 26 | + /* This can happen with corrupt input. */ | ||
| 27 | + return false; | ||
| 28 | + | ||
| 29 | /* It's not a relocation against a global symbol, | ||
| 30 | but it could be a relocation against a local | ||
| 31 | symbol for a discarded section. */ | ||
