diff options
| author | Michael Trent <mtrent@apple.com> | 2019-03-11 18:29:25 +0000 |
|---|---|---|
| committer | Michael Trent <mtrent@apple.com> | 2019-03-11 18:29:25 +0000 |
| commit | 76d66123b27d7e49fa15a347c006ef9454069614 (patch) | |
| tree | faa882e0e9f5960b8a1a9148b8494790ea8096f7 /llvm/test/tools/llvm-objdump/X86/Inputs/macho-invalid-linker-command | |
| parent | 0d6f681292d5ae8ed5df0cc29eaf95928d264d43 (diff) | |
| download | bcm5719-llvm-76d66123b27d7e49fa15a347c006ef9454069614.tar.gz bcm5719-llvm-76d66123b27d7e49fa15a347c006ef9454069614.zip | |
Detect malformed LC_LINKER_COMMANDs in Mach-O binaries
Summary:
llvm-objdump can be tricked into reading beyond valid memory and
segfaulting if LC_LINKER_COMMAND strings are not null terminated. libObject
does have code to validate the integrity of the LC_LINKER_COMMAND struct,
but this validator improperly assumes linker command strings are null
terminated.
The solution is to report an error if a string extends beyond the end of
the LC_LINKER_COMMAND struct.
Reviewers: lhames, pete
Reviewed By: pete
Subscribers: rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59179
llvm-svn: 355851
Diffstat (limited to 'llvm/test/tools/llvm-objdump/X86/Inputs/macho-invalid-linker-command')
| -rw-r--r-- | llvm/test/tools/llvm-objdump/X86/Inputs/macho-invalid-linker-command | bin | 0 -> 908 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/Inputs/macho-invalid-linker-command b/llvm/test/tools/llvm-objdump/X86/Inputs/macho-invalid-linker-command Binary files differnew file mode 100644 index 00000000000..dcb910063b1 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/Inputs/macho-invalid-linker-command |

