Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

AARCH64 ELF binary section invalid pointer #33213

Open Quuxplusone opened 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR34241
Status NEW
Importance P enhancement
Reported by parker (w.parker.thompson@gmail.com)
Reported on 2017-08-18 17:42:57 -0700
Last modified on 2017-08-18 17:43:43 -0700
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments halutil (96176 bytes, application/octet-stream)
Blocks
Blocked by
See also

When accessing a SectionRef::getContents() StringRef, the initial pointer is valid, and length is correct but the memory mapped at the pointer is not large enough for the length supplied. It's possible that the data pointer is misaligned. When accessing memory near the end of the section pointer it will causes a invalid access and crash.

Attached is a sample binary that causes a crash, the invalid section in the '.bss' in this case.

In order to reproduce: llvm-objdump -disassemble-all /path/to/attachment

Quuxplusone commented 7 years ago

Attached halutil (96176 bytes, application/octet-stream): halutil elf aarch64 executable.