public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix potential illegal memory access when parsing a corrupt PEF format file.
@ 2020-01-03 16:23 gdb-buildbot
  2020-01-03 16:23 ` *** COMPILATION FAILED *** Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master *** BREAKAGE *** gdb-buildbot
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gdb-buildbot @ 2020-01-03 16:23 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT f2a3559d54602cecfec6d90f792be4a70ad918ab ***

commit f2a3559d54602cecfec6d90f792be4a70ad918ab
Author:     Nick Clifton <nickc@redhat.com>
AuthorDate: Fri Jan 3 16:17:53 2020 +0000
Commit:     Nick Clifton <nickc@redhat.com>
CommitDate: Fri Jan 3 16:17:53 2020 +0000

    Fix potential illegal memory access when parsing a corrupt PEF format file.
    
            PR 25307
            (bfd_pef_parse_function_stubs): Correct the test that ensures that
            there is enough data remaining in the code buffer before
            attempting to read a function stub.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7fb5bcad59..0ad28a798d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2020-01-03  Nick Clifton  <nickc@redhat.com>
+
+	PR 25307
+	(bfd_pef_parse_function_stubs): Correct the test that ensures that
+	there is enough data remaining in the code buffer before
+	attempting to read a function stub.
+
 2020-01-03  Nick Clifton  <nickc@redhat.com>
 
 	PR 25308
diff --git a/bfd/pef.c b/bfd/pef.c
index 726b8d7493..574d9bcb5d 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -806,7 +806,7 @@ bfd_pef_parse_function_stubs (bfd *abfd,
 	  codepos += 4;
 	}
 
-      if ((codepos + 4) > codelen)
+      if ((codepos + 24) > codelen)
 	break;
 
       ret = bfd_pef_parse_function_stub (abfd, codebuf + codepos, 24, &sym_index);


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-01-03 21:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 16:23 [binutils-gdb] Fix potential illegal memory access when parsing a corrupt PEF format file gdb-buildbot
2020-01-03 16:23 ` *** COMPILATION FAILED *** Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master *** BREAKAGE *** gdb-buildbot
2020-01-03 16:25 ` *** COMPILATION FAILED *** Failures on Ubuntu-Aarch64-m64, " gdb-buildbot
2020-01-03 16:27 ` *** COMPILATION FAILED *** Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2020-01-03 19:43 ` Failures on Fedora-i686, branch master gdb-buildbot
2020-01-03 19:55 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2020-01-03 20:15 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-01-03 20:19 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2020-01-03 20:37 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2020-01-03 20:47 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2020-01-03 20:47 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2020-01-03 21:09 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

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).