Yara elf hardening (#750)
Yara elf hardening (#750)

* elf: validate putative string table pointer

* elf: check validity of string table entries

* elf: fix pointer wrapping in dynamic section

Very large segment->offset could wrap to a location outside the valid
range. Directly validate the pointer rather than testing the size, which
is subject to the same wrapping.

wxsBSD/yara,plusvic/yara,plusvic/yara,pombredanne/yara,hillu/yara,rednaga/yara,tanium/yara,wxsBSD/yara,wxsBSD/yara,VirusTotal/yara,cblichmann/yara,hillu/yara,cblichmann/yara,cblichmann/yara,plusvic/yara,pombredanne/yara,hillu/yara,plusvic/yara,pombredanne/yara,pombredanne/yara,VirusTotal/yara,VirusTotal/yara,cblichmann/yara,VirusTotal/yara,tanium/yara,rednaga/yara,wxsBSD/yara,hillu/yara,hillu/yara,rednaga/yara,cblichmann/yara,tanium/yara,pombredanne/yara,wxsBSD/yara,plusvic/yara,VirusTotal/yara