keypatch icon indicating copy to clipboard operation
keypatch copied to clipboard

64-bit fixup is losing high bits of address

Open n-o-o-n opened this issue 8 years ago • 3 comments

Steps to reproduce:

  1. Open a 64-bit application in IDA 7.0, for example, firefox.exe.
  2. At the beginning of 'main()' function try to patch 'jmp main'. The dialog would show:
Assembly: jmp main
- Fixup:  jmp 0x40001090
- Encode: ...

if you replace it with jmp 0x140001090, then it works.

n-o-o-n avatar Jan 30 '18 12:01 n-o-o-n

Can you fix this with a pull req?

aquynh avatar Jan 30 '18 12:01 aquynh

I don't really know how to fix it. All I know is that when address goes to ida_resolve(), it is a correct 64-bit address. Then it goes to

                (t, v) = idaapi.get_name_value(address, sym)

and v is only 32-bits LSB of address.

n-o-o-n avatar Jan 30 '18 12:01 n-o-o-n

Please see commit b8b0f79.

n-o-o-n avatar Feb 16 '18 16:02 n-o-o-n