This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] PR22307, Heap out of bounds read in _bfd_elf_parse_gnu_properties


*** TEST RESULTS FOR COMMIT cf54ebff3b7361989712fd9c0128a9b255578163 ***

Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: cf54ebff3b7361989712fd9c0128a9b255578163

PR22307, Heap out of bounds read in _bfd_elf_parse_gnu_properties

When adding an unbounded increment to a pointer, you can't just check
against the end of the buffer but also must check that overflow
doesn't result in "negative" pointer movement.  Pointer comparisons
are signed.  Better, check the increment against the space left using
an unsigned comparison.

	PR 22307
	* elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
	against size left rather than comparing pointers.  Reorganise loop.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]