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

iOS 17: objc_fixer.py: TypeError #60

Open
pwnee opened this issue Dec 19, 2023 · 0 comments
Open

iOS 17: objc_fixer.py: TypeError #60

pwnee opened this issue Dec 19, 2023 · 0 comments

Comments

@pwnee
Copy link

pwnee commented Dec 19, 2023

Describe the bug

Trying to extract any dylib from iOS 17 dsc results in error in objc_fixer.py.

21C62__iPhone16,2> dyldex -e JavaScriptCore dyld_shared_cache_arm64e
Extracting /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
21:26:33:609 [ WARNING ] objc_fixer.py:503 : Unknown objc opt version: 4, but continuing on.
ObjC Fixer >> Processing Classes :: [-]                                                                                       21:26:33:610 [  ERROR  ] objc_fixer.py:1223 : Small method list at 0x186c4e8c1, has an entsize that doesn't match the size of objc_method_small_t
Traceback (most recent call last):
  File "/opt/homebrew/bin/dyldex", line 277, in <module>
    main()
  File "/opt/homebrew/bin/dyldex", line 272, in main
    _extractImage(args.dyld_path, dyldCtx, imageMap[targetPaths[0]], outputPath)
  File "/opt/homebrew/bin/dyldex", line 138, in _extractImage
    objc_fixer.fixObjC(extractionCtx)
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 1519, in fixObjC
    _ObjCFixer(extractionCtx).run()
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 447, in run
    self._processSections()
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 634, in _processSections
    if self._processClass(classAddr)[1]:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 850, in _processClass
    classDef.isa, needsFutureIsa = self._processClass(classDef.isa)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 850, in _processClass
    classDef.isa, needsFutureIsa = self._processClass(classDef.isa)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 855, in _processClass
    classDef.superclass, needsFutureSuper = self._processClass(
                                            ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 867, in _processClass
    classDef.data = self._processClassData(
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 929, in _processClassData
    classDataDef.baseProtocols = self._processProtocolList(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 1034, in _processProtocolList
    newProtoAddr = self._processProtocol(protoAddr)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/objc_fixer.py", line 1058, in _processProtocol
    protoDef = self._slider.slideStruct(protoAddr, objc_protocol_t)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/converter/slide_info.py", line 412, in slideStruct
    structOff, context = self._dyldCtx.convertAddr(address)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/DyldExtractor/cache_context.py", line 34, in convertAddr
    if vmaddr >= lowBound and vmaddr < highBound:
       ^^^^^^^^^^^^^^^^^^
TypeError: '>=' not supported between instances of 'NoneType' and 'int'

To Reproduce

  1. iOS version 17.2
  2. DYLD target device and identifier: iPhone 15 Pro Max 16,2
  3. Terminal command to reproduce.
    dyldex -e JavaScriptCore dyld_shared_cache_arm64e

Additional context

@pwnee pwnee changed the title iOS 17: objc_fixer.py: iOS 17: objc_fixer.py: TypeError Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant