Vector35 / Vector35/binaryninja-api

The order of function's argument recovered is inconsistent with that in source code

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

Nobody has claimed this yet.

Component: Core 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: Both tested in 4.0.4958 and 3.5.4526
  • OS: Both tested in Ubuntu Linux and Windows11
  • OS Version: 22.04
  • CPU Architecture: x64

Bug Description:
When I disassemble a function and try to recover its function prototypes, I find the argument information (mainly its order) is inconsistent with the source code. For example, in the function ConvertXYZtoLMS, the definition of argument arg1, 2, 3 in MLIL and pseudo code should be arg4, 5, 6 in source code. Are there any special settings that force BN to exchange arg1, 2, and 3 with arg4, 5, and 6?

Test project: ImageMagick-7.0.10-27
Source file: ImageMagick-7.0.10-27/MagickCore/colorspace.c

Expected Behavior:
The recovered arg1 should be indicated by the instruction 0x08b3aa instead of 0x08b3b9. Same as other arguments.

Screenshots:
BN_ConvertXYZToLMS-Copy

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 report using ImageMagick-7.0.10-27, focusing on ConvertXYZtoLMS in ImageMagick-7.0.10-27/MagickCore/colorspace.c. Compare the recovered arguments at instructions 0x08b3aa and 0x08b3b9 in MLIL and pseudocode; done means the recovered argument order matches the source definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
reverse-engineering
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.