You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent some time to debug the root cause of mentioned bug, I find dsdump doesn't load mach-o into memory correctly. The author naively mapped mach-o file into memory through mmap(. You can find the following code in XRMachOLibrary.mm
In fact you'd better parse all segments carefully.
The text was updated successfully, but these errors were encountered:
4B5F5F4B
changed the title
Fail to load mach-o correctly may lead to segment fault
Failing to load mach-o correctly may lead to segment fault
Jun 15, 2021
Hi all,
While trying your tool I came across some segment fault like the issue posted here.
#25
I spent some time to debug the root cause of mentioned bug, I find dsdump doesn't load mach-o into memory correctly. The author naively mapped mach-o file into memory through mmap(. You can find the following code in XRMachOLibrary.mm
void* buff = ::mmap((void*)0x0000000400000000UL, fsize, PROT_READ, MAP_PRIVATE, self.fd, 0);
payload::data = (uint8_t *)buff; // self.data;
payload::size = fsize;
In fact you'd better parse all segments carefully.
The text was updated successfully, but these errors were encountered: