Code Monkey home page Code Monkey logo

Comments (18)

mahaloz avatar mahaloz commented on September 27, 2024 1

Ok, it's likely coming from some logic bug here:
https://github.com/binsync/libbs/blob/e27f00ead15327b0d2119c49ab94edaca7f30c9c/libbs/decompilers/binja/hooks.py#L46

I may not have expected binja to start reporting empty comments, which seems to be happening here.

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024 1

Guess it was stuck in a bad state. Now it works.

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Hi @VisualEhrmanntraut would you be able to give a little more context?

  • what OS?
  • what program file type?
  • are you able to share a binary to make reproducibility easier?

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

Hello @mahaloz

I am running macOS 14.4.1 (23E224). The platform of the executable is windows-kernel-x86_64 (so a PE executable). The binary comes from the Windows AMD GPU drivers, and is around 100MB, so I can't really share it.

I just went to a function, and wanted to comment on an assignment (HLIL) what the field might be, for future reference. As soon as I made the comment, Binary Ninja jumped to 660% CPU and froze. After around a minute, it unfroze and BinSync was put in an infinite loop of updating an empty comment at the address since then. I managed to stop it by closing BN and removing the comment after reopening it, then connecting back to the BinSync project.

The driver in question is AMD Adrenaline 24.3.1. The BinSync project is at https://github.com/ChefKissRE/Adrenaline_24.3.1-amdkmdag.sys. if you look at the binsync/visual branch you can see the commit spam mentioned.

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Thank you! This is very helpful that you have a publicly referencable project. Is this commit the start of the useless commits:
https://github.com/ChefKissRE/Adrenaline_24.3.1-amdkmdag.sys/commit/d29b0022e385f8e46b62793996f2de6075241997

I.e., is it always a comment of 0? Were you able to trigger this by changing anything else?

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

@mahaloz It always does the same thing (seemingly random addresses, commit spam, len 0), no matter the contents of the comment or which view (disassembly, HLIL, etc) I add it from.

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Ok, it should be fixed. I reopened so you can confirm its fixed in version 4.0.3

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

Err, I've installed it using the plugin manager. How do I update to this version before it's available there?

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Yikers. You can uninstall in the Plugin manager, then do the normal install:
https://binsync.net/docs/binja/

TL;DR:

  1. Uninstall plugin manager BinSync
  2. Make sure binja is using local Python interpreter (not its bundled one)
  3. pip3 install binsync && binsync --install

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024
Screenshot 2024-03-30 at 23 17 13

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

@VisualEhrmanntraut I see how that could be confusing, the Plugins Path is the path to your Binja plugins folder.

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

Couldn't fix it. I just ran

pip.main(["--isolated", "--disable-pip-version-check", "install", "-U", "-t", "/Users/visual/Library/Application Support/Binary Ninja/python310/site-packages", "binsync"])

in BN's console

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Lol, that's a little wild. So you got just the binsync library to update by running that in the BN console? You can verify with import binsync; binsync.__version__ in the console to check if you like.

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

Yes.

Screenshot 2024-03-30 at 23 56 05

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Amazing. Nice trick.

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

@mahaloz Tested it. The issue does not happen, but no comment is pushed to the repo when I add a comment; nothing happens. Also, if I force push the function I get the following in the log:

[Default] Traceback (most recent call last):
[Default]   File "/Users/visual/Library/Application Support/Binary Ninja/python310/site-packages/binsync/ui/control_panel.py", line 33, in <lambda>
[Default]     menu.addAction(f"Force Push {ctx_name}@{hex(ctx_addr)}", lambda : self.controller.force_push_function(ctx_addr))
[Default] AttributeError: 'BSController' object has no attribute 'force_push_function'. Did you mean: 'force_push_functions'?

But I assume that's not related to this.

from binsync.

mahaloz avatar mahaloz commented on September 27, 2024

Ok, the force push is a different failure. You said the comment is not pushed, but was it committed? I.e if you git log locally is it there and just failed to be pushed to the remote? From my local testing, my new comments still seem to get committed.

from binsync.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on September 27, 2024

It's not pushing or committing anything.

from binsync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.