-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Description
When attempting to move a segment register, for instance ES into a 64-bit register using a REX prefix, the segment register is ignored.
Reference:
Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2B 4-35
Affected instructions:
0x488c00
NOTE: All combinations of prefixes and operands are omitted.
Reproduction guide
Instruction:
00000000 488C00 mov qword [rax],es
Input:
pyvex.IRSB("\x48\x8C\x00", 0x8048000, archinfo.ArchX86())
Observed output:
IRSB {
t0:Ity_I64 t1:Ity_I64
00 | ------ IMark(0x0, 3, 0) ------
01 | t0 = GET:I64(rax)
02 | STle(t0) = 0x0000
NEXT: PUT(rip) = 0x0000000000000003; Ijk_Boring
}
Expected output:
IRSB {
t0:Ity_I64 t1:Ity_I16
00 | ------ IMark(0x0, 3, 0) ------
01 | t0 = GET:I64(rax)
01 | t1 = GET:I16(es)
02 | STle(t0) = t1
NEXT: PUT(rip) = 0x0000000000000003; Ijk_Boring
}
System Info
OS:
# uname -a
Linux ubuntu 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"
PyVEX:
# pip freeze | grep pyvex
pyvex==6.7.4.12