* New script. Move skipped patches list from gdb.spec to script. - Update to fedora 38 @ 82cc8e0. - Patch renamed: * pass-const-frame_info_ptr-reference-for-skip_-langua.patch -> gdb-rhbz2192105-ftbs-dangling-pointer - Patches added: * gdb-bz2237392-dwarf-obstack-allocation.patch * gdb-bz2237515-debuginfod-double-free.patch * gdb-rhbz2160211-excessive-core-file-warnings.patch * gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch * gdb-rhbz2233961-CVE-2022-4806.patch * gdb-rhbz2233965-memory-leak.patch - Maintenance script qa-local.sh: * Add openSUSE_Leap_15.5 and openSUSE_Factory_LegacyX86. * Add "List configs" item. * Skip i586 for SLE-11. - Maintenance script qa.sh: * Make sure exit status is 0 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=363
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
|
|
Date: Thu, 21 Sep 2023 18:52:49 +0200
|
|
Subject: gdb-rhbz2233961-CVE-2022-4806.patch
|
|
|
|
;; Backport PR29922, SHT_NOBITS section
|
|
;; avoids section size sanity check.
|
|
|
|
PR29922, SHT_NOBITS section avoids section size sanity check
|
|
|
|
PR 29922
|
|
* dwarf2.c (find_debug_info): Ignore sections without
|
|
SEC_HAS_CONTENTS.
|
|
|
|
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
|
|
--- a/bfd/dwarf2.c
|
|
+++ b/bfd/dwarf2.c
|
|
@@ -4831,16 +4831,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
|
|
{
|
|
look = debug_sections[debug_info].uncompressed_name;
|
|
msec = bfd_get_section_by_name (abfd, look);
|
|
- if (msec != NULL)
|
|
+ /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of
|
|
+ course debug sections always have contents. */
|
|
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
|
|
return msec;
|
|
|
|
look = debug_sections[debug_info].compressed_name;
|
|
msec = bfd_get_section_by_name (abfd, look);
|
|
- if (msec != NULL)
|
|
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
|
|
return msec;
|
|
|
|
for (msec = abfd->sections; msec != NULL; msec = msec->next)
|
|
- if (startswith (msec->name, GNU_LINKONCE_INFO))
|
|
+ if ((msec->flags & SEC_HAS_CONTENTS) != 0
|
|
+ && startswith (msec->name, GNU_LINKONCE_INFO))
|
|
return msec;
|
|
|
|
return NULL;
|
|
@@ -4848,6 +4851,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
|
|
|
|
for (msec = after_sec->next; msec != NULL; msec = msec->next)
|
|
{
|
|
+ if ((msec->flags & SEC_HAS_CONTENTS) == 0)
|
|
+ continue;
|
|
+
|
|
look = debug_sections[debug_info].uncompressed_name;
|
|
if (strcmp (msec->name, look) == 0)
|
|
return msec;
|