Skip to content

(dsc) dyld_shared_cache applying multiple images progressively slow #7276

@rani-i

Description

@rani-i

Version and Platform (required):

  • Binary Ninja Version: 5.2.8128-dev Personal, 86ad75d4
  • OS: macos
  • OS Version: 15.6
  • CPU Architecture: arm64

Bug Description:
Loading multiple images from a dyld_shared_cache is progressively slower and eventually stops functioning.
My workflow is to defer initial analysis so I can apply a large number of DSC images first, then later analyze only MLIL. With analysis disabled, I iterate over ~100 images and call apply_image for each. After ~30 images, per-image load time grows from seconds to tens of seconds/minutes and the UI becomes unresponsive/frozen. This reproduces on both the stable and dev builds.
Note: This was discussed with your team on Slack, I was advised to file an issue because this behavior is not intended.

Steps To Reproduce:

  1. Open the DSC.

  2. Disable analysis (analysis-on-hold). (Screenshot attached.)

  3. Apply many images in a loop:

    for idx, image in enumerate(images_to_load):
        print(f'[+] {idx+1}/{len(images_to_load)} Loading {image}')
        if image:
            start = time.time()
            shared_cache.apply_image(bv, image)
            end = time.time()
            total_time += (end - start)
            print(f'Time:{end-start} (Total Time:{total_time})')
  4. Observe that by ~30 images, apply_image takes ~30s–minutes per image and BN becomes frozen.

  5. Close the BNDB and retry a single problematic image in a fresh session: the same apply_image takes ~0.5s. (Screenshot attached.)

Expected Behavior:
With analysis disabled, applying many DSC images should remain fast and consistent (similar to the ~0.5s single-image timing), without progressive slowdown or freezing.

Screenshots:

Initial analysis disabled

Image

Applying multiple images

Image

Applying single image

Image

Binary:
Dyld shared cache - 23A5297i__iPhone17,2

Metadata

Metadata

Assignees

Labels

Component: CoreIssue needs changes to the coreEffort: LowIssue should take < 1 weekFile Format: SharedCacheIssue with the dyld_shared_cache pluginImpact: MediumIssue is impactful with a bad, or no, workaround

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions