Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Importing iOS 16 Beta 1 dyld_shared_cache fails #4406

Closed
darbysauter opened this issue Jul 3, 2022 · 2 comments
Closed

macOS: Importing iOS 16 Beta 1 dyld_shared_cache fails #4406

darbysauter opened this issue Jul 3, 2022 · 2 comments
Assignees
Labels
Feature: Loader/DYLD Status: Internal This is being tracked internally by the Ghidra team
Milestone

Comments

@darbysauter
Copy link

darbysauter commented Jul 3, 2022

Describe the bug
When importing the file dyld_shared_cache_arm64 it asks to select an import mode, I selected single file.
Using default options.

It will fail to import

To Reproduce
Steps to reproduce the behavior:

  1. Import iOS 16 Beta 1 "dyld_shared_cache_arm64" as single file
  2. Use default options and begin import
  3. See error

Expected behavior
Successful import

Screenshots

image

image

Environment (please complete the following information):

  • OS: macOS 12.4
  • Java Version: 11.0.9 2020-10-20 LTS
  • Ghidra Version: 10.1.4
  • Ghidra Origin: official GitHub distro

Additional context

Invalid index: 174474192
java.io.IOException: Invalid index: 174474192
	at ghidra.app.util.opinion.DyldCacheLoader.load(DyldCacheLoader.java:108)
	at ghidra.app.util.opinion.AbstractLibrarySupportLoader.doLoad(AbstractLibrarySupportLoader.java:347)
	at ghidra.app.util.opinion.AbstractLibrarySupportLoader.loadProgram(AbstractLibrarySupportLoader.java:83)
	at ghidra.app.util.opinion.AbstractProgramLoader.load(AbstractProgramLoader.java:112)
	at ghidra.plugin.importer.ImporterUtilities.importSingleFile(ImporterUtilities.java:404)
	at ghidra.plugin.importer.ImporterDialog.lambda$okCallback$7(ImporterDialog.java:350)
	at ghidra.util.task.TaskBuilder$TaskBuilderTask.run(TaskBuilder.java:306)
	at ghidra.util.task.Task.monitoredRun(Task.java:134)
	at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.IOException: Invalid index: 174474192
	at ghidra.app.util.bin.FileByteProvider.ensureBounds(FileByteProvider.java:264)
	at ghidra.app.util.bin.FileByteProvider.readBytes(FileByteProvider.java:121)
	at ghidra.app.util.bin.BinaryReader.readInt(BinaryReader.java:678)
	at ghidra.app.util.bin.BinaryReader.readNextInt(BinaryReader.java:315)
	at ghidra.app.util.bin.format.macho.commands.NList.initNList(NList.java:59)
	at ghidra.app.util.bin.format.macho.commands.NList.createNList(NList.java:45)
	at ghidra.app.util.bin.format.macho.commands.SymbolTableCommand.initSymbolTableCommand(SymbolTableCommand.java:84)
	at ghidra.app.util.bin.format.macho.commands.SymbolTableCommand.createSymbolTableCommand(SymbolTableCommand.java:55)
	at ghidra.app.util.bin.format.macho.commands.LoadCommandTypes.getLoadCommand(LoadCommandTypes.java:41)
	at ghidra.app.util.bin.format.macho.MachHeader.parse(MachHeader.java:155)
	at ghidra.app.util.opinion.DyldCacheProgramBuilder$DyldCacheMachoInfo.<init>(DyldCacheProgramBuilder.java:364)
	at ghidra.app.util.opinion.DyldCacheProgramBuilder.processDylibs(DyldCacheProgramBuilder.java:295)
	at ghidra.app.util.opinion.DyldCacheProgramBuilder.build(DyldCacheProgramBuilder.java:132)
	at ghidra.app.util.opinion.DyldCacheProgramBuilder.buildProgram(DyldCacheProgramBuilder.java:103)
	at ghidra.app.util.opinion.DyldCacheLoader.load(DyldCacheLoader.java:98)
	... 11 more

---------------------------------------------------
Build Date: 2022-May-19 0956 EDT
Ghidra Version: 10.1.4
Java Home: /Library/Java/JavaVirtualMachines/jdk-11.0.9.jdk/Contents/Home
JVM Version: Oracle Corporation 11.0.9
OS: Mac OS X 10.16 x86_64

#3345

@ryanmkurtz
Copy link
Collaborator

What ipsw were you using?

@ryanmkurtz ryanmkurtz self-assigned this Jul 5, 2022
@ryanmkurtz ryanmkurtz added Feature: Loader/DYLD Status: Internal This is being tracked internally by the Ghidra team labels Jul 5, 2022
@ryanmkurtz ryanmkurtz added this to the 10.2 milestone Jul 5, 2022
@ryanmkurtz
Copy link
Collaborator

What ipsw were you using?

Nevermind, this error should be fixed in the master branch now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Loader/DYLD Status: Internal This is being tracked internally by the Ghidra team
Projects
None yet
Development

No branches or pull requests

2 participants