[Bug gdb/23657] Out of bound memory access

nickc at redhat dot com sourceware-bugzilla@sourceware.org
Tue Sep 18 13:47:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=23657

--- Comment #4 from Nick Clifton <nickc at redhat dot com> ---
Hi Tom,

(In reply to Tom Tromey from comment #3)

> Where would a section size sanity check belong in BFD?

Mmmm, well I think that when the file is first read in would 
be the most reasonable place.  I am going to experiment with
a patch to update elf_swap_shdr_in (in bfd/elfcode.h) and see
how that fairs.

> Maybe we'd only want it for sections we actually read, so
> bfd_get_full_section_contents (and then a copy in gdb since
> gdb can mmap sections).

That would make sense, although I think that we whould also
issue a warning message (but not an error) if we detect
something funny going on when the section headers are read in.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list