Vector35 / binaryninja-api

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

BNinja crashes during phase 1 analysis, dev branch #3044

Closed ghost closed 2 years ago

ghost commented 2 years ago

Binary Ninja Version: 3.0.3313-dev Personal, b9014d5e Platform: Ubuntu 20.04.4 LTS

Hi, first of all i love your product <3

Second,

The software core dumps after a while during analysis (i think this bug is within the new speed improvements ?).

The only error i see, by running it on console is:

./binaryninja
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 508, resource id: 0, major code: 130 (Unknown), minor code: 3
terminate called after throwing an instance of 'BinaryNinjaCore::HighLevelILInstructionAccessException'
  what():  invalid access to HLIL instruction
Annullato (core dump creato)

Are there any logs to help you fix this?

It's really strange

Normal branch is working without issues.

psifertex commented 2 years ago

Is this for all files? Or only one specific file?

ghost commented 2 years ago

At the moment it's happening with the same file, i didn't check with others honestly

but the file is 'just' 14M

psifertex commented 2 years ago

Ca man you check with others? It's not the size that matters but the content most likely. And is the file one you can share? If you can use the version switcher you identify the exact release that caused the crash that would also be helpful.

ghost commented 2 years ago

Ok i will try with the others releases

the file is wvsc from Acunetix, i don't know it I can share that, i think not.

The file is not packed nor obfuscated.

I will check with another binary first then switch to previous versions and will update you

ghost commented 2 years ago

UPDATE: tried to decompile ida64 from ida 7.7, and it worked without crashing and it's 5.3M.

that is really strange

psifertex commented 2 years ago

Yeah, as I said, it's not size related. There's some structure or logic that is crashing so not really a surprise at all. Can you share the file hash so we can see if we can get it some other way? Otherwise the best info you can give us is the exact version that introduced the crash.

ghost commented 2 years ago

Sure, the hash is:

Filename: wvsc MD5: 16ff620ca8f13e95ee89f68b95eb2d39 SHA256: c6ebacdeac0c370225158f07f1da2c3b6262115ef3b998818a4dc5b61acca242

Now i will try with different versions, i will update you!

ghost commented 2 years ago

UPDATE:

using version Version 3.0.3312-dev Personal (2022-03-24 19:12:54 with same binary, after a while on phase 1, RAM went to 100% and eveything crashed.

On newer version RAM usage is not raising, but still crashes, will try on previous version.

psifertex commented 2 years ago

Binary search is usually fastest for identifying the exact version that caused the issue. I wonder if there are potentially two issues. One ooming (incidentally, try creating some swap space to solve that -- how much ram do you currently have?) and another that is unrelated to memory usage.

ghost commented 2 years ago

Welp, i have 64 GB ram, so i don't think the issue is that ahaha

i am checking with Version 3.0.3311-dev Personal (Build ID cbee94ec) currently

UPDATE: this crashed too, but without RAM 100% usage. switching to previous version.

UPDATE 2: even Version 3.0.3310-dev Personal (Build ID b4907390) crashed, no RAM abuse.

UPDATE 3: Same with: Version 3.0.3308-dev Personal (Build ID 59e8860)

ghost commented 2 years ago

FINALLY lol

version Version 3.0.3307-dev Personal (Build ID 87a0230b) works!

fuzyll commented 2 years ago

Thanks - I think we were already working on a different crash involving this and have it bisected. We'll let you know when we're able to get a fix in, thanks a bunch for the additional report.

ghost commented 2 years ago

Awesome, can't wait! :)

plafosse commented 2 years ago

We have a fix for this please check 3.0.3319