rizinorg / cutter

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

Editing assembly instruction dialog causes segmentation fault #3374

Open Ty3r0X opened 2 months ago

Ty3r0X commented 2 months ago

Environment information

Describe the bug

If I try to modify an assembly instruction using right click->Edit->Instruction I am greeted with the dialog prompting me to enter the new instruction. After pressing any key inside the text box, the program causes a segmentation fault without any warning.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a function
  2. Go to Graph
  3. Select an assembly instruction
  4. Right click
  5. Click on edit
  6. Click instruction
  7. When prompted to type the new instruction, try modifying the instruction itself, not the argument
  8. crash

Expected behavior

Properly change the assembly instruction

Screenshots

bug

Additional context

➜  ~ cutter /home/ty3r0x/projects/bios-rveng/wifi.bin 
"0.7.3" "0.7.3"
Plugins are loaded from "/home/ty3r0x/.local/share/rizin/cutter/plugins"
Native plugins are loaded from "/home/ty3r0x/.local/share/rizin/cutter/plugins/native"
Python plugins are loaded from "/home/ty3r0x/.local/share/rizin/cutter/plugins/python"
Loaded 0 plugin(s).
Plugins are loaded from "/usr/local/share/rizin/cutter/plugins"
Plugins are loaded from "/usr/share/rizin/cutter/plugins"
Native plugins are loaded from "/usr/share/rizin/cutter/plugins/native"
Loaded 1 plugin(s).
[x] Analyze all flags starting with sym. and entry0 (aa)
[x] Analyze function calls
[x] Analyze len bytes of instructions for references
[x] Check for classes
[x] Analyze local variables and arguments
[x] Type matching analysis for all functions
[x] Applied 0 FLIRT signatures via sigdb
[x] Propagate noreturn information
[x] Integrate dwarf function information.
[x] Resolve pointers to data sections
[x] Use -AA or aaaa to perform additional experimental analysis.
[1]    206376 segmentation fault (core dumped)  cutter /home/ty3r0x/projects/bios-rveng/wifi.bin
wargio commented 2 months ago

can you repro this with any binary? Please also try the AppImage just in case.

Ty3r0X commented 2 months ago

can you repro this with any binary? Please also try the AppImage just in case.

The issue occours on any kind of binary, however the appimage version does not have this issue, I can change the instruction no problem. Does that mean this issue is the responsability of the package maintainer?

wargio commented 2 months ago

it might be. unfortunately is hard to say without a crash dump.