Vector35 / Vector35/binaryninja-api

Search returns 0 results unless searching within the specific function for large binary

Open
#6,950 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

State: Need Reproduction
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.0.7486
  • Edition: Commercial / Ultimate
  • OS: Ubuntu Linux
  • OS Version: 22.04
  • CPU Architecture: x64 or M1

Bug Description:

Searching doesn't work, perhaps over large ranges. In the bndb linked below, I'm searching for __pcmpeqb_xmmdq_memdq in sub_2899e20 using Text with the Search range: All it fails with 0 results. If I do the exact same search but with the Search range: Current function it finds everything just fine. If I switch the search range to Custom range but keep the current function range, I get 0 results.

Steps To Reproduce:

  1. Download and decompress the bndb
  2. Go to function sub_2899e20
  3. Observe __pcmpeqb_xmmdq_memdq is in the function text
  4. Search for __pcmpeqb_xmmdq_memdq (or anything) globally.

Expected Behavior:
Search results appear, slowly, because it has to scan over a gazillion files.

Screenshots/Video Recording:
N/A

Binary:
If applicable, please provide us with the binary to help us work with the issue faster. Here are a few options:

Original binary: gentle cloud runs easily (obsidian for linux)
BNDB: https://drive.google.com/file/d/16JJT4DBIn9g5jic5eevaqaVnQqxX6QCG/view?usp=sharing It's on google because every time I uploaded to y'all, the upload would fail and the site would return 502 for a while and then 503. 🤷

Additional Information:
I don't seem to have this problem for smaller binaries.

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 by downloading the linked BNDB and reproducing the search in sub_2899e20, comparing All, Current function, and Custom range searches. Trace the search entry point used for large binaries and verify that global and equivalent custom-range searches return the same results as the function search.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.