Skip to content

Unable to recognize prefix - mov, lea #22

@mfaerevaag

Description

@mfaerevaag

Description

Fails to correctly decode prefix and use correct operand sizes.

Reference:
mov: Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2B 4-35
lea: Ref. Intel 64 and IA-32 Architecture Software Developer's Manual Vol. 2A 3-528

Affected instructions:

0x6689c8    # mov
0x668d0400  # lea

NOTE: All combinations of prefixes and operands are omitted.

Reproduction guide

Instruction:

00000000  6689C8            mov ax,cx

Input:

binsec disasm -decode 6689c8

Observed output:

mov eax, ecx ⎧1: eax := ecx₍₃₂₎
             ⎩2: goto ({0x00000003; 32}, 0)

Expected output:
Correctly decode operand sizes.

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"

BINSEC: 20170301 0.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions