binutils-gdb/libctf
Nick Alcock 0b4fa56e07 libctf: unidentified type kinds on open are a sign of file corruption
If we see a CTF type with a kind we do not recognize in its ctt_info
during opening, we cannot skip it and continue opening the file: if the
type kind is unknown, we do not know how long its vlen is, and we cannot
have skipped past it: so if we continue reading we will almost certainly
read in part of the vlen as if it were a new ctf_type_t.

Avoid this trouble by considering unknown type kinds to be a reason to
return ECTF_CORRUPT, just like everything else that reads in type kinds
does.

libctf/
	* ctf-open.c (ctf_types): Fail when unidentified type kinds are
	seen.
2019-06-21 13:04:02 +01:00
..
aclocal.m4 libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ChangeLog libctf: unidentified type kinds on open are a sign of file corruption 2019-06-21 13:04:02 +01:00
config.h.in libctf: work on platforms without O_CLOEXEC. 2019-06-04 17:05:08 +01:00
configure Regenerate with approved autotools version 2019-06-14 10:30:35 +09:30
configure.ac libctf: work on platforms without O_CLOEXEC. 2019-06-04 17:05:08 +01:00
ctf-archive.c libctf: mark various args as unused in the !HAVE_MMAP case 2019-06-07 13:46:38 +01:00
ctf-create.c libctf: drop mmap()-based CTF data allocator 2019-06-21 13:04:02 +01:00
ctf-decl.c libctf: core type lookup 2019-05-28 17:08:14 +01:00
ctf-decls.h libctf: avoid strndup 2019-06-07 13:46:39 +01:00
ctf-dump.c libctf: explicitly cast more size_t types used in printf()s 2019-06-07 13:46:38 +01:00
ctf-endian.h libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-error.c libctf: error handling 2019-05-28 17:07:24 +01:00
ctf-hash.c libctf: hashing 2019-05-28 17:07:29 +01:00
ctf-impl.h libctf: drop mmap()-based CTF data allocator 2019-06-21 13:04:02 +01:00
ctf-labels.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-lookup.c libctf: avoid strndup 2019-06-07 13:46:39 +01:00
ctf-open-bfd.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-open.c libctf: unidentified type kinds on open are a sign of file corruption 2019-06-21 13:04:02 +01:00
ctf-qsort_r.c libctf: look for BSD versus GNU qsort_r signatures 2019-06-04 17:05:08 +01:00
ctf-subr.c libctf: drop mmap()-based CTF data allocator 2019-06-21 13:04:02 +01:00
ctf-types.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-util.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
elf.h
Makefile.am libctf: look for BSD versus GNU qsort_r signatures 2019-06-04 17:05:08 +01:00
Makefile.in libctf: look for BSD versus GNU qsort_r signatures 2019-06-04 17:05:08 +01:00
swap.h libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00