Vector35 / Vector35/binaryninja-api

`Override call type...` Not Working On Inlined Functions

Open
#5,583 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Core Component: UI Effort: Low Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 4.1.5475-dev
  • OS: Windows
  • OS Version: 11
  • CPU Architecture: x64

Bug Description:
After selecting the Inline during analysis (experimental) option on a function, any of the call_sites within that function cannot have their type overrode (except when directly viewing the original function)

Steps To Reproduce:

  1. Find a function that is both called from another function and contains function calls in its body
  2. Mark it as 'Inline during analysis (experimental)'
  3. After re-analysis, find any instance where that function was in-lined and attempt to Override call type... on the call
  4. Observe that it cannot be overridden
  5. Navigate back to the original function that has been in-lined and attempt to override a call type and observe that it functions as expected

Expected Behavior:
Function call sites brought into a function through inlining should be able to have their type overridden

Additional Information:
Even I was getting confused with which 'function' was which in the above description, so here is an example that I hope clarifies a bit more.

void outer_func() {
    inner_func(1);
}

void inner_func(int arg1) {
    inlined_func(1, 2, arg1);
}

When the inner_func is tagged with inline during analysis the view of this becomes...

void outer_func() {
    inlined_func(1, 2, 1);
}

Now try and Override call type... of inlined_func when viewing the call_site through outer_func, not inner_func, and you won't be able to. Now navigate to inner_func and attempt to override the call type and it will work as expected.

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

Reproduce the issue in Binary Ninja on Windows x64 using the listed steps: mark an appropriate function as “Inline during analysis (experimental)” and try “Override call type...” on an inlined call site. Compare that behavior with the same call viewed through the original function; done means call sites brought in through inlining accept the override there as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.