This is an archive of the discontinued LLVM Phabricator instance.

[Object/ELF] - Fixed behavior when SectionHeaderTable->sh_size is too large.
ClosedPublic

Authored by grimar on Oct 10 2016, 7:15 AM.

Details

Summary

Elf.h already has code checking that section table does not go past end of file.
Problem is that this check may not work on values greater than UINT64_MAX / Header->e_shentsize
because of calculation overflow.

Parch fixes the issue.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 74126.Oct 10 2016, 7:15 AM
grimar retitled this revision from to [Object/ELF] - Fixed behavior when SectionHeaderTable->sh_size is too large..
grimar updated this object.
grimar added reviewers: rafael, davide.
grimar added subscribers: llvm-commits, grimar, evgeny777.
rafael accepted this revision.Oct 26 2016, 2:57 PM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 26 2016, 2:57 PM
This revision was automatically updated to reflect the committed changes.