diff --git a/Fixup-check-file-for-ifunc-reloc.patch b/LoongArch-Fixup-check-file-for-ifunc-reloc.patch similarity index 100% rename from Fixup-check-file-for-ifunc-reloc.patch rename to LoongArch-Fixup-check-file-for-ifunc-reloc.patch diff --git a/Fixup-gas-check-illegal-for-b-label.patch b/LoongArch-Fixup-gas-check-illegal-for-b-label.patch similarity index 100% rename from Fixup-gas-check-illegal-for-b-label.patch rename to LoongArch-Fixup-gas-check-illegal-for-b-label.patch diff --git a/Fixup-unresolve-symbols-problem.patch b/LoongArch-Fixup-unresolve-symbols-problem.patch similarity index 100% rename from Fixup-unresolve-symbols-problem.patch rename to LoongArch-Fixup-unresolve-symbols-problem.patch diff --git a/binutils-Add-LoongArch-support.patch b/LoongArch-binutils-Add-LoongArch-support.patch similarity index 100% rename from binutils-Add-LoongArch-support.patch rename to LoongArch-binutils-Add-LoongArch-support.patch diff --git a/backport-CVE-2022-38126.patch b/backport-CVE-2022-38126.patch new file mode 100644 index 0000000000000000000000000000000000000000..21000dab27c1e4801697c77897747afeb7102b3c --- /dev/null +++ b/backport-CVE-2022-38126.patch @@ -0,0 +1,34 @@ +From 753efb93dc018558c483111fbfe14c4ee8c84c51 Mon Sep 17 00:00:00 2001 +From: yinyongkang +Date: Thu, 8 Sep 2022 17:14:11 +0800 +Subject: [PATCH] Replace a run-time assertion failure with a warning message + when parsing corrupt... + +PR 29289 +* dwarf.c (display_debug_names): Replace assert with a warning +message. +--- + binutils/dwarf.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/binutils/dwarf.c b/binutils/dwarf.c +index 1e7f4db7..7c54820a 100644 +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -9781,7 +9781,12 @@ display_debug_names (struct dwarf_section *section, void *file) + printf (_("Out of %lu items there are %zu bucket clashes" + " (longest of %zu entries).\n"), + (unsigned long) name_count, hash_clash_count, longest_clash); +- assert (name_count == buckets_filled + hash_clash_count); ++ ++ if (name_count != buckets_filled + hash_clash_count) ++ warn (_("The name_count (%lu) is not the same as the used bucket_count (%lu) + the hash clash count (%lu)"), ++ (unsigned long) name_count, ++ (unsigned long) buckets_filled, ++ (unsigned long) hash_clash_count); + + struct abbrev_lookup_entry + { +-- +2.33.0 + diff --git a/binutils.spec b/binutils.spec index dcb73654b4c233ba002d207c50521ed150d6fe57..23477253b41774700a779e9d02a7aa8409d41e80 100644 --- a/binutils.spec +++ b/binutils.spec @@ -1,7 +1,7 @@ Summary: Binary utilities Name: binutils Version: 2.37 -Release: 16 +Release: 17 License: GPLv3+ URL: https://sourceware.org/binutils @@ -32,22 +32,31 @@ Patch9: backport-0003-CVE-2021-42574.patch Patch10: bfd-Close-the-file-descriptor-if-there-is-no-archive.patch Patch11: binutils-AArch64-EFI.patch Patch12: backport-0001-PR28391-strip-objcopy-preserve-dates-.a-cannot-set-t.patch -Patch13: backport-0001-texi2pod.pl-add-no-op-no-split-option-support-PR2814.patch -Patch14: backport-AArch64-Add-support-for-AArch64-EFI-efi-aarch64.patch -Patch15: backport-Add-support-for-AArch64-EFI-efi-aarch64.patch -Patch16: backport-don-t-over-align-file-positions-of-PE-executable-sec.patch -Patch17: backport-PR28186-SEGV-elf.c-7991-30-in-_bfd_elf_fixup_group_sections.patch -Patch18: backport-PR28422-build_id-use-after-free.patch -Patch19: backport-PR28540-segmentation-fault-on-NULL-byte_get.patch + + +Patch42: backport-CVE-2022-38126.patch + +Patch43: backport-0001-texi2pod.pl-add-no-op-no-split-option-support-PR2814.patch + +Patch44: backport-AArch64-Add-support-for-AArch64-EFI-efi-aarch64.patch +Patch45: backport-Add-support-for-AArch64-EFI-efi-aarch64.patch +Patch46: backport-don-t-over-align-file-positions-of-PE-executable-sec.patch +Patch47: backport-PR28186-SEGV-elf.c-7991-30-in-_bfd_elf_fixup_group_sections.patch +Patch48: backport-PR28422-build_id-use-after-free.patch +Patch49: backport-PR28540-segmentation-fault-on-NULL-byte_get.patch +Patch50: Fix-gold-relocation-offset-and-adrp-signed-shife.patch + + + %ifarch loongarch64 -Patch20: binutils-Add-LoongArch-support.patch -Patch21: Fixup-unresolve-symbols-problem.patch -Patch23: LoongArch-Fix-PLT-entry-generate-bug.patch -Patch24: LoongArch-gas-add-support-using-constant-variable-in.patch -Patch25: Fixup-gas-check-illegal-for-b-label.patch -Patch26: Fixup-check-file-for-ifunc-reloc.patch +# LoongArch-related patches start with Patch101 +Patch101: LoongArch-binutils-Add-LoongArch-support.patch +Patch102: LoongArch-Fixup-unresolve-symbols-problem.patch +Patch103: LoongArch-Fix-PLT-entry-generate-bug.patch +Patch104: LoongArch-gas-add-support-using-constant-variable-in.patch +Patch105: LoongArch-Fixup-gas-check-illegal-for-b-label.patch +Patch106: LoongArch-Fixup-check-file-for-ifunc-reloc.patch %endif -Patch22: Fix-gold-relocation-offset-and-adrp-signed-shife.patch Provides: bundled(libiberty) @@ -389,6 +398,14 @@ fi %{_infodir}/bfd*info* %changelog +* Wed Aug 23 2023 eastb233 - 2.37-17 +- Do some CVE fix and typo fix synchronized from 22.03-LTS-Next branch +- It contains, +- Fix CVE-2022-38126 +- fix the changelog exception macro +- and we adjust the patch sequence and rename the patch to +- match 22.03-LTS-Next branch better + * Fri Jul 28 2023 lixing - 2.37-16 - DESC: Add .equ support for LoongArch and fix some bugs @@ -504,7 +521,7 @@ fi - Type:bugfix - ID:NA - SUG:NA -- DESC:move the test to %check phase +- DESC:move the test to %%check phase * Sat Jan 9 2021 zoulin - 2.34-8 - Type:CVE