* [binutils-gdb] PR29807, SIGSEGV when linking fuzzed PE object
@ 2022-11-21 21:49 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-11-21 21:49 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=38c917d808fdb570ddb1215ccf8233a10484ba91
commit 38c917d808fdb570ddb1215ccf8233a10484ba91
Author: Alan Modra <amodra@gmail.com>
Date: Sat Nov 19 08:33:20 2022 +1030
PR29807, SIGSEGV when linking fuzzed PE object
PR 29807
* cofflink.c (_bfd_coff_generic_relocate_section): Skip relocs
against symbols with a NULL section.
Diff:
---
bfd/cofflink.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-21 21:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 21:49 [binutils-gdb] PR29807, SIGSEGV when linking fuzzed PE object Alan Modra
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).