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

Fix x86.operands[2].access as CS_OPT_SYNTAX_ATT #2481

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

bezita
Copy link
Contributor

@bezita bezita commented Sep 15, 2024

before fixed:


Platform: X86 32 (Intel syntax)
Code: 0x0f 0xad 0xd0
Disasm:
0x1000: shrd eax, edx, cl
Prefix: 0x00 0x00 0x00 0x00
Opcode: 0x0f 0xad 0x00 0x00
rex: 0x0
addr_size: 4
modrm: 0xd0
modrm_offset: 0x2
disp: 0x0
sib: 0x0
op_count: 3
operands[0].type: REG = eax
operands[0].size: 4
operands[0].access: READ | WRITE

            operands[1].type: REG = edx
            operands[1].size: 4
            operands[1].access: READ

            operands[2].type: REG = cl
            operands[2].size: 1
    Registers read: cl eax edx
    Registers modified: eflags eax
    EFLAGS: MOD_CF,MOD_SF,MOD_ZF,MOD_PF,UNDEF_OF,UNDEF_AF

0x1003:


Platform: X86 32 (AT&T syntax)
Code: 0x0f 0xad 0xd0
Disasm:
0x1000: shrdl %cl, %edx, %eax
Prefix: 0x00 0x00 0x00 0x00
Opcode: 0x0f 0xad 0x00 0x00
rex: 0x0
addr_size: 4
modrm: 0xd0
modrm_offset: 0x2
disp: 0x0
sib: 0x0
op_count: 3
operands[0].type: REG = cl
operands[0].size: 1
operands[0].access: READ

            operands[1].type: REG = edx
            operands[1].size: 4
            operands[1].access: READ

            operands[2].type: REG = eax
            operands[2].size: 4
            operands[2].access: READ

    Registers read: cl edx eax
    Registers modified: eflags
    EFLAGS: MOD_CF,MOD_SF,MOD_ZF,MOD_PF,UNDEF_OF,UNDEF_AF

after fixed:


Platform: X86 32 (AT&T syntax)
Code: 0x0f 0xad 0xd0
Disasm:
0x1000: shrdl %cl, %edx, %eax
Prefix: 0x00 0x00 0x00 0x00
Opcode: 0x0f 0xad 0x00 0x00
rex: 0x0
addr_size: 4
modrm: 0xd0
modrm_offset: 0x2
disp: 0x0
sib: 0x0
op_count: 3
operands[0].type: REG = cl
operands[0].size: 1
operands[0].access: READ

            operands[1].type: REG = edx
            operands[1].size: 4
            operands[1].access: READ

            operands[2].type: REG = eax
            operands[2].size: 4
            operands[2].access: READ | WRITE

    Registers read: cl edx eax
    Registers modified: eflags eax
    EFLAGS: MOD_CF,MOD_SF,MOD_ZF,MOD_PF,UNDEF_OF,UNDEF_AF

@github-actions github-actions bot added the X86 Arch label Sep 15, 2024
@Rot127
Copy link
Collaborator

Rot127 commented Sep 15, 2024

Please add the test cases from above in tests/issues/issues.yaml. Also fix the segfault discovered by the fuzzing workflow. See the docs how to reproduce it.

@Rot127
Copy link
Collaborator

Rot127 commented Oct 21, 2024

How is it going? Do you think you will find time to finish it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X86 Arch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants