From 2f35b160da9ced28bff715c5d7e5abd306a59fa1 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 14 Jun 2023 16:27:21 +0200 Subject: [PATCH] Backport fix for Backport fix for https://sourceware.org/bugzilla/show_bug.cgi?id=30079 --- ...t-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch | 13 +++++++++++++ mingw-binutils.spec | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch diff --git a/binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch b/binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch new file mode 100644 index 0000000..4091345 --- /dev/null +++ b/binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch @@ -0,0 +1,13 @@ +diff -rupN --no-dereference binutils-2.40/ld/ldlang.c binutils-2.40-new/ld/ldlang.c +--- binutils-2.40/ld/ldlang.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/ldlang.c 2023-06-14 16:26:54.425556661 +0200 +@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wil + looking at the sections for this file. */ + + /* Find the correct node to append this section. */ +- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0) ++ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none ++ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0) + tree = &((*tree)->left); + else + tree = &((*tree)->right); diff --git a/mingw-binutils.spec b/mingw-binutils.spec index 6e05487..9eede1a 100644 --- a/mingw-binutils.spec +++ b/mingw-binutils.spec @@ -4,7 +4,7 @@ Name: mingw-binutils Version: 2.40 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Cross-compiled version of binutils for Win32 and Win64 environments License: GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+ @@ -132,6 +132,10 @@ Patch19: binutils-testsuite-fixes.patch # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57 Patch20: CVE-2023-1972.patch +# Backport fix for https://sourceware.org/bugzilla/show_bug.cgi?id=30079 +# https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b7eab2a9d4f4e92692daf14b09fc95ca11b72e30 +Patch21: binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch + BuildRequires: make BuildRequires: gcc BuildRequires: flex @@ -463,6 +467,10 @@ rm -rf %{buildroot}%{_mandir}/man1/* %changelog +* Wed Jun 14 2023 Sandro Mani - 2.40-3 +- Backport fix for Backport fix for + https://sourceware.org/bugzilla/show_bug.cgi?id=30079 + * Fri Apr 14 2023 Sandro Mani - 2.40-2 - Backport fix for CVE-2023-1972