PR24435, buffer overflow reading dynamic entries

PR 24435
	* elflink.c (elf_link_add_object_symbols): Don't read partial
	dynamic entries from fuzzed objects.
This commit is contained in:
Alan Modra 2019-04-11 19:42:31 +09:30
parent ce12121b63
commit 9bff840e8c
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2019-04-11 Alan Modra <amodra@gmail.com>
PR 24435
* elflink.c (elf_link_add_object_symbols): Don't read partial
dynamic entries from fuzzed objects.
2019-04-11 Tamar Christina <tamar.christina@arm.com>
PR ld/24302

View File

@ -4076,7 +4076,7 @@ error_free_dyn:
shlink = elf_elfsections (abfd)[elfsec]->sh_link;
for (extdyn = dynbuf;
extdyn < dynbuf + s->size;
extdyn <= dynbuf + s->size - bed->s->sizeof_dyn;
extdyn += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;