Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radare produces \xff bytes on write #15456

Closed
pawlos opened this issue Nov 14, 2019 · 2 comments
Closed

radare produces \xff bytes on write #15456

pawlos opened this issue Nov 14, 2019 · 2 comments

Comments

@pawlos
Copy link
Contributor

pawlos commented Nov 14, 2019

This report is based on https://reverseengineering.stackexchange.com/questions/22499/radare2-produces-null-bytes-on-write plus my own investigation (I did a bit of additional checks)

Work environment

Questions Answers
OS/arch/bits (mandatory) Windows 10 x64
File format of the file you reverse (mandatory) PE, ELF
Architecture/bits of the file (mandatory) x86/64
r2 -v full output, not truncated (mandatory) radare2 4.0.0 1 @ windows-x86-64 git.4.0.0

Expected behavior

Radare write string correctly.

Actual behavior

Radare produces bunch of ff's on write

Steps to reproduce the behavior

  • run radare2 with a binary: radare2.exe ls
  • reopen in write mode using oo+
  • try to write bytes with w Hello
  • print px

Instead of string I'm seeing bunch of \xff's. See bellow for some additional observations.
Note: I've used radare for Windows but under WSL so I could test both Windows version and linux one on the same binary.

Additional Logs, screenshots, source-code, configuration dump, ...

radare2 behaves correctly when the binary is opened in write mote directly via cmd radare2 -w ls.
the same steps works ok when executed linux version under WSL.

I did the check of Windows version only on the released version for Windows as it failed for me to build version for Windows using cross-compilation (#15451), so there is a chance that this is fixed on latest.

@radare
Copy link
Collaborator

radare commented Nov 14, 2019 via email

@radare
Copy link
Collaborator

radare commented Nov 14, 2019 via email

GustavoLCR added a commit to GustavoLCR/radare2 that referenced this issue Nov 14, 2019
@radare radare closed this as completed in a598e64 Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants