Repository navigation
LATX, fix: parse PE32+ Wine section headers - #557
Open
ganjue66da wants to merge 2 commits into
Open
ganjue66da wants to merge 2 commits into
ganjue66da wants to merge 2 commits into
Conversation
Reject short file names, path construction failures, readlink errors and possible truncation before using a Wine module path for AOT section lookup. Cover the short-name and truncation paths in the segment tracking test. Tests: - build/test-latx-aot-segment-unmap Signed-off-by: Wenqiang Wei <weiwenqiang@mail.ustc.edu.cn>
Read and validate DOS, PE and section-table data through the file descriptor, use the declared optional-header length to locate PE32+ sections, and register validated code sections atomically. Cover PE32, PE32+, non-standard optional-header sizes, malformed headers, and partial mapping or file lengths. Tests: - build/test-latx-aot-segment-unmap - build/test-latx-aot-pe-load-address Signed-off-by: Wenqiang Wei <weiwenqiang@mail.ustc.edu.cn>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
header length instead of a fixed header location.
region before reading them through the file descriptor.
failed reads and truncated
readlink()results.invalid section does not leave partial state.
Validation
x86_64-linux-userandi386-linux-userwith LATX, AOT and KZT.lat-pr-fast: 52/52 passed.test_lat_ci_version.py: 5/5 passed.latx-aot-segment-unmapandlatx-aot-pe-load-addresstests passed.git diff --checkpassed;checkpatchreported no errors.signatures and headers, mapping/file truncation, path truncation and atomic
registration failure.
The host GCC installation lacks native UBSan runtime libraries, so the full
clean test run used the ABI-compatible Clang 8 standalone UBSan runtime through
LIBRARY_PATHandLD_LIBRARY_PATH.Evidence Boundary
The tests prove Wine PE code-section discovery and registration behavior. They
do not establish real Wine AOT cache loading or an end-to-end startup-time
improvement.