Vector35 / Vector35/binaryninja-api
Invalid union access and inability to change it's field resolution in If statement
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Version and Platform (required):
- 5.2.8587-dev
- macOS 15.6.1
- Intel
Bug Description:
Union's struct members are wrongly addressed and I can't change it.
Steps To Reproduce:
as in images below
Expected Behavior:
as showed on image from IDA
Screenshots/Video Recording:
Context: var_48 is allocated on stack.
- Here Binary Ninja incorrectly shows access to
heap.b, technically it's not incorrect but I would like to set it toheap.flagswhich is marked as incorrect here. Trying to change it to the incorrect field (or even correct one, thesso.size) does nothing. It's just ignored.
- It shows invalid. Clicking on the invalid field resolution does not change it anyway as mentioned.
- The only way to change what it resolves to is to change of order in the
struct sstring(swap sso with heap).
- IDA has no problems with the same type.
It seems like it only occurs when the field reference is in if statement (as far as I noticed for now), I can change it freely when some var is assigned to the field elsewhere.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the union field-resolution behavior described in the screenshots, focusing on references used inside an if statement and comparing the result with IDA. Verify whether selecting alternate union fields changes the displayed resolution; the report names no source file, test, or entry point.
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