diff options
| author | Dominik <55330408+Dom-in@users.noreply.github.com> | 2026-11-22 15:19:53 +0000 |
|---|---|---|
| committer | Dominik <55330408+Dom-in@users.noreply.github.com> | 2026-11-22 15:26:21 +0000 |
| commit | b805f191da65088ca3831fd5f4360e603670aef8 (patch) | |
| tree | 73f3de5103a17c7b8acd439a23cf7ea16403e144 /runtime/src/thread_stacks.cpp | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
pe_loader: refuse an export whose address is outside the image
parse_exports range-checks the export directory, its three tables and every
name, but stored each code export as base + rva without checking rva. An
address-table entry at or past SizeOfImage (and outside the export
directory, so not a forwarder) became a pointer past the mapping, which an
import or GetProcAddress through the shims would hand out and a caller would
jump to. The load now fails with the export's name, like every other RVA the
loader follows.
loader_test: an export at SizeOfImage is rejected (it loaded before this
change); one at the image's last byte still loads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions