|
| 1 | +From 1d28410b1def74897f1df8d95473409aa076813e Mon Sep 17 00:00:00 2001 |
| 2 | +From: AkarshHCL <v-akarshc@microsoft.com> |
| 3 | +Date: Mon, 9 Jun 2025 14:37:38 +0000 |
| 4 | +Subject: [PATCH] Address CVE-2025-5245 |
| 5 | + |
| 6 | +Upstream Patch reference: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c3458a8b7ee7d39f070c7b2350851cb2110c65a |
| 7 | + |
| 8 | +--- |
| 9 | + binutils/debug.c | 9 +++------ |
| 10 | + 1 file changed, 3 insertions(+), 6 deletions(-) |
| 11 | + |
| 12 | +diff --git a/binutils/debug.c b/binutils/debug.c |
| 13 | +index 93887374..404813fa 100644 |
| 14 | +--- a/binutils/debug.c |
| 15 | ++++ b/binutils/debug.c |
| 16 | +@@ -2545,9 +2545,6 @@ debug_write_type (struct debug_handle *info, |
| 17 | + case DEBUG_KIND_UNION_CLASS: |
| 18 | + return debug_write_class_type (info, fns, fhandle, type, tag); |
| 19 | + case DEBUG_KIND_ENUM: |
| 20 | +- if (type->u.kenum == NULL) |
| 21 | +- return (*fns->enum_type) (fhandle, tag, (const char **) NULL, |
| 22 | +- (bfd_signed_vma *) NULL); |
| 23 | + return (*fns->enum_type) (fhandle, tag, type->u.kenum->names, |
| 24 | + type->u.kenum->values); |
| 25 | + case DEBUG_KIND_POINTER: |
| 26 | +@@ -3089,9 +3086,9 @@ debug_type_samep (struct debug_handle *info, struct debug_type_s *t1, |
| 27 | + break; |
| 28 | + |
| 29 | + case DEBUG_KIND_ENUM: |
| 30 | +- if (t1->u.kenum == NULL) |
| 31 | +- ret = t2->u.kenum == NULL; |
| 32 | +- else if (t2->u.kenum == NULL) |
| 33 | ++ if (t1->u.kenum->names == NULL) |
| 34 | ++ ret = t2->u.kenum->names == NULL; |
| 35 | ++ else if (t2->u.kenum->names == NULL) |
| 36 | + ret = false; |
| 37 | + else |
| 38 | + { |
| 39 | +-- |
| 40 | +2.45.2 |
| 41 | + |
0 commit comments