Repository navigation
Conversation
Address the follow-ups on #135734: propagate bias detection failures, bound dynamic-table walks by PT_DYNAMIC, process dependencies in two passes, check address and index arithmetic, and reject successful short reads. Co-authored-by: Copilot <[email protected]>
Keep bias-detection failure handling, bounded dynamic-table dependency scans, and successful short-read rejection. Restore the existing address, index, and allocation-size handling. Co-authored-by: Copilot <[email protected]>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
tommcdon
left a comment
There was a problem hiding this comment.
LGTM. Consider trigging runtime-diagnostics as I am not sure it ran.
|
/azp run runtime-diagnostics |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
|
/azp runtime-diagnostics |
|
Command 'runtime-diagnostics' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
| { | ||
| Trace("PopulateForSymbolLookup: base %016" PRIx64 "\n", baseAddress); | ||
| Elf_Dyn* dynamicAddr = nullptr; | ||
| uint64_t dynamicSize = 0; |
There was a problem hiding this comment.
I know a lot of this is preexisting - but a lot of these arithmetic calculations are unchecked. We should try to guard for this.
There was a problem hiding this comment.
I will do this in a follow-up
| if (offset >= stringSize) { | ||
| return false; | ||
| } | ||
| std::string name; |
There was a problem hiding this comment.
do we need to allocate for the full string table entries? can it instead check where the \0 is and then check the prefix and the suffix?
| // Search for dynamic entries | ||
| for (;;) | ||
| bool terminated = false; | ||
| for (; dynamicSize >= sizeof(Elf_Dyn); dynamicAddr++, dynamicSize -= sizeof(Elf_Dyn)) |
There was a problem hiding this comment.
I think this type of protection is also missing from the macho equivalent.
Restore the unrelated runtimeinfo.cpp comment change. Co-authored-by: Copilot <[email protected]>
Ensure that partial reads are rejected and that failure to find an android note/musl dependency is treated as a failure independent of the presence or absence of said markers.