Vector35 / Vector35/binaryninja-api

[DSC] iOS 15: cross-image calls show as bare addresses, rather than names

Open
#7,412 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

File Format: SharedCache Impact: Medium
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 5.2.8258-dev Ultimate, 42dff25b
  • OS: macos
  • OS Version: 26.0
  • CPU Architecture: arm64

Bug Description:
After the changes in https://github.com/Vector35/binaryninja-api/pull/7399, iOS 15 shared caches now load, apply Obj-C type information, and can be saved successfully.

One problem remains: Cross-image calls show as bare addresses, rather than names.

The stub functions reside in __stubs sections within library images, rather than in stub islands or other region types. We automatically load stub island regions to allow stub symbols to be resolved, but intentionally avoid loading images.

I don't see any obvious pattern as to which images the stubs are in. objc_msgSend is found in SwiftUI, __os_log_pack_fill is in AVFCore, ___error is in AppSupport.

The context menu correctly shows which library the stub function resides in and loading it applies the correct symbol name, but has the obvious consequence of analyzing that entire image

Steps To Reproduce:
Open 19D50__iPhone10,3_6 and look at the implementation of _sigaltstack at 0x18a8f17ac. It is in libSystem.dylib and should load by default.

Note the call:

18a8f17cc        *0x1886b39b8() = 0xc

This should be:

18a8f17cc        *j____error() = 0xc

But the stub is in /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport so our current approach cannot resolve it automatically.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shared-cache handling described in the issue, especially automatic stub-island loading and symbol resolution for __stubs sections in library images. Reproduce the _sigaltstack case in 19D50__iPhone10,3_6 at 0x18a8f17ac, then verify that the cross-image call resolves to j____error without requiring analysis of the entire AppSupport image.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, ios, macos
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.