rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.85k stars 1.15k forks source link

Project store/load removes base address #1113

Closed Thalhammer closed 5 years ago

Thalhammer commented 5 years ago

Environment information

Describe the bug I dumped the firmware of a device and try to analyse it. The firmware was mapped at 0x80000000, so I entered this as base address. After first open everything is fine, however if I save the project and try to reload it later the functions are still there but my file is mapped at 0x00000000 instead of 0x80000000.

To Reproduce

  1. Use binary file
  2. Open it with a base address != 0
  3. Save the project
  4. Close and reopen Cutter
  5. Load previous project.
  6. The file is now mapped at base address 0

Expected behavior File should be mapped at same location after loading project.

Additional context I'm not sure if this is a problem related to radare2 or Cutter.

// EDIT: Saving the project as a zip project solves the issue.

radare commented 5 years ago

Projects are broken in r2. And its already known for years. I guess thw thousands of users complaining are just waiting for me to fix it instead of checking out the code.

There are several things to do in order to get the projwcts work properly again but this involves work mainly in rbin and only me and @ret2libc are caring about this. Imho for cutter wjll be better to show a warning to avoid users lower their expectations when using that. I have several issues more important for me than projects right now but i undwrstant that must be fixed asap but i doubt i can have time to solve all those issues before r2con.

Help is welcome, check the projects and rbin project in r2’s github page. It describes most of the needed changes required to get them work in a stable way, and at the same time enable realtime syncing and undo-anything feature. Otherwise it will be just another hacky one line fix to solve someone else problems.

On 16 Jan 2019, at 18:49, Dominik Thalhammer notifications@github.com wrote:

Environment information

Operating System: elementary OS 5.0 (Ubuntu 18.04) Cutter version: Version 1.7.3 Using r2-3.1.3-140-g2462653a2 File format: binary Describe the bug I dumped the firmware of a device and try to analyse it. The firmware was mapped at 0x80000000, so I entered this as base address. After first open everything is fine, however if I save the project and try to reload it later the functions are still there but my file is mapped at 0x00000000 instead of 0x80000000.

To Reproduce

Use binary file Open it with a base address != 0 Save the project Close and reopen Cutter Load previous project. The file is now mapped at base address 0 Expected behavior File should be mapped at same location after loading project.

Additional context I'm not sure if this is a problem related to radare2 or Cutter.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Thalhammer commented 5 years ago

Help is welcome, check the projects and rbin project in r2’s github page.

Unfortunately I don't have time right now, but I'll take a look once I have free time.

andryblack commented 5 years ago

Fixed in radare2 #11385

ITAYC0HEN commented 5 years ago

Thank you :)