Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
922 stars 209 forks source link

Ignoring the RHS value type in HLIL #6000

Open mostobriv opened 2 weeks ago

mostobriv commented 2 weeks ago

Version and Platform (required):

Bug Description: HLIL just ignores the type of expression in variable declaration. In attached database you can see the function at 0x1800B8390, there is some boiler-plate repetitive code patterns, and at the beginning of the function it works fine (there is gNetworkMessagesVersion001_2 has been propagated with correct type from gNetworkMessagesVersion001):

image

But if scroll down a bit, HLIL just starting to ignore the type of gNetworkMessagesVersion001 variable, setting local var to void* instead of proper type as earlier in function:

image

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open attached database
  2. Go to 0x1800B8390 func
  3. 0x1800b847a - example of correct definition
  4. 0x1800b8cca - from there starts the wrong ones

Expected Behavior: Not sure, mb it the expected already and to fix this i should tweak some of the limits settings, but function not looks to big for me, to reach the default analysis limits. So i think the expected behaviour should be to propagate correct type in the whole function.

Binary: The archive is to big for uploading it on github, i've sent it to binaryninja at vector35.com

psifertex commented 1 week ago

Thanks for the report. Binary available internally asgiggle sapphire whisper.