From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: PR29807, SIGSEGV when linking fuzzed PE object
Date: Tue, 22 Nov 2022 08:18:31 +1030 [thread overview]
Message-ID: <Y3vyL3UATztRRM8v@squeak.grove.modra.org> (raw)
PR 29807
* cofflink.c (_bfd_coff_generic_relocate_section): Skip relocs
against symbols with a NULL section.
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index a5b936fd7c1..cd117a445c6 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -2961,8 +2961,10 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
sec = sections[symndx];
/* PR 19623: Relocations against symbols in
- the absolute sections should ignored. */
- if (bfd_is_abs_section (sec))
+ the absolute sections should ignored.
+ PR 29807: Also ignore relocs against file symbols or
+ other such nonsense in fuzzed objects. */
+ if (sec == NULL || bfd_is_abs_section (sec))
continue;
val = (sec->output_section->vma
--
Alan Modra
Australia Development Lab, IBM
reply other threads:[~2022-11-21 21:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3vyL3UATztRRM8v@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).