[llvm] [MachO] Stop parsing past end of rebase/bind table (PR #93897)

Zixu Wang via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 17:52:15 PDT 2024


zixu-w wrote:

Updated fix and test for the rebase table.

`MachORebaseEntry::moveNext()` and `MachOBindEntry::moveNext()` assume
that the rebase/bind table ends with `{REBASE|BIND}_OPCODE_DONE` or an
actual rebase/bind. However a valid rebase/bind table might also end
with other effectively no-op opcodes, which caused the parser to move
past the end and go into the next table, resulting in corrupted entries
or infinite loops.

https://github.com/llvm/llvm-project/pull/93897


More information about the llvm-commits mailing list