-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Milestone
Description
Environment
The current date is: 17/02/2025
radare2 5.9.8 1 @ windows-x86-64
birth: git.5.9.8 Tue 11/19/2024__11:46:03.42
commit: 4eb49d5ad8c99eaecc8850a2f10bad407067c898
options: gpl -O? cs:5 cl:1 meson
CYGWIN_NT-10.0-26100 x86_64
also tested on latest:
birth: git.5.9.8-366-gf7c3e892cf 17/02/2025__15:25:06,51
commit: f7c3e892cf21e8e91f62fde2d2ce36fbd30e0a5b
options: gpl -O? cs:5 cl:2 meson
Description
Radare2 crashes without notice when starting the visual assembler from visual mode on Windows.
Issue Breakdown:
-
Trigger:
- Starting visual assembler calls
r_core_cmd_strf
in vasm.c#L98.
- Starting visual assembler calls
-
Buffer Construction:
- A RBuffer is created from the hex input in cmd.c#L5023-L5054.
-
Problematic URI Construction (in io.c#L54 using
r_str_newf
):-
Linux: Generates valid URI:
rbuf://0xdeadbeef
. -
Windows: Omits the
0x
prefix, producingrbuf://DEADBEEF
.
-
Linux: Generates valid URI:
-
Faulty Address Parsing (in io_rbuf.c#L40 with
r_num_get
):-
Linux:
r_num_get(NULL, "0xdeadbeef")
correctly parses0xdeadbeef
$\rightarrow$ 3735928559
. -
Windows:
r_num_get(NULL, "DEADBEEF")
misinterprets it, returning0
, causing an access violation.
-
Linux:
Expected Behavior:
- The
rbuf://
schema should be consistent across platforms. - On Windows, the URI should retain the
0x
prefix (rbuf://0xdeadbeef
) - This will ensure that
r_num_get
correctly decodes the address, preventing crashes
Test
Steps To Reproduce
- Open Radare2 on Windows (
radare2 -w -
). - Enter visual mode with
V
. - Start the visual assembler (
A
). - Radare2 crashes immediately.
Metadata
Metadata
Assignees
Labels
No labels