Commit 1fa073a
authored
[MachO] Stop parsing past end of rebase/bind table (#93897)
`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.1 parent c5fdb5c commit 1fa073a
File tree
3 files changed
+429
-14
lines changed- llvm
- lib/Object
- test/Object
- Inputs/MachO
3 files changed
+429
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3501 | 3501 | | |
3502 | 3502 | | |
3503 | 3503 | | |
3504 | | - | |
3505 | | - | |
3506 | | - | |
3507 | | - | |
3508 | | - | |
3509 | | - | |
3510 | | - | |
| 3504 | + | |
3511 | 3505 | | |
3512 | 3506 | | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
3513 | 3515 | | |
3514 | 3516 | | |
3515 | 3517 | | |
| |||
3838 | 3840 | | |
3839 | 3841 | | |
3840 | 3842 | | |
3841 | | - | |
3842 | | - | |
3843 | | - | |
3844 | | - | |
3845 | | - | |
3846 | | - | |
3847 | | - | |
| 3843 | + | |
3848 | 3844 | | |
3849 | 3845 | | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
3850 | 3854 | | |
3851 | 3855 | | |
3852 | 3856 | | |
| |||
0 commit comments