Vector35 / Vector35/binaryninja-api

Multiple definitions in HLIL SSA

Open
#2,809 2 comments 0 reactions 1 assignee View on GitHub

@rssor is already working on this.

Since Jan 31, 2022.

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

Description

Version and Platform (required):

  • Binary Ninja Version: 2.5.3140-dev
  • OS: macOS
  • OS Version: 11.3

Bug Description:

HLIL SSA form contains variables with multiple definitions for the same variable version.

Screen Shot 2021-12-29 at 3 32 14 AM

I found this bug while walking def-use chains... and unexpectedly found a cycle. I went to look at the HLIL and saw this wacky output. I do not have much experience with SSA form so if this is intended behavior I'm sorry and feel free to close.

Steps To Reproduce:

  1. Open the attached libc - note it's just from some random ctf challenge and was probably compiled from source (ie. it doesn't match any from common distros)
  2. Switch to HLIL SSA form
  3. Go to 0x73a2e

Expected Behavior:

SSA form would have a single definition for each variable version

Screenshots:

above

Additional Information:

In addition to the multiple definitions, I’m not sure the handling of writes to subsets of registers is really right:

rcx_2#0.b = /* something */

being treated as just a use is really correct? Seems misleading at best… then again, I don’t really have much experience with SSA form.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.